iqvoc 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (376) hide show
  1. data/Gemfile +69 -0
  2. data/Gemfile.lock +134 -0
  3. data/LICENSE +13 -0
  4. data/README.md +68 -0
  5. data/Rakefile +23 -0
  6. data/app/controllers/application_controller.rb +125 -0
  7. data/app/controllers/collections/hierarchical_controller.rb +44 -0
  8. data/app/controllers/collections_controller.rb +124 -0
  9. data/app/controllers/concepts/alphabetical_controller.rb +39 -0
  10. data/app/controllers/concepts/hierarchical_controller.rb +74 -0
  11. data/app/controllers/concepts/untranslated_controller.rb +38 -0
  12. data/app/controllers/concepts/versions_controller.rb +119 -0
  13. data/app/controllers/concepts_controller.rb +174 -0
  14. data/app/controllers/dashboard_controller.rb +43 -0
  15. data/app/controllers/pages_controller.rb +22 -0
  16. data/app/controllers/rdf_controller.rb +43 -0
  17. data/app/controllers/search_results_controller.rb +101 -0
  18. data/app/controllers/triple_store_syncs_controller.rb +45 -0
  19. data/app/controllers/user_sessions_controller.rb +48 -0
  20. data/app/controllers/users_controller.rb +81 -0
  21. data/app/helpers/application_helper.rb +60 -0
  22. data/app/helpers/concepts_helper.rb +86 -0
  23. data/app/helpers/dashboard_helper.rb +46 -0
  24. data/app/helpers/rdf_helper.rb +63 -0
  25. data/app/helpers/search_results_helper.rb +32 -0
  26. data/app/models/collection/base.rb +161 -0
  27. data/app/models/collection/member/base.rb +23 -0
  28. data/app/models/collection/member/collection.rb +33 -0
  29. data/app/models/collection/member/concept.rb +33 -0
  30. data/app/models/collection/unordered.rb +18 -0
  31. data/app/models/concept/base.rb +418 -0
  32. data/app/models/concept/relation/base.rb +95 -0
  33. data/app/models/concept/relation/reverse_relation_extension.rb +49 -0
  34. data/app/models/concept/relation/skos/base.rb +37 -0
  35. data/app/models/concept/relation/skos/broader/base.rb +41 -0
  36. data/app/models/concept/relation/skos/broader/mono.rb +28 -0
  37. data/app/models/concept/relation/skos/broader/poly.rb +23 -0
  38. data/app/models/concept/relation/skos/narrower/base.rb +37 -0
  39. data/app/models/concept/relation/skos/related.rb +21 -0
  40. data/app/models/concept/skos/base.rb +28 -0
  41. data/app/models/label/base.rb +98 -0
  42. data/app/models/label/skos/base.rb +27 -0
  43. data/app/models/labeling/base.rb +81 -0
  44. data/app/models/labeling/skos/alt_label.rb +21 -0
  45. data/app/models/labeling/skos/base.rb +99 -0
  46. data/app/models/labeling/skos/hidden_label.rb +25 -0
  47. data/app/models/labeling/skos/pref_label.rb +30 -0
  48. data/app/models/match/base.rb +57 -0
  49. data/app/models/match/skos/base.rb +23 -0
  50. data/app/models/match/skos/broad_match.rb +21 -0
  51. data/app/models/match/skos/close_match.rb +21 -0
  52. data/app/models/match/skos/exact_match.rb +21 -0
  53. data/app/models/match/skos/mapping_relation.rb +21 -0
  54. data/app/models/match/skos/narrow_match.rb +21 -0
  55. data/app/models/match/skos/related_match.rb +21 -0
  56. data/app/models/note/annotated/base.rb +29 -0
  57. data/app/models/note/base.rb +127 -0
  58. data/app/models/note/skos/base.rb +52 -0
  59. data/app/models/note/skos/change_note.rb +38 -0
  60. data/app/models/note/skos/definition.rb +33 -0
  61. data/app/models/note/skos/editorial_note.rb +21 -0
  62. data/app/models/note/skos/example.rb +21 -0
  63. data/app/models/note/skos/history_note.rb +21 -0
  64. data/app/models/note/skos/scope_note.rb +21 -0
  65. data/app/models/origin_mapping.rb +58 -0
  66. data/app/models/rdf_store.rb +96 -0
  67. data/app/models/search_extension.rb +58 -0
  68. data/app/models/user.rb +49 -0
  69. data/app/models/user_session.rb +23 -0
  70. data/app/views/collections/_collection.html.erb +10 -0
  71. data/app/views/collections/_form.html.erb +47 -0
  72. data/app/views/collections/edit.html.erb +11 -0
  73. data/app/views/collections/index.html.erb +12 -0
  74. data/app/views/collections/new.html.erb +7 -0
  75. data/app/views/collections/show.html.erb +53 -0
  76. data/app/views/collections/show.iqrdf +22 -0
  77. data/app/views/concepts/_base_data.html.erb +72 -0
  78. data/app/views/concepts/_close_match.html.erb +16 -0
  79. data/app/views/concepts/_show_head.html.erb +23 -0
  80. data/app/views/concepts/_visualization.html.erb +9 -0
  81. data/app/views/concepts/alphabetical/_pref_labeling.html.erb +6 -0
  82. data/app/views/concepts/alphabetical/index.html.erb +17 -0
  83. data/app/views/concepts/edit.html.erb +32 -0
  84. data/app/views/concepts/hierarchical/_treeview.html.erb +20 -0
  85. data/app/views/concepts/hierarchical/index.html.erb +5 -0
  86. data/app/views/concepts/index.iqrdf +24 -0
  87. data/app/views/concepts/new.html.erb +3 -0
  88. data/app/views/concepts/show_published.html.erb +16 -0
  89. data/app/views/concepts/show_unpublished.html.erb +43 -0
  90. data/app/views/concepts/untranslated/index.html.erb +23 -0
  91. data/app/views/dashboard/index.html.erb +47 -0
  92. data/app/views/errors/access_denied.html.erb +3 -0
  93. data/app/views/errors/multiple_choices.html.erb +11 -0
  94. data/app/views/errors/not_found.html.erb +8 -0
  95. data/app/views/kaminari/_page.html.erb +6 -0
  96. data/app/views/kaminari/_paginator.html.erb +15 -0
  97. data/app/views/layouts/_controls.html.erb +37 -0
  98. data/app/views/layouts/_header.html.erb +1 -0
  99. data/app/views/layouts/_navigation.html.erb +27 -0
  100. data/app/views/layouts/_sections.html.erb +8 -0
  101. data/app/views/layouts/application.html.erb +83 -0
  102. data/app/views/pages/about.html.erb +77 -0
  103. data/app/views/partials/_rdf_logo.html.erb +4 -0
  104. data/app/views/partials/collection/_member.html.erb +14 -0
  105. data/app/views/partials/collection_label/_search_result.html.erb +5 -0
  106. data/app/views/partials/concept/_edit_link_base.html.erb +4 -0
  107. data/app/views/partials/concept/_inline_base.html.erb +4 -0
  108. data/app/views/partials/concept/_new_link_base.html.erb +4 -0
  109. data/app/views/partials/concept/relation/_base.html.erb +8 -0
  110. data/app/views/partials/concept/relation/_edit_base.html.erb +15 -0
  111. data/app/views/partials/concept/relation/skos/_narrower.html.erb +12 -0
  112. data/app/views/partials/concept/relation/skos/broader/_mono.html.erb +28 -0
  113. data/app/views/partials/concept/relation/skos/broader/_poly.html.erb +14 -0
  114. data/app/views/partials/labeling/skos/_base.html.erb +17 -0
  115. data/app/views/partials/labeling/skos/_edit_base.html.erb +7 -0
  116. data/app/views/partials/labeling/skos/_search_result.html.erb +12 -0
  117. data/app/views/partials/match/_base.html.erb +13 -0
  118. data/app/views/partials/match/_edit_base.html.erb +6 -0
  119. data/app/views/partials/note/_base.html.erb +15 -0
  120. data/app/views/partials/note/_edit_base.html.erb +28 -0
  121. data/app/views/partials/note/_note.html.erb +14 -0
  122. data/app/views/partials/note/_search_result.html.erb +8 -0
  123. data/app/views/partials/note/skos/_edit_change_note.html.erb +47 -0
  124. data/app/views/partials/note/skos/definition/_search_result.html.erb +8 -0
  125. data/app/views/rdf/show_concept.iqrdf +5 -0
  126. data/app/views/search_results/_head_contents.html.erb +4 -0
  127. data/app/views/search_results/_rdf_links.html.erb +4 -0
  128. data/app/views/search_results/index.html.erb +92 -0
  129. data/app/views/search_results/index.iqrdf +33 -0
  130. data/app/views/triple_store_syncs/new.html.erb +7 -0
  131. data/app/views/user_sessions/new.html.erb +11 -0
  132. data/app/views/users/_form.html.erb +45 -0
  133. data/app/views/users/_user_preference.html.erb +12 -0
  134. data/app/views/users/edit.html.erb +14 -0
  135. data/app/views/users/index.html.erb +29 -0
  136. data/app/views/users/new.html.erb +13 -0
  137. data/config/application.rb +82 -0
  138. data/config/boot.rb +29 -0
  139. data/config/database.template.yml +43 -0
  140. data/config/database.yml +40 -0
  141. data/config/deploy/common.rb +79 -0
  142. data/config/deploy/ec2.rb +43 -0
  143. data/config/deploy/history.rb +29 -0
  144. data/config/deploy/innoq.rb +37 -0
  145. data/config/deploy.rb +72 -0
  146. data/config/engine.rb +25 -0
  147. data/config/environment.rb +21 -0
  148. data/config/environments/development.rb +74 -0
  149. data/config/environments/production.rb +65 -0
  150. data/config/environments/production.template.rb +65 -0
  151. data/config/environments/production_internal.rb +65 -0
  152. data/config/environments/test.rb +51 -0
  153. data/config/initializers/action_view.rb +23 -0
  154. data/config/initializers/active_record.rb +18 -0
  155. data/config/initializers/backtrace_silencers.rb +23 -0
  156. data/config/initializers/inflections.rb +26 -0
  157. data/config/initializers/iqvoc.rb +50 -0
  158. data/config/initializers/jdbc.rb +23 -0
  159. data/config/initializers/kaminari_config.rb +8 -0
  160. data/config/initializers/language.rb +6 -0
  161. data/config/initializers/mime_types.rb +24 -0
  162. data/config/initializers/secret_token.rb +29 -0
  163. data/config/initializers/secret_token.rb.template +29 -0
  164. data/config/initializers/session_store.rb +24 -0
  165. data/config/locales/activerecord.de.yml +135 -0
  166. data/config/locales/activerecord.en.yml +135 -0
  167. data/config/locales/authlogic.de.yml +38 -0
  168. data/config/locales/authlogic.en.yml +38 -0
  169. data/config/locales/de.yml +326 -0
  170. data/config/locales/defaults.de.yml +153 -0
  171. data/config/locales/en.yml +332 -0
  172. data/config/routes.rb +53 -0
  173. data/config/warble.rb +158 -0
  174. data/db/iqvoc_test.sqlite3 +0 -0
  175. data/db/migrate/20100927101502_create_schema.rb +174 -0
  176. data/db/migrate/20101125141218_add_collection_tables.rb +32 -0
  177. data/db/migrate/20101129161528_add_type_to_collections.rb +24 -0
  178. data/db/migrate/20101202094602_add_origin_to_collections.rb +25 -0
  179. data/db/migrate/20101202135420_rename_collection_contents_to_collection_members.rb +25 -0
  180. data/db/migrate/20101208103531_add_type_to_collection_contents.rb +27 -0
  181. data/db/migrate/20101210153916_add_indexes_to_collections.rb +25 -0
  182. data/db/migrate/20110204121244_create_collection_labels.rb +32 -0
  183. data/db/migrate/20110208084250_change_origin_lengths.rb +27 -0
  184. data/db/migrate/20110328124300_discard_collection_specifics.rb +27 -0
  185. data/db/migrate/20110408120357_remove_classifications_and_classifiers.rb +32 -0
  186. data/db/migrate/20110408120740_remove_xl_specfic_stuff.rb +39 -0
  187. data/db/migrate/20110420133640_change_value_in_notes.rb +8 -0
  188. data/db/migrate/20110427120534_add_published_at_to_labels.rb +9 -0
  189. data/db/migrate/20110510162719_use_mono_hierarchy_instead_of_poly_hierarchy.rb +13 -0
  190. data/db/migrate/20110512132624_extend_notes_value_field_length.rb +8 -0
  191. data/db/migrate/20110525103100_separate_note_annotation_predicates.rb +38 -0
  192. data/db/migrate/20110615134040_change_umt_note_annotations_to_dct.rb +9 -0
  193. data/db/schema.rb +127 -0
  194. data/db/seeds.rb +37 -0
  195. data/iqvoc.gemspec +27 -0
  196. data/lib/engine_tasks/assets.rake +49 -0
  197. data/lib/engine_tasks/db.rake +18 -0
  198. data/lib/engine_tasks/release.rake +118 -0
  199. data/lib/iqvoc/ability.rb +44 -0
  200. data/lib/iqvoc/data_helper.rb +27 -0
  201. data/lib/iqvoc/deep_cloning.rb +92 -0
  202. data/lib/iqvoc/rdf_helper.rb +67 -0
  203. data/lib/iqvoc/skos_importer.rb +144 -0
  204. data/lib/iqvoc/version.rb +19 -0
  205. data/lib/iqvoc/versioning.rb +151 -0
  206. data/lib/iqvoc.rb +228 -0
  207. data/lib/maker.rb +144 -0
  208. data/lib/ojdbc14.jar +0 -0
  209. data/lib/string.rb +23 -0
  210. data/lib/tasks/importer.rake +16 -0
  211. data/lib/tasks/jdbc.rake +24 -0
  212. data/public/404.html +26 -0
  213. data/public/422.html +26 -0
  214. data/public/500.html +26 -0
  215. data/public/favicon.ico +0 -0
  216. data/public/images/iqvoc/add.png +0 -0
  217. data/public/images/iqvoc/arrow_down.gif +0 -0
  218. data/public/images/iqvoc/arrow_up.gif +0 -0
  219. data/public/images/iqvoc/footer.png +0 -0
  220. data/public/images/iqvoc/go_there.png +0 -0
  221. data/public/images/iqvoc/header.png +0 -0
  222. data/public/images/iqvoc/header_long.png +0 -0
  223. data/public/images/iqvoc/iqvoc.png +0 -0
  224. data/public/images/iqvoc/note_add.png +0 -0
  225. data/public/images/iqvoc/note_delete.png +0 -0
  226. data/public/images/iqvoc/note_edit.png +0 -0
  227. data/public/images/iqvoc/ok.png +0 -0
  228. data/public/images/iqvoc/rails.png +0 -0
  229. data/public/images/iqvoc/rdf_flyer.gif +0 -0
  230. data/public/images/iqvoc/red_arrow.png +0 -0
  231. data/public/images/iqvoc/remove.png +0 -0
  232. data/public/images/iqvoc/shadow.png +0 -0
  233. data/public/images/iqvoc/spinner.gif +0 -0
  234. data/public/images/iqvoc/tokenizer_delete.png +0 -0
  235. data/public/images/iqvoc/tokenizer_pencile.png +0 -0
  236. data/public/images/iqvoc/tokenizer_show.png +0 -0
  237. data/public/images/iqvoc/unfinished.png +0 -0
  238. data/public/javascripts/iqvoc/application.js +123 -0
  239. data/public/javascripts/iqvoc/entityselect.js +121 -0
  240. data/public/javascripts/iqvoc/excanvas.js +35 -0
  241. data/public/javascripts/iqvoc/iqvoc.js +118 -0
  242. data/public/javascripts/iqvoc/jit_rgraph.js +153 -0
  243. data/public/javascripts/iqvoc/jquery-1.6.2.min.js +18 -0
  244. data/public/javascripts/iqvoc/jquery-treeview/changelog.txt +29 -0
  245. data/public/javascripts/iqvoc/jquery-treeview/demo/async.html +44 -0
  246. data/public/javascripts/iqvoc/jquery-treeview/demo/bg.gif +0 -0
  247. data/public/javascripts/iqvoc/jquery-treeview/demo/demo.js +43 -0
  248. data/public/javascripts/iqvoc/jquery-treeview/demo/images.html +56 -0
  249. data/public/javascripts/iqvoc/jquery-treeview/demo/index.html +340 -0
  250. data/public/javascripts/iqvoc/jquery-treeview/demo/large.html +559 -0
  251. data/public/javascripts/iqvoc/jquery-treeview/demo/prerendered.html +621 -0
  252. data/public/javascripts/iqvoc/jquery-treeview/demo/screen.css +24 -0
  253. data/public/javascripts/iqvoc/jquery-treeview/demo/simple.html +82 -0
  254. data/public/javascripts/iqvoc/jquery-treeview/demo/source.php +87 -0
  255. data/public/javascripts/iqvoc/jquery-treeview/demo/source.phps +87 -0
  256. data/public/javascripts/iqvoc/jquery-treeview/images/ajax-loader.gif +0 -0
  257. data/public/javascripts/iqvoc/jquery-treeview/images/file.gif +0 -0
  258. data/public/javascripts/iqvoc/jquery-treeview/images/folder-closed.gif +0 -0
  259. data/public/javascripts/iqvoc/jquery-treeview/images/folder.gif +0 -0
  260. data/public/javascripts/iqvoc/jquery-treeview/images/minus.gif +0 -0
  261. data/public/javascripts/iqvoc/jquery-treeview/images/plus.gif +0 -0
  262. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black-line.gif +0 -0
  263. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black.gif +0 -0
  264. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default-line.gif +0 -0
  265. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default.gif +0 -0
  266. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam-line.gif +0 -0
  267. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam.gif +0 -0
  268. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray-line.gif +0 -0
  269. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray.gif +0 -0
  270. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red-line.gif +0 -0
  271. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red.gif +0 -0
  272. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.async.js +82 -0
  273. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.css +75 -0
  274. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.js +251 -0
  275. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.min.js +15 -0
  276. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.pack.js +16 -0
  277. data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.cookie.js +92 -0
  278. data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.js +3363 -0
  279. data/public/javascripts/iqvoc/jquery-treeview/todo +8 -0
  280. data/public/javascripts/iqvoc/jquery-ui-1.8.13.custom.js +3229 -0
  281. data/public/javascripts/iqvoc/jquery-ui-1.8.13.custom.min.js +163 -0
  282. data/public/javascripts/iqvoc/jquery-ui.datepicker-de.js +22 -0
  283. data/public/javascripts/iqvoc/json2.js +480 -0
  284. data/public/javascripts/iqvoc/langselect.js +73 -0
  285. data/public/javascripts/iqvoc/rails.js +132 -0
  286. data/public/javascripts/iqvoc/storage.js +122 -0
  287. data/public/javascripts/iqvoc/visualization.js +321 -0
  288. data/public/robots.txt +5 -0
  289. data/public/stylesheets/iqvoc/blueprint/ie.css +35 -0
  290. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/cross.png +0 -0
  291. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/key.png +0 -0
  292. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/tick.png +0 -0
  293. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/readme.txt +32 -0
  294. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/screen.css +97 -0
  295. data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/readme.txt +14 -0
  296. data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/screen.css +71 -0
  297. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/doc.png +0 -0
  298. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/email.png +0 -0
  299. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/external.png +0 -0
  300. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/feed.png +0 -0
  301. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/im.png +0 -0
  302. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  303. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/visited.png +0 -0
  304. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/xls.png +0 -0
  305. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/readme.txt +18 -0
  306. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/screen.css +40 -0
  307. data/public/stylesheets/iqvoc/blueprint/plugins/rtl/readme.txt +10 -0
  308. data/public/stylesheets/iqvoc/blueprint/plugins/rtl/screen.css +110 -0
  309. data/public/stylesheets/iqvoc/blueprint/print.css +29 -0
  310. data/public/stylesheets/iqvoc/blueprint/screen.css +258 -0
  311. data/public/stylesheets/iqvoc/blueprint/src/forms.css +65 -0
  312. data/public/stylesheets/iqvoc/blueprint/src/grid.css +280 -0
  313. data/public/stylesheets/iqvoc/blueprint/src/grid.png +0 -0
  314. data/public/stylesheets/iqvoc/blueprint/src/ie.css +76 -0
  315. data/public/stylesheets/iqvoc/blueprint/src/print.css +85 -0
  316. data/public/stylesheets/iqvoc/blueprint/src/reset.css +45 -0
  317. data/public/stylesheets/iqvoc/blueprint/src/typography.css +106 -0
  318. data/public/stylesheets/iqvoc/forms.css +71 -0
  319. data/public/stylesheets/iqvoc/images/back.png +0 -0
  320. data/public/stylesheets/iqvoc/images/branch.png +0 -0
  321. data/public/stylesheets/iqvoc/images/categ.png +0 -0
  322. data/public/stylesheets/iqvoc/images/categ_open.png +0 -0
  323. data/public/stylesheets/iqvoc/images/go_there.png +0 -0
  324. data/public/stylesheets/iqvoc/images/iqvoc.png +0 -0
  325. data/public/stylesheets/iqvoc/images/leaf_end.png +0 -0
  326. data/public/stylesheets/iqvoc/images/leaf_end_filled.png +0 -0
  327. data/public/stylesheets/iqvoc/images/leaf_mid.png +0 -0
  328. data/public/stylesheets/iqvoc/images/leaf_mid_filled.png +0 -0
  329. data/public/stylesheets/iqvoc/images/leaf_nothing.png +0 -0
  330. data/public/stylesheets/iqvoc/images/leaf_only.png +0 -0
  331. data/public/stylesheets/iqvoc/images/leaf_only_filled.png +0 -0
  332. data/public/stylesheets/iqvoc/images/leaf_top.png +0 -0
  333. data/public/stylesheets/iqvoc/images/leaf_top_filled.png +0 -0
  334. data/public/stylesheets/iqvoc/images/nothing.png +0 -0
  335. data/public/stylesheets/iqvoc/images/top_01.png +0 -0
  336. data/public/stylesheets/iqvoc/images/trunk.png +0 -0
  337. data/public/stylesheets/iqvoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  338. data/public/stylesheets/iqvoc/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  339. data/public/stylesheets/iqvoc/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  340. data/public/stylesheets/iqvoc/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  341. data/public/stylesheets/iqvoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  342. data/public/stylesheets/iqvoc/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  343. data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  344. data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  345. data/public/stylesheets/iqvoc/images/ui-icons_217bc0_256x240.png +0 -0
  346. data/public/stylesheets/iqvoc/images/ui-icons_2e83ff_256x240.png +0 -0
  347. data/public/stylesheets/iqvoc/images/ui-icons_469bdd_256x240.png +0 -0
  348. data/public/stylesheets/iqvoc/images/ui-icons_6da8d5_256x240.png +0 -0
  349. data/public/stylesheets/iqvoc/images/ui-icons_cd0a0a_256x240.png +0 -0
  350. data/public/stylesheets/iqvoc/images/ui-icons_d8e7f3_256x240.png +0 -0
  351. data/public/stylesheets/iqvoc/images/ui-icons_f9bd01_256x240.png +0 -0
  352. data/public/stylesheets/iqvoc/iqvoc.css +477 -0
  353. data/public/stylesheets/iqvoc/jquery-ui-1.8.13.custom.css +415 -0
  354. data/public/stylesheets/iqvoc/widgets.css +81 -0
  355. data/test/factories.rb +74 -0
  356. data/test/integration/alphabetical_test.rb +53 -0
  357. data/test/integration/authentication_test.rb +41 -0
  358. data/test/integration/browse_concepts_and_labels_test.rb +61 -0
  359. data/test/integration/browse_static_pages_test.rb +29 -0
  360. data/test/integration/client_augmentation_test.rb +42 -0
  361. data/test/integration/client_edit_concept_test.rb +72 -0
  362. data/test/integration/collection_circularity_test.rb +110 -0
  363. data/test/integration/concept_test.rb +61 -0
  364. data/test/integration/edit_concepts_test.rb +40 -0
  365. data/test/integration/note_annotations_test.rb +86 -0
  366. data/test/integration/search_test.rb +205 -0
  367. data/test/integration/tree_test.rb +31 -0
  368. data/test/integration/untranslated_test.rb +60 -0
  369. data/test/integration_test_helper.rb +45 -0
  370. data/test/performance/browsing_test.rb +25 -0
  371. data/test/test_helper.rb +29 -0
  372. data/test/unit/concept_test.rb +93 -0
  373. data/test/unit/note_test.rb +32 -0
  374. data/test/unit/origin_mapping_test.rb +70 -0
  375. data/test/unit/skos_import_test.rb +100 -0
  376. 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>&quot;. There is one URL that represents
