iqvoc 3.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +69 -0
- data/Gemfile.lock +134 -0
- data/LICENSE +13 -0
- data/README.md +68 -0
- data/Rakefile +23 -0
- data/app/controllers/application_controller.rb +125 -0
- data/app/controllers/collections/hierarchical_controller.rb +44 -0
- data/app/controllers/collections_controller.rb +124 -0
- data/app/controllers/concepts/alphabetical_controller.rb +39 -0
- data/app/controllers/concepts/hierarchical_controller.rb +74 -0
- data/app/controllers/concepts/untranslated_controller.rb +38 -0
- data/app/controllers/concepts/versions_controller.rb +119 -0
- data/app/controllers/concepts_controller.rb +174 -0
- data/app/controllers/dashboard_controller.rb +43 -0
- data/app/controllers/pages_controller.rb +22 -0
- data/app/controllers/rdf_controller.rb +43 -0
- data/app/controllers/search_results_controller.rb +101 -0
- data/app/controllers/triple_store_syncs_controller.rb +45 -0
- data/app/controllers/user_sessions_controller.rb +48 -0
- data/app/controllers/users_controller.rb +81 -0
- data/app/helpers/application_helper.rb +60 -0
- data/app/helpers/concepts_helper.rb +86 -0
- data/app/helpers/dashboard_helper.rb +46 -0
- data/app/helpers/rdf_helper.rb +63 -0
- data/app/helpers/search_results_helper.rb +32 -0
- data/app/models/collection/base.rb +161 -0
- data/app/models/collection/member/base.rb +23 -0
- data/app/models/collection/member/collection.rb +33 -0
- data/app/models/collection/member/concept.rb +33 -0
- data/app/models/collection/unordered.rb +18 -0
- data/app/models/concept/base.rb +418 -0
- data/app/models/concept/relation/base.rb +95 -0
- data/app/models/concept/relation/reverse_relation_extension.rb +49 -0
- data/app/models/concept/relation/skos/base.rb +37 -0
- data/app/models/concept/relation/skos/broader/base.rb +41 -0
- data/app/models/concept/relation/skos/broader/mono.rb +28 -0
- data/app/models/concept/relation/skos/broader/poly.rb +23 -0
- data/app/models/concept/relation/skos/narrower/base.rb +37 -0
- data/app/models/concept/relation/skos/related.rb +21 -0
- data/app/models/concept/skos/base.rb +28 -0
- data/app/models/label/base.rb +98 -0
- data/app/models/label/skos/base.rb +27 -0
- data/app/models/labeling/base.rb +81 -0
- data/app/models/labeling/skos/alt_label.rb +21 -0
- data/app/models/labeling/skos/base.rb +99 -0
- data/app/models/labeling/skos/hidden_label.rb +25 -0
- data/app/models/labeling/skos/pref_label.rb +30 -0
- data/app/models/match/base.rb +57 -0
- data/app/models/match/skos/base.rb +23 -0
- data/app/models/match/skos/broad_match.rb +21 -0
- data/app/models/match/skos/close_match.rb +21 -0
- data/app/models/match/skos/exact_match.rb +21 -0
- data/app/models/match/skos/mapping_relation.rb +21 -0
- data/app/models/match/skos/narrow_match.rb +21 -0
- data/app/models/match/skos/related_match.rb +21 -0
- data/app/models/note/annotated/base.rb +29 -0
- data/app/models/note/base.rb +127 -0
- data/app/models/note/skos/base.rb +52 -0
- data/app/models/note/skos/change_note.rb +38 -0
- data/app/models/note/skos/definition.rb +33 -0
- data/app/models/note/skos/editorial_note.rb +21 -0
- data/app/models/note/skos/example.rb +21 -0
- data/app/models/note/skos/history_note.rb +21 -0
- data/app/models/note/skos/scope_note.rb +21 -0
- data/app/models/origin_mapping.rb +58 -0
- data/app/models/rdf_store.rb +96 -0
- data/app/models/search_extension.rb +58 -0
- data/app/models/user.rb +49 -0
- data/app/models/user_session.rb +23 -0
- data/app/views/collections/_collection.html.erb +10 -0
- data/app/views/collections/_form.html.erb +47 -0
- data/app/views/collections/edit.html.erb +11 -0
- data/app/views/collections/index.html.erb +12 -0
- data/app/views/collections/new.html.erb +7 -0
- data/app/views/collections/show.html.erb +53 -0
- data/app/views/collections/show.iqrdf +22 -0
- data/app/views/concepts/_base_data.html.erb +72 -0
- data/app/views/concepts/_close_match.html.erb +16 -0
- data/app/views/concepts/_show_head.html.erb +23 -0
- data/app/views/concepts/_visualization.html.erb +9 -0
- data/app/views/concepts/alphabetical/_pref_labeling.html.erb +6 -0
- data/app/views/concepts/alphabetical/index.html.erb +17 -0
- data/app/views/concepts/edit.html.erb +32 -0
- data/app/views/concepts/hierarchical/_treeview.html.erb +20 -0
- data/app/views/concepts/hierarchical/index.html.erb +5 -0
- data/app/views/concepts/index.iqrdf +24 -0
- data/app/views/concepts/new.html.erb +3 -0
- data/app/views/concepts/show_published.html.erb +16 -0
- data/app/views/concepts/show_unpublished.html.erb +43 -0
- data/app/views/concepts/untranslated/index.html.erb +23 -0
- data/app/views/dashboard/index.html.erb +47 -0
- data/app/views/errors/access_denied.html.erb +3 -0
- data/app/views/errors/multiple_choices.html.erb +11 -0
- data/app/views/errors/not_found.html.erb +8 -0
- data/app/views/kaminari/_page.html.erb +6 -0
- data/app/views/kaminari/_paginator.html.erb +15 -0
- data/app/views/layouts/_controls.html.erb +37 -0
- data/app/views/layouts/_header.html.erb +1 -0
- data/app/views/layouts/_navigation.html.erb +27 -0
- data/app/views/layouts/_sections.html.erb +8 -0
- data/app/views/layouts/application.html.erb +83 -0
- data/app/views/pages/about.html.erb +77 -0
- data/app/views/partials/_rdf_logo.html.erb +4 -0
- data/app/views/partials/collection/_member.html.erb +14 -0
- data/app/views/partials/collection_label/_search_result.html.erb +5 -0
- data/app/views/partials/concept/_edit_link_base.html.erb +4 -0
- data/app/views/partials/concept/_inline_base.html.erb +4 -0
- data/app/views/partials/concept/_new_link_base.html.erb +4 -0
- data/app/views/partials/concept/relation/_base.html.erb +8 -0
- data/app/views/partials/concept/relation/_edit_base.html.erb +15 -0
- data/app/views/partials/concept/relation/skos/_narrower.html.erb +12 -0
- data/app/views/partials/concept/relation/skos/broader/_mono.html.erb +28 -0
- data/app/views/partials/concept/relation/skos/broader/_poly.html.erb +14 -0
- data/app/views/partials/labeling/skos/_base.html.erb +17 -0
- data/app/views/partials/labeling/skos/_edit_base.html.erb +7 -0
- data/app/views/partials/labeling/skos/_search_result.html.erb +12 -0
- data/app/views/partials/match/_base.html.erb +13 -0
- data/app/views/partials/match/_edit_base.html.erb +6 -0
- data/app/views/partials/note/_base.html.erb +15 -0
- data/app/views/partials/note/_edit_base.html.erb +28 -0
- data/app/views/partials/note/_note.html.erb +14 -0
- data/app/views/partials/note/_search_result.html.erb +8 -0
- data/app/views/partials/note/skos/_edit_change_note.html.erb +47 -0
- data/app/views/partials/note/skos/definition/_search_result.html.erb +8 -0
- data/app/views/rdf/show_concept.iqrdf +5 -0
- data/app/views/search_results/_head_contents.html.erb +4 -0
- data/app/views/search_results/_rdf_links.html.erb +4 -0
- data/app/views/search_results/index.html.erb +92 -0
- data/app/views/search_results/index.iqrdf +33 -0
- data/app/views/triple_store_syncs/new.html.erb +7 -0
- data/app/views/user_sessions/new.html.erb +11 -0
- data/app/views/users/_form.html.erb +45 -0
- data/app/views/users/_user_preference.html.erb +12 -0
- data/app/views/users/edit.html.erb +14 -0
- data/app/views/users/index.html.erb +29 -0
- data/app/views/users/new.html.erb +13 -0
- data/config/application.rb +82 -0
- data/config/boot.rb +29 -0
- data/config/database.template.yml +43 -0
- data/config/database.yml +40 -0
- data/config/deploy/common.rb +79 -0
- data/config/deploy/ec2.rb +43 -0
- data/config/deploy/history.rb +29 -0
- data/config/deploy/innoq.rb +37 -0
- data/config/deploy.rb +72 -0
- data/config/engine.rb +25 -0
- data/config/environment.rb +21 -0
- data/config/environments/development.rb +74 -0
- data/config/environments/production.rb +65 -0
- data/config/environments/production.template.rb +65 -0
- data/config/environments/production_internal.rb +65 -0
- data/config/environments/test.rb +51 -0
- data/config/initializers/action_view.rb +23 -0
- data/config/initializers/active_record.rb +18 -0
- data/config/initializers/backtrace_silencers.rb +23 -0
- data/config/initializers/inflections.rb +26 -0
- data/config/initializers/iqvoc.rb +50 -0
- data/config/initializers/jdbc.rb +23 -0
- data/config/initializers/kaminari_config.rb +8 -0
- data/config/initializers/language.rb +6 -0
- data/config/initializers/mime_types.rb +24 -0
- data/config/initializers/secret_token.rb +29 -0
- data/config/initializers/secret_token.rb.template +29 -0
- data/config/initializers/session_store.rb +24 -0
- data/config/locales/activerecord.de.yml +135 -0
- data/config/locales/activerecord.en.yml +135 -0
- data/config/locales/authlogic.de.yml +38 -0
- data/config/locales/authlogic.en.yml +38 -0
- data/config/locales/de.yml +326 -0
- data/config/locales/defaults.de.yml +153 -0
- data/config/locales/en.yml +332 -0
- data/config/routes.rb +53 -0
- data/config/warble.rb +158 -0
- data/db/iqvoc_test.sqlite3 +0 -0
- data/db/migrate/20100927101502_create_schema.rb +174 -0
- data/db/migrate/20101125141218_add_collection_tables.rb +32 -0
- data/db/migrate/20101129161528_add_type_to_collections.rb +24 -0
- data/db/migrate/20101202094602_add_origin_to_collections.rb +25 -0
- data/db/migrate/20101202135420_rename_collection_contents_to_collection_members.rb +25 -0
- data/db/migrate/20101208103531_add_type_to_collection_contents.rb +27 -0
- data/db/migrate/20101210153916_add_indexes_to_collections.rb +25 -0
- data/db/migrate/20110204121244_create_collection_labels.rb +32 -0
- data/db/migrate/20110208084250_change_origin_lengths.rb +27 -0
- data/db/migrate/20110328124300_discard_collection_specifics.rb +27 -0
- data/db/migrate/20110408120357_remove_classifications_and_classifiers.rb +32 -0
- data/db/migrate/20110408120740_remove_xl_specfic_stuff.rb +39 -0
- data/db/migrate/20110420133640_change_value_in_notes.rb +8 -0
- data/db/migrate/20110427120534_add_published_at_to_labels.rb +9 -0
- data/db/migrate/20110510162719_use_mono_hierarchy_instead_of_poly_hierarchy.rb +13 -0
- data/db/migrate/20110512132624_extend_notes_value_field_length.rb +8 -0
- data/db/migrate/20110525103100_separate_note_annotation_predicates.rb +38 -0
- data/db/migrate/20110615134040_change_umt_note_annotations_to_dct.rb +9 -0
- data/db/schema.rb +127 -0
- data/db/seeds.rb +37 -0
- data/iqvoc.gemspec +27 -0
- data/lib/engine_tasks/assets.rake +49 -0
- data/lib/engine_tasks/db.rake +18 -0
- data/lib/engine_tasks/release.rake +118 -0
- data/lib/iqvoc/ability.rb +44 -0
- data/lib/iqvoc/data_helper.rb +27 -0
- data/lib/iqvoc/deep_cloning.rb +92 -0
- data/lib/iqvoc/rdf_helper.rb +67 -0
- data/lib/iqvoc/skos_importer.rb +144 -0
- data/lib/iqvoc/version.rb +19 -0
- data/lib/iqvoc/versioning.rb +151 -0
- data/lib/iqvoc.rb +228 -0
- data/lib/maker.rb +144 -0
- data/lib/ojdbc14.jar +0 -0
- data/lib/string.rb +23 -0
- data/lib/tasks/importer.rake +16 -0
- data/lib/tasks/jdbc.rake +24 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/public/favicon.ico +0 -0
- data/public/images/iqvoc/add.png +0 -0
- data/public/images/iqvoc/arrow_down.gif +0 -0
- data/public/images/iqvoc/arrow_up.gif +0 -0
- data/public/images/iqvoc/footer.png +0 -0
- data/public/images/iqvoc/go_there.png +0 -0
- data/public/images/iqvoc/header.png +0 -0
- data/public/images/iqvoc/header_long.png +0 -0
- data/public/images/iqvoc/iqvoc.png +0 -0
- data/public/images/iqvoc/note_add.png +0 -0
- data/public/images/iqvoc/note_delete.png +0 -0
- data/public/images/iqvoc/note_edit.png +0 -0
- data/public/images/iqvoc/ok.png +0 -0
- data/public/images/iqvoc/rails.png +0 -0
- data/public/images/iqvoc/rdf_flyer.gif +0 -0
- data/public/images/iqvoc/red_arrow.png +0 -0
- data/public/images/iqvoc/remove.png +0 -0
- data/public/images/iqvoc/shadow.png +0 -0
- data/public/images/iqvoc/spinner.gif +0 -0
- data/public/images/iqvoc/tokenizer_delete.png +0 -0
- data/public/images/iqvoc/tokenizer_pencile.png +0 -0
- data/public/images/iqvoc/tokenizer_show.png +0 -0
- data/public/images/iqvoc/unfinished.png +0 -0
- data/public/javascripts/iqvoc/application.js +123 -0
- data/public/javascripts/iqvoc/entityselect.js +121 -0
- data/public/javascripts/iqvoc/excanvas.js +35 -0
- data/public/javascripts/iqvoc/iqvoc.js +118 -0
- data/public/javascripts/iqvoc/jit_rgraph.js +153 -0
- data/public/javascripts/iqvoc/jquery-1.6.2.min.js +18 -0
- data/public/javascripts/iqvoc/jquery-treeview/changelog.txt +29 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/async.html +44 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/bg.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/demo.js +43 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/images.html +56 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/index.html +340 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/large.html +559 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/prerendered.html +621 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/screen.css +24 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/simple.html +82 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/source.php +87 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/source.phps +87 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/ajax-loader.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/file.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/folder-closed.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/folder.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/minus.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/plus.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.async.js +82 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.css +75 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.js +251 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.min.js +15 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.pack.js +16 -0
- data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.cookie.js +92 -0
- data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.js +3363 -0
- data/public/javascripts/iqvoc/jquery-treeview/todo +8 -0
- data/public/javascripts/iqvoc/jquery-ui-1.8.13.custom.js +3229 -0
- data/public/javascripts/iqvoc/jquery-ui-1.8.13.custom.min.js +163 -0
- data/public/javascripts/iqvoc/jquery-ui.datepicker-de.js +22 -0
- data/public/javascripts/iqvoc/json2.js +480 -0
- data/public/javascripts/iqvoc/langselect.js +73 -0
- data/public/javascripts/iqvoc/rails.js +132 -0
- data/public/javascripts/iqvoc/storage.js +122 -0
- data/public/javascripts/iqvoc/visualization.js +321 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/iqvoc/blueprint/ie.css +35 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/cross.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/key.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/tick.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/readme.txt +32 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/screen.css +97 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/readme.txt +14 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/screen.css +71 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/doc.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/email.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/external.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/feed.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/im.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/pdf.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/visited.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/xls.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/readme.txt +18 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/screen.css +40 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/rtl/readme.txt +10 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/rtl/screen.css +110 -0
- data/public/stylesheets/iqvoc/blueprint/print.css +29 -0
- data/public/stylesheets/iqvoc/blueprint/screen.css +258 -0
- data/public/stylesheets/iqvoc/blueprint/src/forms.css +65 -0
- data/public/stylesheets/iqvoc/blueprint/src/grid.css +280 -0
- data/public/stylesheets/iqvoc/blueprint/src/grid.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/src/ie.css +76 -0
- data/public/stylesheets/iqvoc/blueprint/src/print.css +85 -0
- data/public/stylesheets/iqvoc/blueprint/src/reset.css +45 -0
- data/public/stylesheets/iqvoc/blueprint/src/typography.css +106 -0
- data/public/stylesheets/iqvoc/forms.css +71 -0
- data/public/stylesheets/iqvoc/images/back.png +0 -0
- data/public/stylesheets/iqvoc/images/branch.png +0 -0
- data/public/stylesheets/iqvoc/images/categ.png +0 -0
- data/public/stylesheets/iqvoc/images/categ_open.png +0 -0
- data/public/stylesheets/iqvoc/images/go_there.png +0 -0
- data/public/stylesheets/iqvoc/images/iqvoc.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_end.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_end_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_mid.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_mid_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_nothing.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_only.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_only_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_top.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_top_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/nothing.png +0 -0
- data/public/stylesheets/iqvoc/images/top_01.png +0 -0
- data/public/stylesheets/iqvoc/images/trunk.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_217bc0_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_469bdd_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_6da8d5_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_f9bd01_256x240.png +0 -0
- data/public/stylesheets/iqvoc/iqvoc.css +477 -0
- data/public/stylesheets/iqvoc/jquery-ui-1.8.13.custom.css +415 -0
- data/public/stylesheets/iqvoc/widgets.css +81 -0
- data/test/factories.rb +74 -0
- data/test/integration/alphabetical_test.rb +53 -0
- data/test/integration/authentication_test.rb +41 -0
- data/test/integration/browse_concepts_and_labels_test.rb +61 -0
- data/test/integration/browse_static_pages_test.rb +29 -0
- data/test/integration/client_augmentation_test.rb +42 -0
- data/test/integration/client_edit_concept_test.rb +72 -0
- data/test/integration/collection_circularity_test.rb +110 -0
- data/test/integration/concept_test.rb +61 -0
- data/test/integration/edit_concepts_test.rb +40 -0
- data/test/integration/note_annotations_test.rb +86 -0
- data/test/integration/search_test.rb +205 -0
- data/test/integration/tree_test.rb +31 -0
- data/test/integration/untranslated_test.rb +60 -0
- data/test/integration_test_helper.rb +45 -0
- data/test/performance/browsing_test.rb +25 -0
- data/test/test_helper.rb +29 -0
- data/test/unit/concept_test.rb +93 -0
- data/test/unit/note_test.rb +32 -0
- data/test/unit/origin_mapping_test.rb +70 -0
- data/test/unit/skos_import_test.rb +100 -0
- metadata +522 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
<ul id="navi_main">
|
2
|
+
<% if can?(:use, :dashboard) %>
|
3
|
+
<li class="<%= params[:controller] == 'dashboard' ? 'active' : '' %>">
|
4
|
+
<%= link_to "Dashboard", dashboard_path %>
|
5
|
+
</li>
|
6
|
+
<% end %>
|
7
|
+
<li class="<%= params[:controller] == 'concepts/hierarchical' ? 'active' : '' %>">
|
8
|
+
<%= link_to t("txt.views.navigation.hierarchical"), hierarchical_concepts_path %>
|
9
|
+
</li>
|
10
|
+
<li class="<%= params[:controller] == 'concepts/alphabetical' ? 'active' : '' %>">
|
11
|
+
<%= link_to t("txt.views.navigation.alphabetical"), alphabetical_concepts_path(:letter => 'a') %>
|
12
|
+
</li>
|
13
|
+
<li class="<%= params[:controller] == 'collections' ? 'active' : '' %>">
|
14
|
+
<%= link_to t("txt.views.navigation.collections"), collections_path %>
|
15
|
+
</li>
|
16
|
+
<li class="<%= params[:controller] == 'search_results' ? 'active' : '' %>">
|
17
|
+
<%= link_to t("txt.views.navigation.search"), search_path %>
|
18
|
+
</li>
|
19
|
+
<% if can?(:manage, User) %>
|
20
|
+
<li class="<%= params[:controller] == 'users' ? 'active' : '' %>">
|
21
|
+
<%= link_to t("txt.views.navigation.users"), users_path %>
|
22
|
+
</li>
|
23
|
+
<% end %>
|
24
|
+
<li class="<%= params[:controller] == 'pages' && params[:action] == 'about' ? 'active' : '' %>">
|
25
|
+
<%= link_to t("txt.views.navigation.about"), about_path %>
|
26
|
+
</li>
|
27
|
+
</ul>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<div class="sections">
|
2
|
+
<%- sections.select { |s| data[s] }.each do |section_key| -%>
|
3
|
+
<h3><%= t("txt.views.layouts.sections.#{section_key}", :default => section_key.humanize) %></h3>
|
4
|
+
<%- data[section_key].keys.sort.each do |sort_key| -%>
|
5
|
+
<%= raw data[section_key][sort_key] %>
|
6
|
+
<%- end -%>
|
7
|
+
<%- end -%>
|
8
|
+
</div>
|
@@ -0,0 +1,83 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta name="i18n-locale" content="<%= I18n.locale %>">
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<%= csrf_meta_tag %>
|
7
|
+
|
8
|
+
<title><%= Iqvoc.title || t("txt.common.iqvoc_title") %></title>
|
9
|
+
<%= stylesheet_link_tag "iqvoc/blueprint/screen.css", :media => "screen, projection" %>
|
10
|
+
<%= stylesheet_link_tag "iqvoc/blueprint/print.css", :media => "print" %>
|
11
|
+
<!--[if lt IE 8]>
|
12
|
+
<%= stylesheet_link_tag "iqvoc/blueprint/ie.css", :media => "screen, projection" %>
|
13
|
+
<![endif]-->
|
14
|
+
<%= stylesheet_link_tag "iqvoc/iqvoc.css", :media => "all" %>
|
15
|
+
<%= stylesheet_link_tag "iqvoc/forms.css" %>
|
16
|
+
<%= stylesheet_link_tag "/javascripts/iqvoc/jquery-treeview/jquery.treeview.css" %>
|
17
|
+
<%= stylesheet_link_tag "iqvoc/jquery-ui-1.8.13.custom.css" %>
|
18
|
+
<%= stylesheet_link_tag "iqvoc/widgets.css" %>
|
19
|
+
<% Iqvoc.additional_css_files.each do |file| %>
|
20
|
+
<%= stylesheet_link_tag file %>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<%= yield :head %>
|
24
|
+
</head>
|
25
|
+
<body class="<%= "concept" unless @concept.nil? %>">
|
26
|
+
|
27
|
+
<%= render :partial => 'layouts/controls' %>
|
28
|
+
|
29
|
+
<div class="container">
|
30
|
+
<div id="header" class="span-24 last">
|
31
|
+
<%= render :partial => 'layouts/header' %>
|
32
|
+
<%= render :partial => 'layouts/navigation' %>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="navi_sub" class="span-24 last">
|
36
|
+
<%= yield :sub_navigation %>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="content" class="span-24 last">
|
40
|
+
<% if flash[:notice] %>
|
41
|
+
<p class="flash_notice"><%= flash[:notice] %></p>
|
42
|
+
<% end %>
|
43
|
+
<% if flash[:error] %>
|
44
|
+
<p class="flash_error"><%= flash[:error] %></p>
|
45
|
+
<% end %>
|
46
|
+
<%= yield %>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div id="footer" class="span-24 last">
|
50
|
+
<div id="footer_box">
|
51
|
+
<% if current_user %>
|
52
|
+
<%= t('txt.common.welcome', :user_name => current_user.name) %> (<%= current_user.role.humanize %>) | <%= link_to t("txt.views.layouts.application.logout"), user_session_path, :method => :delete %>
|
53
|
+
<% else %>
|
54
|
+
<%= link_to t("txt.views.layouts.application.login"), new_user_session_path() %>
|
55
|
+
<% end %>
|
56
|
+
<a href="http://www.w3.org/2001/sw/" id="w3c_link"></a>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
<script>
|
62
|
+
// load JSON polyfill only if necessary
|
63
|
+
if(typeof JSON === "undefined") {
|
64
|
+
document.write("<script src=\"<%= javascript_path "iqvoc/json2.js" %>\"><\/script>");
|
65
|
+
}
|
66
|
+
</script>
|
67
|
+
<%= javascript_include_tag "iqvoc/jquery-1.6.2.min.js" %>
|
68
|
+
<%= javascript_include_tag "iqvoc/jquery-ui-1.8.13.custom.min.js" %>
|
69
|
+
<%= javascript_include_tag "iqvoc/jquery-ui.datepicker-de.js" %>
|
70
|
+
<%= javascript_include_tag "iqvoc/jquery-treeview/jquery.treeview.js" %>
|
71
|
+
<%= javascript_include_tag "iqvoc/jquery-treeview/jquery.treeview.async.js" %>
|
72
|
+
<%= javascript_include_tag "iqvoc/rails.js" %>
|
73
|
+
<%= javascript_include_tag "iqvoc/storage.js" %>
|
74
|
+
<%= javascript_include_tag "iqvoc/iqvoc.js" %>
|
75
|
+
<%= javascript_include_tag "iqvoc/langselect.js" %>
|
76
|
+
<%= javascript_include_tag "iqvoc/entityselect.js" %>
|
77
|
+
<%= javascript_include_tag "iqvoc/application.js" %>
|
78
|
+
<%= yield :scripts %>
|
79
|
+
<% Iqvoc.additional_js_files.each do |file| %>
|
80
|
+
<%= javascript_include_tag file %>
|
81
|
+
<% end %>
|
82
|
+
</body>
|
83
|
+
</html>
|
@@ -0,0 +1,77 @@
|
|
1
|
+
<h2>About iQvoc</h2>
|
2
|
+
|
3
|
+
<p>iQvoc is a vocabulary management tool that combines easy-to-use human interfaces
|
4
|
+
with Semantic Web interoperability.</p>
|
5
|
+
<p> iQvoc supports vocabularies that are common to many knowledge organisation
|
6
|
+
systems, such as: </p>
|
7
|
+
<ul>
|
8
|
+
<li>Thesauri</li>
|
9
|
+
<li>Taxonomies</li>
|
10
|
+
<li>Classification schemes</li>
|
11
|
+
<li>Subject heading systems </li>
|
12
|
+
</ul>
|
13
|
+
<p>iQvoc provides comprehensive functionality for all aspects of managing such
|
14
|
+
vocabularies: </p>
|
15
|
+
<ul>
|
16
|
+
<li><a href="#import">import of existing vocabularies from a SKOS representation</a></li>
|
17
|
+
<li><a href="#web">multilingual display and navigation in any Web browser</a></li>
|
18
|
+
<li><a href="#edit">editorial features for registered users</a></li>
|
19
|
+
<li><a href="#web">publishing the vocabulary in the Semantic Web</a></li>
|
20
|
+
</ul>
|
21
|
+
<p> iQvoc is built with <a href="#ruby">state-of-the-art technology</a> and can
|
22
|
+
be easily customized according to user's needs. </p>
|
23
|
+
<h3><a name="import"></a>Import of existing vocabularies from a SKOS representation
|
24
|
+
</h3>
|
25
|
+
<p>Existing vocabularies can be imported if they are available in the SKOS format.
|
26
|
+
If there is no such representation, the iQvoc support team can provide help
|
27
|
+
or even do this conversion for you from any kind of available source. If the
|
28
|
+
vocabulary contains extensions by class inheritance, iQvoc can be configured
|
29
|
+
to support this with little effort. </p>
|
30
|
+
<h3><a name="web"></a>Multilingual display and navigation in any Web browser </h3>
|
31
|
+
<p>Once imported, any vocabulary is ready to be displayed and navigated in an
|
32
|
+
intuitive Web interface. iQvoc supports various customisable skins to align
|
33
|
+
with any kind of user-specific style guide. The iQvoc Web interface provides
|
34
|
+
unrestricted multilingualism and conforms to the guidelines of the Web Accessibility
|
35
|
+
Initiative (WAI). </p>
|
36
|
+
<h3><a name="edit"></a>Editorial features for registered users </h3>
|
37
|
+
<p>The general vocabulary administrator may authorize registered users as vocabulary
|
38
|
+
editors. Editing is performed in an extension of the original Web interface,
|
39
|
+
so the editorial staff can be globally distributed and there is no need for
|
40
|
+
any kind of additional tooling. More sophisticated editorial features are planned
|
41
|
+
for version 2, including a fine grained work flow and life cycle management.
|
42
|
+
</p>
|
43
|
+
<h3><a name="sw"></a>Publishing the vocabulary in the Semantic Web </h3>
|
44
|
+
<p>iQvoc provides unique and stable identifiers for each concept according to
|
45
|
+
W3C guide lines "<a href="http://www.w3.org/TR/cooluris/">Cool URIs for the
|
46
|
+
Semantic Web</a>" and "<a href="http://sites.wiwiss.fu-berlin.de/suhl/bizer/pub/LinkedDataTutorial/">How
|
47
|
+
to publish Linked Data on the Web</a>". There is one URL that represents
|
48
|
+
the abstract concept plus redirections to HTML and RDF "information resources",
|
49
|
+
corresponding to the "accept" settings of the request. This allows,
|
50
|
+
for example, integrating the vocabulary with the <a href="http://esw.w3.org/topic/SweoIG/TaskForces/CommunityProjects/LinkingOpenData">Linking
|
51
|
+
Open Data</a> community project or any other conforming knowledge base. Likewise
|
52
|
+
the vocabulary can be referenced in <a href="http://www.w3.org/2002/ws/sawsdl/">Semantic
|
53
|
+
Annotations for WSDL</a> in order to facilitate a semantically enabled service
|
54
|
+
oriented architecture (SOA). There is a strong emphasis on developing automated
|
55
|
+
semantic matching and annotation methods in the next versions of iQvoc.</p>
|
56
|
+
<p>iQvoc offers a free configuration of URI design in order to provide persistent
|
57
|
+
and sustainable URI references whenever any productive vocabulary is migrated
|
58
|
+
to the iQvoc engine.</p>
|
59
|
+
<h3><a name="skos"></a>iQvoc and the Simple Knowledge Organisation System (SKOS)</h3>
|
60
|
+
<p>The <a href="http://www.w3.org/2004/02/skos/">Simple Knowledge Organisation
|
61
|
+
System</a> (SKOS) effort is "developing specifications and standards to
|
62
|
+
support the use of knowledge Organization systems (KOS) such as thesauri, classification
|
63
|
+
schemes, subject heading systems and taxonomies within the framework of the
|
64
|
+
Semantic Web" since 2004. iQvoc 1.0 implements the <a href="http://www.w3.org/2004/02/skos/core#">http://www.w3.org/2004/02/skos/core#</a>
|
65
|
+
namespace, which still is referenced by most SKOS applications. iQvoc developers
|
66
|
+
are contributing to the discussion of the upcoming <a href="http://www.w3.org/2008/05/skos#">http://www.w3.org/2008/05/skos#</a>
|
67
|
+
namespace, which currently is in W3C Working Draft status. Future versions of
|
68
|
+
iQvoc will support both namespaces.</p>
|
69
|
+
<h3> <a name="ruby"></a>iQvoc state-of-the-art technology </h3>
|
70
|
+
<p>iQvoc is implemented based on the <a href="http://www.rubyonrails.org/">Ruby
|
71
|
+
on Rails</a> open-source Web framework which allows increased productivity combined
|
72
|
+
with unlimited interoperability of the product. iQvoc can be run with almost
|
73
|
+
any Web server and database management system. If there is a preference for
|
74
|
+
a Java environment, Java byte code is available as well.</p>
|
75
|
+
<h3><a name="gemet"></a>Contact</h3>
|
76
|
+
<p><%= mail_to "thomas.bandholtz@innoq.com", "thomas.bandholtz@innoq.com", :encode => "javascript" %></p>
|
77
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="relation">
|
2
|
+
<h4><%= klass.model_name.human(:count => 2) %></h4>
|
3
|
+
<div class="relation-body">
|
4
|
+
<%- if concept.collections.any? -%>
|
5
|
+
<ul>
|
6
|
+
<%- concept.collections.each do |collection| -%>
|
7
|
+
<li><%= link_to collection.label.to_s, collection_path(:id => collection) %></li>
|
8
|
+
<%- end -%>
|
9
|
+
</ul>
|
10
|
+
<%- else -%>
|
11
|
+
-
|
12
|
+
<%- end -%>
|
13
|
+
</div>
|
14
|
+
</div>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<dt>
|
2
|
+
<%= link_to highlight_query(result.value, params[:query]), collection_path(:id => result.collection) %>
|
3
|
+
</dt>
|
4
|
+
<dd><%= t('txt.views.search_results.type') %>: <%= result.class.model_name.human %></dd>
|
5
|
+
<dd><%= t('txt.views.search_results.language') %>: <%= result.language %></dd>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<%= link_to(concept.pref_label, concept_path(:id => concept, :published => ((!concept.published? && !concept.published_version_id) ? 0 : nil)), :class => concept.published? ? '' : 'unpublished') %>
|
2
|
+
<%- if concept.additional_info -%>
|
3
|
+
(<%= concept.additional_info %>)
|
4
|
+
<%- end -%>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<div class="relation" id="<%= klass.model_name.to_relation_name %>">
|
2
|
+
<h4><%= klass.model_name.human(:count => 2) %></h4>
|
3
|
+
<div class="relation-body">
|
4
|
+
<%= item_listing(concept.related_concepts_for_relation_class(klass, params[:published] != "0")) do |c|
|
5
|
+
link_to(c.pref_label, concept_path(:lang => c.pref_label.language, :id => c))
|
6
|
+
end %>
|
7
|
+
</div>
|
8
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<li>
|
2
|
+
<%= label_tag klass.name.to_relation_name,
|
3
|
+
klass.model_name.human(:count => klass.singular? ? 1 : 2) %>
|
4
|
+
<%= text_field_tag "concept[concept_relations_by_id][#{klass.name.to_relation_name}]",
|
5
|
+
concept.concept_relations_by_id(klass.name.to_relation_name),
|
6
|
+
:id => klass.name.to_relation_name,
|
7
|
+
:class => "entity_select",
|
8
|
+
:"data-query-url" => concepts_path(:format => :json),
|
9
|
+
:"data-entity-uri" => concept_path("{id}"),
|
10
|
+
:"data-singular" => klass.singular? || nil,
|
11
|
+
:"data-entities" => Concept::Base.editor_selectable.
|
12
|
+
by_origin(concept.concept_relations_by_id(klass.name.to_relation_name).
|
13
|
+
split(Iqvoc::InlineDataHelper::Splitter)).
|
14
|
+
map { |c| concept_widget_data(c) }.to_json %>
|
15
|
+
</li>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div class="relation">
|
2
|
+
<h4><%= Iqvoc::Concept.broader_relation_class.narrower_class.model_name.human(:count => 2) %></h4>
|
3
|
+
<div class="relation-body block">
|
4
|
+
<% if concept.narrower_relations.any? %>
|
5
|
+
<div class="selector">
|
6
|
+
<%= treeview(concept.narrower_relations.map(&:target)) %>
|
7
|
+
</div>
|
8
|
+
<% else %>
|
9
|
+
<p>-</p>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
12
|
+
</div>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<div class="relation">
|
2
|
+
<h4><%= Iqvoc::Concept.broader_relation_class.model_name.human(:count => 2) %></h4>
|
3
|
+
<div class="relation-body block">
|
4
|
+
|
5
|
+
<%-
|
6
|
+
only_published = params[:published] != "0"
|
7
|
+
related_concepts = concept.related_concepts_for_relation_class(
|
8
|
+
Iqvoc::Concept.broader_relation_class, only_published)
|
9
|
+
-%>
|
10
|
+
|
11
|
+
<% if related_concepts.length > 0 %>
|
12
|
+
<div class="selector">
|
13
|
+
<% parent = related_concepts.first
|
14
|
+
parents = []
|
15
|
+
while (parent && !parents.include?(parent))
|
16
|
+
parents << parent
|
17
|
+
parent = parent.related_concepts_for_relation_class(
|
18
|
+
Iqvoc::Concept.broader_relation_class, only_published).first
|
19
|
+
end %>
|
20
|
+
<%= parents.map { |concept|
|
21
|
+
render concept.class.inline_partial_name, :concept => concept
|
22
|
+
}.join(" « ").html_safe %>
|
23
|
+
</div>
|
24
|
+
<% else %>
|
25
|
+
<p>-</p>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="relation">
|
2
|
+
<h4><%= Iqvoc::Concept.broader_relation_class.model_name.human(:count => 2) %></h4>
|
3
|
+
<div class="relation-body block">
|
4
|
+
<% if concept.related_concepts_for_relation_class(
|
5
|
+
Iqvoc::Concept.broader_relation_class, params[:published] != "0").
|
6
|
+
length > 0 %>
|
7
|
+
<div class="selector">
|
8
|
+
<%= treeview(@concept.broader_relations.map { |rel| rel.target }, true) %>
|
9
|
+
</div>
|
10
|
+
<% else %>
|
11
|
+
<p>-</p>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
14
|
+
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= content_tag("div", { :class => "relation translation", :lang => defined?(concept) ? lang || nil : nil }, true) do %>
|
2
|
+
<%- if defined?(concept) -%>
|
3
|
+
<h4><%= klass.model_name.human(:count => 2) %><%= " (#{t("languages.#{lang}", :default => lang.to_s)})" if lang %></h4>
|
4
|
+
<div class="relation-body">
|
5
|
+
<%= item_listing(concept.labels_for_labeling_class_and_language(klass, lang)) do |label|
|
6
|
+
label.value
|
7
|
+
end %>
|
8
|
+
</div>
|
9
|
+
<%- elsif defined?(label) -%>
|
10
|
+
<h4><%= klass.model_name.human(:count => 2) %> <%= t("txt.common.of") %></h4>
|
11
|
+
<div class="relation">
|
12
|
+
<%= item_listing(label.concepts_for_labeling_class(klass)) do |c|
|
13
|
+
link_to(c.origin, concept_path(:id => c), :alt => c.pref_label)
|
14
|
+
end %>
|
15
|
+
</div>
|
16
|
+
<%- end -%>
|
17
|
+
<%- end -%>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= content_tag("li", { :class => "translation", :lang => language || nil }, true) do %>
|
2
|
+
<% fieldname = "concept[labelings_by_text][#{klass.name.to_relation_name}][#{language}]" %>
|
3
|
+
<%= label_tag fieldname, klass.model_name.human(:count => 2) +
|
4
|
+
(language ? " (#{t("languages.#{language}", :default => language.to_s)})" : "") %>
|
5
|
+
<%= text_area_tag fieldname,
|
6
|
+
concept.labelings_by_text(klass.name.to_relation_name, language) %>
|
7
|
+
<%- end -%>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%- if concept = result.owner -%>
|
2
|
+
<dt>
|
3
|
+
<%= link_to highlight_query(result.target.value, params[:query]), concept_path(:id => concept) %>
|
4
|
+
<%- if concept.additional_info.present? -%>
|
5
|
+
(<%= concept.additional_info %>)
|
6
|
+
<%- end -%>
|
7
|
+
</dt>
|
8
|
+
<dd><%= t('txt.views.search_results.type') %>: <%= result.class.model_name.human %></dd>
|
9
|
+
<%- if result.target.language -%>
|
10
|
+
<dd><%= t('txt.views.search_results.language') %>: <%= result.target.language %></dd>
|
11
|
+
<%- end -%>
|
12
|
+
<%- end -%>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="relation">
|
2
|
+
<h4><%= klass.model_name.human(:count => 2) %></h4>
|
3
|
+
<div class="relation-body">
|
4
|
+
<%= item_listing(concept.matches_for_class(klass)) do |match|
|
5
|
+
auto_link(match.value, :html => { :target => '_blank' }) do |text|
|
6
|
+
Iqvoc::rdf_namespaces.each do |prefix, url|
|
7
|
+
text = text.gsub(url, "#{prefix}:")
|
8
|
+
end
|
9
|
+
text
|
10
|
+
end.html_safe
|
11
|
+
end %>
|
12
|
+
</div>
|
13
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="relation">
|
2
|
+
<%- if defined?(concept) -%>
|
3
|
+
<% notes = concept.notes_for_class(klass) %>
|
4
|
+
<h4><%= klass.model_name.human(:count => notes.count) %></h4>
|
5
|
+
<div class="relation-body">
|
6
|
+
<%= notes.any? ? render(:partial => 'partials/note/note', :collection => notes) : "-" %>
|
7
|
+
</div>
|
8
|
+
<%- elsif defined?(label) -%>
|
9
|
+
<% notes = label.notes_for_class(klass) %>
|
10
|
+
<h4><%= klass.model_name.human(:count => notes.count) %></h4>
|
11
|
+
<div class="relation-body">
|
12
|
+
<%= notes.any? ? render(:partial => 'partials/note/note', :collection => notes) : "-" %>
|
13
|
+
</div>
|
14
|
+
<%- end -%>
|
15
|
+
</div>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<fieldset id="label_<%= assoc_klass.name.to_relation_name %>_data" class="note_relation">
|
2
|
+
<legend><%= assoc_klass.model_name.human(:count => 2) %></legend>
|
3
|
+
<ol>
|
4
|
+
<% owner_klass.send(assoc_klass.name.to_relation_name).select{|n| n.class == assoc_klass}.each do |note| %>
|
5
|
+
<%= content_tag("li", {
|
6
|
+
:class => "inline_note translation #{" new" if note.new_record?}",
|
7
|
+
:lang => note.language || nil
|
8
|
+
}, true) do %>
|
9
|
+
<%= f.fields_for :"#{assoc_klass.name.to_relation_name}", note do |note_form| %>
|
10
|
+
<%= note_form.label :value, assoc_klass.model_name.human %>
|
11
|
+
<%= note_form.text_area :value, :rows => 5, :cols => 40 %>
|
12
|
+
|
13
|
+
<br />
|
14
|
+
|
15
|
+
<%= note_form.label :language, t("txt.common.language") %>
|
16
|
+
<%= note_form.select :language, options_for_language_select(note.language) %>
|
17
|
+
|
18
|
+
<% unless note.new_record? %>
|
19
|
+
<br />
|
20
|
+
<%= note_form.check_box :"_destroy" %>
|
21
|
+
<%= note_form.label :"_destroy", t("txt.common.delete") %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
26
|
+
</ol>
|
27
|
+
<input type="button" value="<%= t("txt.common.add_note") %>" />
|
28
|
+
</fieldset>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% unless note.new_record? %>
|
2
|
+
<%= content_tag("div", { :class => "translation", :lang => note.language || nil }, true) do %>
|
3
|
+
<div class="note_language <%= note.language %>">
|
4
|
+
(<%= note.language || '-' %>)
|
5
|
+
</div>
|
6
|
+
<span><%= auto_link(note.value, :html => { :target => '_blank' }) %></span>
|
7
|
+
<dl class="note_annotations">
|
8
|
+
<% note.annotations.each do |annotation| %>
|
9
|
+
<dt><%= annotation.identifier %></dt>
|
10
|
+
<dd><%= auto_link(annotation.value, :html => { :target => '_blank' }) %></dd>
|
11
|
+
<% end %>
|
12
|
+
</dl>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<dt>
|
2
|
+
<% if result.owner.is_a?(Concept::Base) %>
|
3
|
+
<%= link_to highlight_query("#{result.owner.pref_label.to_s} (#{result.owner.origin})", params[:query]), concept_path(:id => result.owner) %><br>
|
4
|
+
<% elsif result.owner.is_a?(Label::Base) %>
|
5
|
+
<%= link_to highlight_query(result.owner.value, params[:query]), label_path(:id => result.owner) %><br>
|
6
|
+
<% end %>
|
7
|
+
</dt>
|
8
|
+
<dd><%= t('txt.views.search_results.type') %>: <%= result.class.model_name.human %></dd>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<fieldset id="<%= assoc_klass.name.to_relation_name %>" class="note_relation">
|
2
|
+
<legend><%= assoc_klass.model_name.human(:count => 2) %></legend>
|
3
|
+
<ol>
|
4
|
+
<% change_notes = owner_klass.send(assoc_klass.name.to_relation_name).sort {|a,b| a.created_at <=> b.created_at } %>
|
5
|
+
<% change_notes.each do |note| %>
|
6
|
+
<li class="inline_note<%= " new" if note.new_record? %>">
|
7
|
+
<%= f.fields_for assoc_klass.name.to_relation_name, note do |note_form| %>
|
8
|
+
<% if note == change_notes.last %>
|
9
|
+
<%= note_form.label :value, assoc_klass.model_name.human(:count => 1) %>
|
10
|
+
<%= note_form.text_area :value, :rows => 5, :cols => 40 %>
|
11
|
+
|
12
|
+
<br />
|
13
|
+
|
14
|
+
<label><%= Note::Annotated::Base.model_name.human(:count => 2) %></label>
|
15
|
+
<dl class="note_annotations">
|
16
|
+
<% note.annotations.each { |na| %>
|
17
|
+
<dt><%= na.identifier %></dt>
|
18
|
+
<dd><%= na.value %></dd>
|
19
|
+
<% } %>
|
20
|
+
</dl>
|
21
|
+
|
22
|
+
<%= note_form.label :language, t("txt.common.language") %>
|
23
|
+
<%= note_form.select :language, options_for_language_select(note.language) %>
|
24
|
+
|
25
|
+
<br />
|
26
|
+
<% else %>
|
27
|
+
|
28
|
+
<label><%= t("txt.common.value") %></label>
|
29
|
+
<span><%= note.value %></span>
|
30
|
+
|
31
|
+
<dl class="note_annotations">
|
32
|
+
<% note.annotations.each { |na| %>
|
33
|
+
<dt><%= na.identifier %></dt>
|
34
|
+
<dd><%= na.value %></dd>
|
35
|
+
<% } %>
|
36
|
+
</dl>
|
37
|
+
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<%#= note_form.check_box :"_destroy" %>
|
41
|
+
<%#= note_form.label :"_destroy", t("txt.views.labels.edit.delete") %>
|
42
|
+
<% end %>
|
43
|
+
</li>
|
44
|
+
<% end %>
|
45
|
+
</ol>
|
46
|
+
<input type="button" value="<%= t("txt.common.add_note") %>" />
|
47
|
+
</fieldset>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<dt>
|
2
|
+
<% if result.owner.is_a?(Concept::Base) %>
|
3
|
+
<%= link_to "#{result.owner.pref_label.to_s} (#{result.owner.origin})", concept_path(:id => result.owner) %><br>
|
4
|
+
<% elsif result.owner.is_a?(Label::Base) %>
|
5
|
+
<%= link_to result.owner.value, label_path(:id => result.owner) %><br>
|
6
|
+
<% end %>
|
7
|
+
</dt>
|
8
|
+
<dd><%= highlight_query(excerpt(result.value, params[:query]), params[:query]) %></dd>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<%= content_for :head do -%>
|
2
|
+
<link href="<%= url_for(request.query_parameters.merge(:format => :ttl, :lang => nil, :page => @results.current_page, :only_path => false)) %>" type="text/turtle" rel="alternate" title=""/>
|
3
|
+
<link href="<%= url_for(request.query_parameters.merge(:format => :rdf, :lang => nil, :page => @results.current_page, :only_path => false)) %>" type="application/rdf+xml" rel="alternate" title=""/>
|
4
|
+
<%- end -%>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<%= render :partial => "partials/rdf_logo" %>
|
2
|
+
|
3
|
+
<%= url_for(request.query_parameters.merge(:format => nil, :lang => nil, :page => @results.current_page, :only_path => false)) %>
|
4
|
+
(<%= link_to "Turtle", url_for(request.query_parameters.merge(:format => :ttl, :lang => nil, :page => @results.current_page, :only_path => false)) %>, <%= link_to "RDF/XML", url_for(request.query_parameters.merge(:format => :rdf, :lang => nil, :page => @results.current_page, :only_path => false)) %>)
|
@@ -0,0 +1,92 @@
|
|
1
|
+
<%- if @results -%>
|
2
|
+
<%= render(:partial => 'search_results/head_contents') %>
|
3
|
+
<%- end -%>
|
4
|
+
|
5
|
+
<h2><%= t('txt.views.search_results.header') %></h2>
|
6
|
+
<%- if @results -%>
|
7
|
+
<div id="abstract_uri">
|
8
|
+
<%= render(:partial => 'search_results/rdf_links') %>
|
9
|
+
</div>
|
10
|
+
<%- end -%>
|
11
|
+
|
12
|
+
<%= form_tag(search_path, :method => :get, :class => :form, :id => 'search') do %>
|
13
|
+
<fieldset id="typecheck">
|
14
|
+
<ol>
|
15
|
+
<li>
|
16
|
+
<select name="t" class="search_type">
|
17
|
+
<%= options_for_select(Iqvoc.searchable_classes.map { |c|
|
18
|
+
[c.model_name.human(:count => 2), c.name.parameterize]
|
19
|
+
}, params[:t]) %>
|
20
|
+
</select>
|
21
|
+
</li>
|
22
|
+
<li>
|
23
|
+
<%= select_tag :qt, options_for_select([
|
24
|
+
[t('txt.views.search_results.exact'), 'exact'],
|
25
|
+
[t('txt.views.search_results.contains'), 'contains'],
|
26
|
+
[t('txt.views.search_results.ends_with'), 'ends_with'],
|
27
|
+
[t('txt.views.search_results.begins_with'), 'begins_with']
|
28
|
+
], params[:qt]) %>
|
29
|
+
</li>
|
30
|
+
</ol>
|
31
|
+
</fieldset>
|
32
|
+
|
33
|
+
<fieldset>
|
34
|
+
<ol>
|
35
|
+
<li>
|
36
|
+
<label for="q"><%= t('txt.views.search_results.search_term') %></label>
|
37
|
+
<% if Iqvoc.searchable_classes.detect {|c| c.supports_multi_query? } %>
|
38
|
+
<%= text_area_tag :q, params[:query] %>
|
39
|
+
<% else %>
|
40
|
+
<%= text_field_tag :q, params[:query] %>
|
41
|
+
<% end %>
|
42
|
+
</li>
|
43
|
+
<li>
|
44
|
+
<label for"c"><%= Iqvoc::Collection.base_class.model_name.human %></label>
|
45
|
+
<%= select_tag 'c', options_for_select(@collections.sort { |a, b| a.pref_label.to_s <=> b.pref_label.to_s }.map { |c| [c.pref_label.to_s, c.origin] }, params[:c]), :include_blank => true %>
|
46
|
+
</li>
|
47
|
+
<li>
|
48
|
+
<label><%= t('txt.views.search_results.search_languages') %>:</label>
|
49
|
+
<% @available_languages.sort.each do |lang_tag, label| %>
|
50
|
+
<%= check_box_tag "l[]", lang_tag, select_search_checkbox?(lang_tag), :id => "languages_#{lang_tag}", :class => 'lang_check' %>
|
51
|
+
<label for="languages_<%= lang_tag %>"><%= label %></label>
|
52
|
+
<% end %>
|
53
|
+
<button type="button" id="language_select_all">
|
54
|
+
<%= t('txt.views.search_results.all') %>
|
55
|
+
</button>
|
56
|
+
<button type="button" id="language_select_none">
|
57
|
+
<%= t('txt.views.search_results.none') %>
|
58
|
+
</button>
|
59
|
+
</li>
|
60
|
+
<li>
|
61
|
+
<%= submit_tag t('txt.views.search_results.submit') %>
|
62
|
+
</li>
|
63
|
+
</ol>
|
64
|
+
</fieldset>
|
65
|
+
<% end %>
|
66
|
+
<% if @results %>
|
67
|
+
<% if @results.any? %>
|
68
|
+
<h3>
|
69
|
+
<%= t('txt.views.search_results.search_results') %> (<%= @results.total_count %>)
|
70
|
+
</h3>
|
71
|
+
<% else %>
|
72
|
+
<h3><%= t('txt.views.search_results.search_results') %></h3>
|
73
|
+
<p><%= t('txt.views.search_results.no_results_found') %></p>
|
74
|
+
<% end %>
|
75
|
+
|
76
|
+
<dl id="search_results">
|
77
|
+
<% @results.each do |result| %>
|
78
|
+
<% if @klass %>
|
79
|
+
<%= render :partial => @klass.search_result_partial_name,
|
80
|
+
:locals => { :result => result } %>
|
81
|
+
<% else %>
|
82
|
+
<%= render :partial => result.class.search_result_partial_name,
|
83
|
+
:locals => { :result => result } %>
|
84
|
+
<% end %>
|
85
|
+
<% end %>
|
86
|
+
</dl>
|
87
|
+
|
88
|
+
<%= paginate @results %>
|
89
|
+
<% end %>
|
90
|
+
|
91
|
+
<%= content_for :sub_navigation do %>
|
92
|
+
<% end %>
|