48
+ the abstract concept plus redirections to HTML and RDF &quot;information resources&quot;,
49
+ corresponding to the &quot;accept&quot; 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 &quot;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&quot; 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,4 @@
1
+ <a href="http://www.w3.org/RDF/" title="RDF Resource Description Framework">
2
+ <%= image_tag "iqvoc/rdf_flyer.gif",
3
+ :alt => "RDF Resource Description Framework Flyer Icon" %>
4
+ </a>
@@ -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 truncate(item.pref_label.to_s, :length => 45), (item.published? ? concept_path(:id => item.origin) : concept_path(:published => 0, :id => item.origin)) %>
2
+ <%- if (item.additional_info) -%>
3
+ (<%= item.additional_info %>)
4
+ <%- end -%>
@@ -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,4 @@
1
+ <%= link_to(
2
+ t("txt.views.concepts.new", :concept_class_name => Iqvoc::Concept.base_class.model_name.human(:count => 1)),
3
+ new_concept_path(:published => 0),
4
+ :class => "button") %>
@@ -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(" &laquo; ").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,6 @@
1
+ <li>
2
+ <% fieldname = "concept[inline_#{assoc_klass.name.to_relation_name}]" %>
3
+ <%= label_tag fieldname, assoc_klass.model_name.human(:count => 2) %>
4
+ <%= text_area_tag fieldname,
5
+ owner_klass.send("inline_#{assoc_klass.name.to_relation_name}") %>
6
+ </li>
@@ -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,5 @@
1
+ Iqvoc.default_rdf_namespace_helper_methods.each do |meth|
2
+ document.namespaces(self.send(meth))
3
+ end
4
+
5
+ render_concept(document, @concept)
@@ -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 %>