iqvoc 4.13.0 → 4.14.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (324) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -1
  3. data/Gemfile +13 -16
  4. data/Gemfile.lock +415 -326
  5. data/README.md +7 -6
  6. data/app/aides/inline_data_helper.rb +3 -3
  7. data/app/aides/skos_exporter.rb +1 -1
  8. data/app/assets/javascripts/framework.js +3 -3
  9. data/app/assets/javascripts/iqvoc/hover_menues.js +14 -0
  10. data/app/assets/javascripts/iqvoc/iqvoc.js +46 -61
  11. data/app/assets/javascripts/iqvoc/manifest.js +2 -1
  12. data/app/assets/javascripts/iqvoc/treeview.js +2 -1
  13. data/app/assets/stylesheets/iqvoc/_manifest.scss +1 -0
  14. data/app/assets/stylesheets/iqvoc/_search_results.scss +14 -0
  15. data/app/assets/stylesheets/iqvoc/components/_entity_select.scss +5 -8
  16. data/app/assets/stylesheets/iqvoc/components/_simplete.scss +2 -1
  17. data/app/assets/stylesheets/iqvoc/components/_treeview.scss +1 -0
  18. data/app/assets/stylesheets/iqvoc/hacks/_hacks.scss +1 -1
  19. data/app/controllers/collections/versions_controller.rb +13 -48
  20. data/app/controllers/collections_controller.rb +16 -9
  21. data/app/controllers/concepts/alphabetical_controller.rb +2 -2
  22. data/app/controllers/concepts/hierarchical_controller.rb +9 -13
  23. data/app/controllers/concepts/scheme_controller.rb +2 -1
  24. data/app/controllers/concepts/versions_controller.rb +14 -49
  25. data/app/controllers/concepts_controller.rb +28 -18
  26. data/app/controllers/concepts_movement_controller.rb +1 -1
  27. data/app/controllers/dashboard_controller.rb +5 -5
  28. data/app/controllers/hierarchy_controller.rb +1 -1
  29. data/app/controllers/imports_controller.rb +9 -6
  30. data/app/controllers/reverse_matches_controller.rb +2 -4
  31. data/app/controllers/search_results_controller.rb +16 -19
  32. data/app/controllers/triplestore_sync_controller.rb +2 -2
  33. data/app/controllers/users_controller.rb +1 -1
  34. data/app/helpers/application_helper.rb +6 -11
  35. data/app/helpers/concepts_helper.rb +3 -3
  36. data/app/helpers/link_helper.rb +10 -6
  37. data/app/helpers/navigation_helper.rb +24 -13
  38. data/app/helpers/rdf_helper.rb +9 -5
  39. data/app/jobs/reverse_match_job.rb +8 -4
  40. data/app/models/ability.rb +7 -7
  41. data/app/models/abstract_user.rb +1 -1
  42. data/app/models/collection/base.rb +17 -8
  43. data/app/models/concept/base.rb +25 -6
  44. data/app/models/concept/relation/base.rb +1 -1
  45. data/app/models/concept/relation/reverse_relation_extension.rb +9 -5
  46. data/app/models/concept/skos/base.rb +0 -10
  47. data/app/models/concept/validations.rb +6 -4
  48. data/app/models/concerns/search_extension.rb +0 -17
  49. data/app/models/concerns/versioning.rb +2 -32
  50. data/app/models/dataset/adaptors/iqvoc/alphabetical_search_adaptor.rb +2 -2
  51. data/app/models/dataset/adaptors/iqvoc/http_adaptor.rb +3 -3
  52. data/app/models/dataset/adaptors/iqvoc/label_adaptor.rb +1 -1
  53. data/app/models/dataset/adaptors/iqvoc/search_adaptor.rb +3 -3
  54. data/app/models/export.rb +1 -1
  55. data/app/models/label/base.rb +5 -5
  56. data/app/models/labeling/skos/base.rb +14 -10
  57. data/app/models/note/base.rb +1 -1
  58. data/app/models/user.rb +2 -0
  59. data/app/models/user_session.rb +0 -3
  60. data/app/services/rdf_sync_service.rb +3 -3
  61. data/app/uploaders/rdf_uploader.rb +1 -1
  62. data/app/views/collections/_data.html.erb +2 -2
  63. data/app/views/collections/show_unpublished.html.erb +3 -11
  64. data/app/views/concepts/alphabetical/_search_result.html.erb +3 -1
  65. data/app/views/concepts/hierarchical/_treeview.html.erb +4 -1
  66. data/app/views/concepts/notifications/_referenced_concepts.html.erb +0 -1
  67. data/app/views/concepts/scheme/show.html.erb +1 -3
  68. data/app/views/concepts/show_published.html.erb +2 -0
  69. data/app/views/concepts/show_unpublished.html.erb +5 -11
  70. data/app/views/dashboard/_table.html.erb +0 -8
  71. data/app/views/errors/server_error.html.erb +1 -2
  72. data/app/views/pages/version.html.erb +1 -1
  73. data/app/views/partials/collection/_member.html.erb +1 -1
  74. data/app/views/partials/concept/_edit_link_base.html.erb +2 -2
  75. data/app/views/partials/concept/relation/_base.html.erb +4 -4
  76. data/app/views/partials/concept/relation/_edit_base.html.erb +13 -10
  77. data/app/views/partials/concept/relation/skos/_narrower.html.erb +1 -1
  78. data/app/views/partials/concept/relation/skos/broader/_mono.html.erb +2 -2
  79. data/app/views/partials/concept/relation/skos/broader/_poly.html.erb +2 -2
  80. data/app/views/partials/labeling/skos/_base.html.erb +1 -1
  81. data/app/views/partials/labeling/skos/_edit_base.html.erb +2 -1
  82. data/app/views/partials/labeling/skos/_search_result.html.erb +3 -0
  83. data/app/views/partials/match/_panel.html.erb +2 -2
  84. data/app/views/partials/notation/_base.html.erb +1 -1
  85. data/app/views/search_results/_detailed_search.html.erb +27 -0
  86. data/app/views/search_results/_form.html.erb +21 -9
  87. data/app/views/search_results/index.html.erb +4 -4
  88. data/app/views/search_results/sections/_change_note.html.erb +28 -25
  89. data/app/views/search_results/sections/_collection.html.erb +5 -5
  90. data/app/views/search_results/sections/_datasets.html.erb +8 -20
  91. data/app/views/search_results/sections/_klass.html.erb +7 -9
  92. data/app/views/search_results/sections/_languages.html.erb +4 -14
  93. data/app/views/search_results/sections/_mode.html.erb +8 -10
  94. data/app/views/search_results/sections/_options.html.erb +8 -0
  95. data/app/views/search_results/sections/_terms.html.erb +13 -10
  96. data/app/views/search_results/sections/_type.html.erb +13 -13
  97. data/config/application.rb +15 -10
  98. data/config/boot.rb +3 -3
  99. data/config/cable.yml +1 -1
  100. data/config/database.yml +17 -16
  101. data/config/database.yml.postgresql +1 -1
  102. data/config/engine.rb +1 -1
  103. data/config/environment.rb +1 -1
  104. data/config/initializers/active_record.rb +2 -0
  105. data/config/initializers/backtrace_silencers.rb +4 -3
  106. data/config/initializers/content_security_policy.rb +21 -21
  107. data/config/initializers/filter_parameter_logging.rb +6 -2
  108. data/config/initializers/inflections.rb +4 -4
  109. data/config/initializers/iqvoc.rb +1 -0
  110. data/config/initializers/permissions_policy.rb +11 -0
  111. data/config/initializers/wrap_parameters.rb +3 -3
  112. data/config/initializers/zeitwerk.rb +6 -0
  113. data/config/locales/activerecord.de.yml +2 -2
  114. data/config/locales/de.yml +18 -19
  115. data/config/locales/en.yml +16 -17
  116. data/config/locales/pt.yml +0 -7
  117. data/config/puma.rb +10 -4
  118. data/config/routes.rb +0 -4
  119. data/db/migrate/20220107114201_add_fk_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb +10 -0
  120. data/db/migrate/20231012135837_remove_locked_by.rb +6 -0
  121. data/db/schema.rb +36 -39
  122. data/iqvoc.gemspec +14 -13
  123. data/lib/iqvoc/configuration/concept.rb +2 -0
  124. data/lib/iqvoc/configuration/core.rb +13 -2
  125. data/lib/iqvoc/configuration/instance_configuration.rb +3 -3
  126. data/lib/iqvoc/environments/development.rb +23 -9
  127. data/lib/iqvoc/environments/production.rb +21 -19
  128. data/lib/iqvoc/environments/test.rb +15 -8
  129. data/lib/iqvoc/version.rb +1 -1
  130. data/lib/tasks/sync.rake +1 -1
  131. data/test/authentication.rb +1 -1
  132. data/test/controllers/concepts_movement_controller_test.rb +0 -2
  133. data/test/controllers/hierarchy_test.rb +4 -4
  134. data/test/controllers/reverse_match_test.rb +1 -1
  135. data/test/integration/client_edit_concept_test.rb +1 -1
  136. data/test/integration/collection_browsing_test.rb +45 -0
  137. data/test/integration/collection_circularity_test.rb +3 -3
  138. data/test/integration/concept_collection_assignment_test.rb +7 -7
  139. data/test/integration/create_concept_test.rb +15 -0
  140. data/test/integration/reverse_match_job_test.rb +39 -7
  141. data/test/integration/search_test.rb +12 -12
  142. data/test/integration/version_page_test.rb +26 -0
  143. data/test/integration_test_helper.rb +2 -2
  144. data/test/models/concept_test.rb +37 -0
  145. data/test/models/deep_cloning_test.rb +9 -7
  146. data/test/models/rdf_sync_test.rb +3 -3
  147. data/test/models/zeitwerk_compliance_test.rb +7 -0
  148. data/test/test_helper.rb +3 -0
  149. metadata +69 -222
  150. data/app/views/search_results/sections/_note.html.erb +0 -6
  151. data/config/initializers/new_framework_defaults_5_1.rb +0 -14
  152. data/config/initializers/sqlite3_booleans.rb +0 -1
  153. data/public/422.html +0 -58
  154. data/public/assets/fonts/FiraMono-Regular-0b6138c5b386dc9125473fd851926f29.ttf +0 -0
  155. data/public/assets/fonts/FiraMono-Regular-690950e8d89c92cba41eeeb13f1de93e.woff +0 -0
  156. data/public/assets/fonts/FiraMono-Regular-98f97ed2dbf9d94d4fa5df048434b88d.eot +0 -0
  157. data/public/assets/fonts/FiraMono-Regular.eot +0 -0
  158. data/public/assets/fonts/FiraMono-Regular.ttf +0 -0
  159. data/public/assets/fonts/FiraMono-Regular.woff +0 -0
  160. data/public/assets/fonts/FiraSans-Bold-0de5f536bd0dc370449c0c67a49a6fe7.eot +0 -0
  161. data/public/assets/fonts/FiraSans-Bold-25037ef8d155e38b5df0c242a4c6cf2d.ttf +0 -0
  162. data/public/assets/fonts/FiraSans-Bold-494219a9639084eb9528ff47f79fcda1.woff +0 -0
  163. data/public/assets/fonts/FiraSans-Bold.eot +0 -0
  164. data/public/assets/fonts/FiraSans-Bold.ttf +0 -0
  165. data/public/assets/fonts/FiraSans-Bold.woff +0 -0
  166. data/public/assets/fonts/FiraSans-BoldItalic-5b3b812df9e1cb2b1f34baad65a2bdfb.ttf +0 -0
  167. data/public/assets/fonts/FiraSans-BoldItalic-90b8087c48feff2e828f658c49de5399.eot +0 -0
  168. data/public/assets/fonts/FiraSans-BoldItalic-b10e46158d50bf9b78968112acf87310.woff +0 -0
  169. data/public/assets/fonts/FiraSans-BoldItalic.eot +0 -0
  170. data/public/assets/fonts/FiraSans-BoldItalic.ttf +0 -0
  171. data/public/assets/fonts/FiraSans-BoldItalic.woff +0 -0
  172. data/public/assets/fonts/FiraSans-Book-659d252627051e785260ba445da8930f.woff +0 -0
  173. data/public/assets/fonts/FiraSans-Book-abc65ceb7bfaed729bff7a9d1367b7d4.eot +0 -0
  174. data/public/assets/fonts/FiraSans-Book-f0410501d5ecc5fe66bcdbc02b482c81.ttf +0 -0
  175. data/public/assets/fonts/FiraSans-Book.eot +0 -0
  176. data/public/assets/fonts/FiraSans-Book.ttf +0 -0
  177. data/public/assets/fonts/FiraSans-Book.woff +0 -0
  178. data/public/assets/fonts/FiraSans-ExtraLight-140f15ee97cb2099ff01c2b57dcd1a24.woff +0 -0
  179. data/public/assets/fonts/FiraSans-ExtraLight-28e5c2679df66406ebd117fbdded6753.eot +0 -0
  180. data/public/assets/fonts/FiraSans-ExtraLight-c15de70ebceffce178cbd2e82aa2c373.ttf +0 -0
  181. data/public/assets/fonts/FiraSans-ExtraLight.eot +0 -0
  182. data/public/assets/fonts/FiraSans-ExtraLight.ttf +0 -0
  183. data/public/assets/fonts/FiraSans-ExtraLight.woff +0 -0
  184. data/public/assets/fonts/FiraSans-Italic-ac4cb18fe14a7c90f29cdd2ce499ba59.woff +0 -0
  185. data/public/assets/fonts/FiraSans-Italic-bdea00fee0da5ca9176061e00c26a0da.eot +0 -0
  186. data/public/assets/fonts/FiraSans-Italic-e7e76a0ee170fd29b5d8100753eff569.ttf +0 -0
  187. data/public/assets/fonts/FiraSans-Italic.eot +0 -0
  188. data/public/assets/fonts/FiraSans-Italic.ttf +0 -0
  189. data/public/assets/fonts/FiraSans-Italic.woff +0 -0
  190. data/public/assets/fonts/FiraSans-Light-20adaf630b690c3e3184daaeae585f22.woff +0 -0
  191. data/public/assets/fonts/FiraSans-Light-3689e18b38d335ec0c43823adb6a2984.eot +0 -0
  192. data/public/assets/fonts/FiraSans-Light-55b04531e7a9ecdf58090d70b94b68e2.ttf +0 -0
  193. data/public/assets/fonts/FiraSans-Light-SC-098407a72b7ad46f7c2480d7ac11baf2.eot +0 -0
  194. data/public/assets/fonts/FiraSans-Light-SC-82763fe2ce9e6b897556c6f3c2aceb29.woff2 +0 -0
  195. data/public/assets/fonts/FiraSans-Light-SC-c73985985f0501c1845a5185b180fe6b.woff +0 -0
  196. data/public/assets/fonts/FiraSans-Light-SC-c9563f48d9cccd91f07e46801c27130f.ttf +0 -0
  197. data/public/assets/fonts/FiraSans-Light-SC.eot +0 -0
  198. data/public/assets/fonts/FiraSans-Light-SC.ttf +0 -0
  199. data/public/assets/fonts/FiraSans-Light-SC.woff +0 -0
  200. data/public/assets/fonts/FiraSans-Light-SC.woff2 +0 -0
  201. data/public/assets/fonts/FiraSans-Light.eot +0 -0
  202. data/public/assets/fonts/FiraSans-Light.ttf +0 -0
  203. data/public/assets/fonts/FiraSans-Light.woff +0 -0
  204. data/public/assets/fonts/FiraSans-Medium-082fab59048189168006bf2e914ba8b7.woff +0 -0
  205. data/public/assets/fonts/FiraSans-Medium-11706edfe8651c355b413bd24b4b5e10.eot +0 -0
  206. data/public/assets/fonts/FiraSans-Medium-3a0dacdeaba1b4c054f2d6cb5061965d.ttf +0 -0
  207. data/public/assets/fonts/FiraSans-Medium.eot +0 -0
  208. data/public/assets/fonts/FiraSans-Medium.ttf +0 -0
  209. data/public/assets/fonts/FiraSans-Medium.woff +0 -0
  210. data/public/assets/fonts/FiraSans-MediumItalic-6c8a2646d72641226527d574a8485b66.woff +0 -0
  211. data/public/assets/fonts/FiraSans-MediumItalic-b81e92794a6878b6c578d97b3ad5e6d7.ttf +0 -0
  212. data/public/assets/fonts/FiraSans-MediumItalic-eae7f4a3c4db9fe83025909ebfae5ad9.eot +0 -0
  213. data/public/assets/fonts/FiraSans-MediumItalic.eot +0 -0
  214. data/public/assets/fonts/FiraSans-MediumItalic.ttf +0 -0
  215. data/public/assets/fonts/FiraSans-MediumItalic.woff +0 -0
  216. data/public/assets/fonts/FiraSans-Regular-537188a19aeebdd74a92e114af7a02cb.ttf +0 -0
  217. data/public/assets/fonts/FiraSans-Regular-5d6a923de9be80ff5c2995cc03d93127.woff +0 -0
  218. data/public/assets/fonts/FiraSans-Regular-db689e5fea21ed4b7890811151968dc6.eot +0 -0
  219. data/public/assets/fonts/FiraSans-Regular.eot +0 -0
  220. data/public/assets/fonts/FiraSans-Regular.ttf +0 -0
  221. data/public/assets/fonts/FiraSans-Regular.woff +0 -0
  222. data/public/assets/fonts/FiraSans-UltraLight-3baefce4c224a0f0b26cdafe37dfa55d.eot +0 -0
  223. data/public/assets/fonts/FiraSans-UltraLight-e3909a352b87f853bb464836adfd602a.ttf +0 -0
  224. data/public/assets/fonts/FiraSans-UltraLight-f7289beeaa2353caf487553ee8b8ef03.woff +0 -0
  225. data/public/assets/fonts/FiraSans-UltraLight.eot +0 -0
  226. data/public/assets/fonts/FiraSans-UltraLight.ttf +0 -0
  227. data/public/assets/fonts/FiraSans-UltraLight.woff +0 -0
  228. data/public/assets/fonts/FontAwesome.otf +0 -0
  229. data/public/assets/fonts/fontawesome-webfont.eot +0 -0
  230. data/public/assets/fonts/fontawesome-webfont.svg +0 -2671
  231. data/public/assets/fonts/fontawesome-webfont.ttf +0 -0
  232. data/public/assets/fonts/fontawesome-webfont.woff +0 -0
  233. data/public/assets/fonts/fontawesome-webfont.woff2 +0 -0
  234. data/public/assets/images/ajax-loader-30d8e72bfdae694b1938658e1b087df0.gif +0 -0
  235. data/public/assets/images/ajax-loader.gif +0 -0
  236. data/public/assets/images/iqvoc_logo-165f17a46cf0a1bf9464db9d136fb843.svg +0 -41
  237. data/public/assets/images/iqvoc_logo.svg +0 -41
  238. data/public/assets/images/treeview-default-line-5e3c0e0c48f48c23c45aef7b72c739c0.gif +0 -0
  239. data/public/assets/images/treeview-default-line.gif +0 -0
  240. data/public/assets/javascripts/bootstrap.bundle.min-68b3c2f1c1f636f947fff1229d3ffbf5.js +0 -7
  241. data/public/assets/javascripts/bootstrap.bundle.min.js +0 -42
  242. data/public/assets/javascripts/jquery-17e41799d7fba03a313ca6b67d8a0954.js +0 -26
  243. data/public/assets/javascripts/jquery-d52dc3a9171f1fc89dd0f8e35e42c9d2.js +0 -26
  244. data/public/assets/javascripts/jquery.js +0 -10875
  245. data/public/assets/javascripts/manifest-7708201f7c24d5186cd075c3317f9b70.js +0 -7311
  246. data/public/assets/javascripts/manifest-89894d9f630fa57378a0c28e2a3d9ea9.js +0 -7325
  247. data/public/assets/javascripts/manifest.js +0 -5660
  248. data/public/assets/manifest.json +0 -1
  249. data/public/assets/stylesheets/manifest-893c7de3dee9ed1295bc1b5b4c1f0c34.css +0 -13
  250. data/public/assets/stylesheets/manifest-94b7be92a9b1cfeafea4ea71af910324.css +0 -13
  251. data/public/assets/stylesheets/manifest-e576edf92efaaad86b15b565fa473d0b.css +0 -7
  252. data/public/assets/stylesheets/manifest.css +0 -14314
  253. data/public/export/12750.nt +0 -28
  254. data/public/export/17385303752427181100115432751692126521.nt +0 -28
  255. data/public/export/181196830007276319343907883650755121680.nt +0 -28
  256. data/public/export/194669028845730209313058462140064732442.nt +0 -28
  257. data/public/export/21988.nt +0 -28
  258. data/public/export/230655012044692637365356891394989635995.nt +0 -28
  259. data/public/export/233590502327750705645106563554497694497.nt +0 -28
  260. data/public/export/245884359537367641918690456207690070316.nt +0 -28
  261. data/public/export/250386066048669747259363837063223215204.nt +0 -28
  262. data/public/export/256041066575224861739818511470898486442.nt +0 -28
  263. data/public/export/287138383024694264939471429022965897163.nt +0 -28
  264. data/public/export/31892.nt +0 -28
  265. data/public/export/333774437366008328346740356666975078086.nt +0 -28
  266. data/public/export/34639390376251419382098415225771775708.nt +0 -28
  267. data/public/export/4098.nt +0 -28
  268. data/public/export/47070.nt +0 -28
  269. data/public/export/49947.nt +0 -28
  270. data/public/export/5793.nt +0 -28
  271. data/public/export/64089124325772410079516909502763866955.nt +0 -28
  272. data/public/export/64718.nt +0 -28
  273. data/public/export/71200590939430584664474292378126383577.nt +0 -28
  274. data/public/export/81965533953024918329855744567916239964.nt +0 -28
  275. data/public/favicon.ico +0 -0
  276. data/public/robots.txt +0 -5
  277. data/public/uploads/import/213b73161661ebbad4e5ee3f543ae617.nt +0 -259
  278. data/public/uploads/import/22ad4d7419b7914c7319c46a66839f77.nt +0 -259
  279. data/public/uploads/import/22b78e01b9b5876851578cf9a8373c07.nt +0 -259
  280. data/public/uploads/import/2ab75781f8141010699dd272f681b245.nt +0 -259
  281. data/public/uploads/import/4c7fe47a2c21a681fd8f0eb3af0ebf19.nt +0 -259
  282. data/public/uploads/import/5265d7cb194f017c592a68914ecf8d9f.nt +0 -259
  283. data/public/uploads/import/5cb5414a66e4ae5dbe05eb763c367bd1.nt +0 -259
  284. data/public/uploads/import/6b042e00c2e2abf9241d2ece3e67ed27.nt +0 -259
  285. data/public/uploads/import/749edd3918db157202b00f89418b87d1.nt +0 -259
  286. data/public/uploads/import/7aeb9d76b78ba67674caa53a96e1caa0.nt +0 -259
  287. data/public/uploads/import/7b7fc425b8926e586ca10d0f1385aa4e.nt +0 -259
  288. data/public/uploads/import/8319d34702375718b20e72a6af71c503.nt +0 -259
  289. data/public/uploads/import/9ec48f5aaece8d2a8770439e34199b19.nt +0 -259
  290. data/public/uploads/import/a22750632c35587057285920142c2db8.nt +0 -259
  291. data/public/uploads/import/a6d9eeb5e76ce0032614c8142a33c90b.nt +0 -259
  292. data/public/uploads/import/a7ec826e32e80d1fc61f5e89f7442199.nt +0 -259
  293. data/public/uploads/import/af2ac8cb84a194da9871ea701f915a25.nt +0 -259
  294. data/public/uploads/import/b50c67ef8cb51fa12812ac2601faaa75.nt +0 -259
  295. data/public/uploads/import/b66560ac9cc4aecd50f82d4fcec8bde4.nt +0 -259
  296. data/public/uploads/import/c1a12245a41d9105585fb48a0b5244ab.nt +0 -259
  297. data/public/uploads/import/c4b23750b9f72a7f93bcd979a9afded3.nt +0 -259
  298. data/public/uploads/import/d1edac76626a35a6e72a592c98e97b1a.nt +0 -259
  299. data/public/uploads/import/eca92dbeff4aec30e3072103bb5f565f.nt +0 -259
  300. data/public/uploads/import/f7996f8826062cd8dcfc8fac70e830b9.nt +0 -259
  301. data/public/uploads/tmp/1609926599-187261935008931-0002-5418/hobbies.nt +0 -259
  302. data/public/uploads/tmp/1610450700-516890595554445-0002-2685/hobbies.nt +0 -259
  303. data/public/uploads/tmp/1610450844-597126333235543-0001-0714/hobbies.nt +0 -259
  304. data/public/uploads/tmp/1611054155-443031323634581-0001-9192/hobbies.nt +0 -259
  305. data/public/uploads/tmp/1611225485-767301590714814-0002-6904/hobbies.nt +0 -259
  306. data/public/uploads/tmp/1611225661-919900076415463-0002-0657/hobbies.nt +0 -259
  307. data/public/uploads/tmp/1611227389-36557097935032-0002-4613/hobbies.nt +0 -259
  308. data/public/uploads/tmp/1611585376-822293462114758-0001-9752/hobbies.nt +0 -259
  309. data/public/uploads/tmp/1611585431-703460698560673-0002-7522/hobbies.nt +0 -259
  310. data/public/uploads/tmp/1611586554-483369300394995-0002-0872/hobbies.nt +0 -259
  311. data/public/uploads/tmp/1619777137-609890333749067-0002-0264/hobbies.nt +0 -259
  312. data/public/uploads/tmp/1627291050-163284787457980-0001-2701/hobbies.nt +0 -259
  313. data/public/uploads/tmp/1627291589-952446089963663-0002-3171/hobbies.nt +0 -259
  314. data/public/uploads/tmp/1627291819-788250283200541-0002-2503/hobbies.nt +0 -259
  315. data/public/uploads/tmp/1627292534-103362378955855-0001-7089/hobbies.nt +0 -259
  316. data/public/uploads/tmp/1627293799-506613299368066-0002-1247/hobbies.nt +0 -259
  317. data/public/uploads/tmp/1627293863-868842521367397-0001-4656/hobbies.nt +0 -259
  318. data/public/uploads/tmp/1636993960-338364327912413-0002-8049/hobbies.nt +0 -259
  319. data/public/uploads/tmp/1641550181-434480636271400-0002-7928/hobbies.nt +0 -259
  320. data/public/uploads/tmp/1641550416-6444469569098-0002-2156/hobbies.nt +0 -259
  321. data/public/uploads/tmp/1641550691-848542458162760-0002-6815/hobbies.nt +0 -259
  322. data/public/uploads/tmp/1641550716-647719127292471-0002-9954/hobbies.nt +0 -259
  323. data/public/uploads/tmp/1641551058-78248622355227-0002-3663/hobbies.nt +0 -259
  324. data/public/uploads/tmp/1641551220-744894908610606-0001-3879/hobbies.nt +0 -259
@@ -41,7 +41,7 @@ class AbstractUser < ApplicationRecord
41
41
  config.crypto_provider = Authlogic::CryptoProviders::SCrypt
42
42
  end
43
43
 
44
- def self.default_role
44
+ def self.default_user_role
45
45
  'reader'
46
46
  end
47
47
 
@@ -42,6 +42,16 @@ class Collection::Base < Concept::Base
42
42
  through: :parent_collection_members,
43
43
  source: 'collection'
44
44
 
45
+ has_many :concepts,
46
+ -> { where("concepts.type = ?", Iqvoc::Concept.base_class) },
47
+ through: :members,
48
+ source: :target
49
+
50
+ has_many :subcollections,
51
+ -> { where("concepts.type = ?", Iqvoc::Collection.base_class) },
52
+ through: :members,
53
+ source: :target
54
+
45
55
  include_to_deep_cloning(:members)
46
56
 
47
57
  # ********** Hooks
@@ -57,6 +67,13 @@ class Collection::Base < Concept::Base
57
67
 
58
68
  validate :circular_subcollections
59
69
 
70
+ def self.with_pref_labels
71
+ preload(:pref_labels)
72
+ .joins(:pref_labels)
73
+ .references(:collection_members)
74
+ .distinct
75
+ end
76
+
60
77
  def self.by_origin(origin)
61
78
  where(origin: origin)
62
79
  end
@@ -91,14 +108,6 @@ class Collection::Base < Concept::Base
91
108
  'collection_path'
92
109
  end
93
110
 
94
- def subcollections
95
- members.map(&:target).compact.select { |m| m.is_a?(::Collection::Base) }
96
- end
97
-
98
- def concepts
99
- members.map(&:target).compact.reject { |m| m.is_a?(::Collection::Base) }
100
- end
101
-
102
111
  def to_param
103
112
  origin
104
113
  end
@@ -289,6 +289,16 @@ class Concept::Base < ApplicationRecord
289
289
  through: :alt_labelings,
290
290
  source: :target
291
291
 
292
+ has_many :hidden_labelings,
293
+ foreign_key: 'owner_id',
294
+ class_name: Iqvoc::Concept.hidden_labeling_class_name,
295
+ inverse_of: :owner
296
+
297
+ has_many :hidden_labels,
298
+ -> { order(:value) },
299
+ through: :hidden_labelings,
300
+ source: :target
301
+
292
302
  Iqvoc::Concept.labeling_class_names.each do |labeling_class_name, languages|
293
303
  has_many labeling_class_name.to_relation_name,
294
304
  foreign_key: 'owner_id',
@@ -358,6 +368,15 @@ class Concept::Base < ApplicationRecord
358
368
 
359
369
  # ********** Scopes
360
370
 
371
+ def self.expired(time = Time.now)
372
+ where(arel_table[:expired_at].lteq(time))
373
+ end
374
+
375
+ def self.not_expired(time = Time.now)
376
+ col = arel_table[:expired_at]
377
+ where((col.eq(nil)).or(col.gt(time)))
378
+ end
379
+
361
380
  def self.tops
362
381
  where(top_term: true)
363
382
  end
@@ -376,13 +395,13 @@ class Concept::Base < ApplicationRecord
376
395
  end
377
396
 
378
397
  def self.with_pref_labels
379
- includes(:pref_labels).
380
- order(Arel.sql("LOWER(#{Label::Base.table_name}.value)")).
381
- where(labelings: { type: Iqvoc::Concept.pref_labeling_class_name }) # This line is just a workaround for a Rails Bug. TODO: Delete it when the Bug is fixed
398
+ preload(:pref_labels)
399
+ .joins(:pref_labels)
400
+ .order(Arel.sql("LOWER(#{Label::Base.table_name}.value)"))
382
401
  end
383
402
 
384
403
  def self.for_dashboard
385
- unpublished_or_follow_up.includes(:pref_labels, :locking_user)
404
+ unpublished_or_follow_up.includes(:pref_labels)
386
405
  end
387
406
 
388
407
  def self.parentless
@@ -506,7 +525,7 @@ class Concept::Base < ApplicationRecord
506
525
  @labels ||= labelings.each_with_object({}) do |labeling, hash|
507
526
  ((hash[labeling.class.name.to_s] ||= {})[labeling.target.language] ||= []) << labeling.target if labeling.target
508
527
  end
509
- ((@labels && @labels[labeling_class] && @labels[labeling_class][lang]) || []).select{ |l| l.published? || !only_published }.sort_by(&:value)
528
+ ((@labels && @labels[labeling_class] && @labels[labeling_class][lang]) || []).select{ |l| l.published? || !only_published }
510
529
  end
511
530
 
512
531
  def related_concepts_for_relation_class(relation_class, only_published = true)
@@ -556,7 +575,7 @@ class Concept::Base < ApplicationRecord
556
575
  end
557
576
 
558
577
  def expired?
559
- self.expired_at && self.expired_at < Date.today
578
+ self.expired_at && self.expired_at <= Date.today
560
579
  end
561
580
 
562
581
  private
@@ -73,7 +73,7 @@ class Concept::Relation::Base < ApplicationRecord
73
73
  end
74
74
 
75
75
  def self.target_in_edit_mode
76
- joins(:target).merge(Concept::Base.in_edit_mode).references(:concepts)
76
+ joins(:target).merge(Concept::Base.unpublished).references(:concepts)
77
77
  end
78
78
 
79
79
  # ********* Methods
@@ -25,9 +25,11 @@ module Concept
25
25
  attributes = attributes.except(:rank) unless relation_class.rankable?
26
26
  scope.any? || scope.create!(attributes)
27
27
 
28
- # The reverse direction
29
- scope = relation_class.reverse_relation_class.where(owner_id: target_concept.id, target_id: proxy_association.owner.id)
30
- scope.any? || scope.create!(attributes)
28
+ if relation_class.bidirectional?
29
+ # The reverse direction
30
+ scope = relation_class.reverse_relation_class.where(owner_id: target_concept.id, target_id: proxy_association.owner.id)
31
+ scope.any? || scope.create!(attributes)
32
+ end
31
33
  end
32
34
  end
33
35
 
@@ -38,8 +40,10 @@ module Concept
38
40
  relation.destroy
39
41
  end
40
42
 
41
- relation_class.reverse_relation_class.where(owner_id: target_concept.id, target_id: proxy_association.owner.id).load.each do |relation|
42
- relation.destroy
43
+ if relation_class.bidirectional?
44
+ relation_class.reverse_relation_class.where(owner_id: target_concept.id, target_id: proxy_association.owner.id).load.each do |relation|
45
+ relation.destroy
46
+ end
43
47
  end
44
48
  end
45
49
  end
@@ -31,16 +31,6 @@ class Concept::SKOS::Base < Concept::Base
31
31
  return subject
32
32
  end
33
33
 
34
- # ********** Scopes
35
- def self.expired(time = Time.now)
36
- where(arel_table[:expired_at].lt(time))
37
- end
38
-
39
- def self.not_expired(time = Time.now)
40
- col = arel_table[:expired_at]
41
- where((col.eq(nil)).or(col.gteq(time)))
42
- end
43
-
44
34
  def self.recent(limit = 5)
45
35
  self
46
36
  .published
@@ -91,10 +91,12 @@ module Concept
91
91
  if validatable_for_publishing?
92
92
  alt_labels = alt_labelings.collect { |l| l.target }
93
93
 
94
- if alt_labels.include? pref_label
95
- errors.add :base,
96
- I18n.t('txt.models.concept.pref_label_defined_in_alt_labels',
97
- label: pref_label.value)
94
+ pref_labels.each do |pref_label|
95
+ if alt_labels.include? pref_label
96
+ errors.add :base,
97
+ I18n.t('txt.models.concept.pref_label_defined_in_alt_labels',
98
+ label: pref_label.value)
99
+ end
98
100
  end
99
101
  end
100
102
  end
@@ -22,27 +22,10 @@ module SearchExtension
22
22
  end
23
23
 
24
24
  module ClassMethods
25
- def multi_query(params = {})
26
- query_terms = params[:query].split(/\r\n/)
27
- results = []
28
- query_terms.each do |term|
29
- results << { query: term, result: single_query(params.merge({ query: term })) }
30
- end
31
- results
32
- end
33
-
34
25
  def single_query(params = {})
35
26
  raise NotImplementedError.new("Implement self.single_query in your specific class (#{self.name}) that should be searchable!")
36
27
  end
37
28
 
38
- def supports_multi_query?
39
- false
40
- end
41
-
42
- def forces_multi_query?
43
- false
44
- end
45
-
46
29
  def build_query_string(params = {})
47
30
  query_str = params[:query].strip
48
31
  query_str = "%#{query_str}" if ['contains', 'ends_with'].include?(params[:query_type].to_s)
@@ -25,11 +25,6 @@ module Versioning
25
25
  class_name: name,
26
26
  optional: true
27
27
 
28
- belongs_to :locking_user,
29
- foreign_key: 'locked_by',
30
- class_name: 'AbstractUser',
31
- optional: true
32
-
33
28
  after_initialize do
34
29
  disable_validations_for_publishing
35
30
  end
@@ -37,7 +32,7 @@ module Versioning
37
32
 
38
33
  module ClassMethods
39
34
  def by_origin(origin)
40
- where(origin: origin)
35
+ default_scoped.where(origin: origin)
41
36
  end
42
37
 
43
38
  def published
@@ -48,10 +43,6 @@ module Versioning
48
43
  where(published_at: nil)
49
44
  end
50
45
 
51
- def locked
52
- where(arel_table[:locked_by].not_eq(nil))
53
- end
54
-
55
46
  def published_with_newer_versions
56
47
  # published objects without objects which have a new one in editing
57
48
  published_objects = arel_table[:published_at].not_eq(nil).and(arel_table[:origin].not_in(unpublished.map(&:origin)))
@@ -70,10 +61,6 @@ module Versioning
70
61
  )
71
62
  end
72
63
 
73
- def in_edit_mode
74
- where(arel_table[:locked_by].not_eq(nil))
75
- end
76
-
77
64
  def unpublished_or_follow_up
78
65
  where(
79
66
  arel_table[:published_at].eq(nil).or(
@@ -99,9 +86,8 @@ module Versioning
99
86
  end
100
87
  end # module ClassMethods
101
88
 
102
- def branch(user)
89
+ def branch
103
90
  new_version = self.deep_clone(include: self.class.includes_to_deep_cloning)
104
- new_version.lock_by_user(user.id)
105
91
  new_version.increment(:rev)
106
92
  new_version.published_version_id = self.id
107
93
  new_version.unpublish
@@ -114,20 +100,10 @@ module Versioning
114
100
  published? || read_attribute(:published_version_id).blank?
115
101
  end
116
102
 
117
- def lock_by_user(user_id)
118
- tap do
119
- write_attribute(:locked_by, user_id)
120
- end
121
- end
122
-
123
103
  def never_published?
124
104
  unpublished? && rev == 1
125
105
  end
126
106
 
127
- def locked?
128
- locked_by?
129
- end
130
-
131
107
  def state
132
108
  if published?
133
109
  I18n.t('txt.common.state.published')
@@ -138,12 +114,6 @@ module Versioning
138
114
  end
139
115
  end
140
116
 
141
- def unlock
142
- tap do
143
- write_attribute(:locked_by, nil)
144
- end
145
- end
146
-
147
117
  def in_review?
148
118
  read_attribute(:to_review).present?
149
119
  end
@@ -12,8 +12,8 @@ class Dataset::Adaptors::Iqvoc::AlphabeticalSearchAdaptor < Dataset::Adaptors::I
12
12
  while more = @doc.at_css('a[rel=next]')
13
13
  fetch_results(more[:href], {})
14
14
  end
15
- rescue Faraday::Error::ConnectionFailed,
16
- Faraday::Error::ResourceNotFound => e
15
+ rescue Faraday::ConnectionFailed,
16
+ Faraday::ResourceNotFound => e
17
17
  Rails.logger.warn("HTTP error while querying remote source #{url}: #{e.message}")
18
18
  return nil
19
19
  end
@@ -1,6 +1,6 @@
1
1
  require 'faraday'
2
2
 
3
- class Dataset::Adaptors::Iqvoc::HTTPAdaptor
3
+ class Dataset::Adaptors::Iqvoc::HttpAdaptor
4
4
  DEFAULT_TIMEOUT = 5.freeze
5
5
  attr_reader :url
6
6
 
@@ -15,8 +15,8 @@ class Dataset::Adaptors::Iqvoc::HTTPAdaptor
15
15
  def http_get(path, redirect_count = 0)
16
16
  begin
17
17
  response = @conn.get(path)
18
- rescue Faraday::Error::ConnectionFailed,
19
- Faraday::Error::ResourceNotFound => e
18
+ rescue Faraday::ConnectionFailed,
19
+ Faraday::ResourceNotFound => e
20
20
  return failed_request(path)
21
21
  end
22
22
 
@@ -1,4 +1,4 @@
1
- class Dataset::Adaptors::Iqvoc::LabelAdaptor < Dataset::Adaptors::Iqvoc::HTTPAdaptor
1
+ class Dataset::Adaptors::Iqvoc::LabelAdaptor < Dataset::Adaptors::Iqvoc::HttpAdaptor
2
2
  def find(concept_url)
3
3
  path = URI.parse(concept_url).path
4
4
  if response = http_get(path)
@@ -1,4 +1,4 @@
1
- class Dataset::Adaptors::Iqvoc::SearchAdaptor < Dataset::Adaptors::Iqvoc::HTTPAdaptor
1
+ class Dataset::Adaptors::Iqvoc::SearchAdaptor < Dataset::Adaptors::Iqvoc::HttpAdaptor
2
2
  def search(raw_params = {})
3
3
  languages = raw_params.fetch(:languages, I18n.locale)
4
4
  languages = Array.wrap(languages).flatten.join(',')
@@ -24,8 +24,8 @@ class Dataset::Adaptors::Iqvoc::SearchAdaptor < Dataset::Adaptors::Iqvoc::HTTPAd
24
24
  while more = @doc.at_css('a[rel=next]')
25
25
  fetch_results(more[:href], {})
26
26
  end
27
- rescue Faraday::Error::ConnectionFailed,
28
- Faraday::Error::ResourceNotFound => e
27
+ rescue Faraday::ConnectionFailed,
28
+ Faraday::ResourceNotFound => e
29
29
  Rails.logger.warn("HTTP error while querying remote source #{path}: #{e.message}")
30
30
  return nil
31
31
  end
data/app/models/export.rb CHANGED
@@ -27,6 +27,6 @@ class Export < ApplicationRecord
27
27
  private
28
28
 
29
29
  def delete_dump_file
30
- File.delete(build_filename) if File.exists?(build_filename)
30
+ File.delete(build_filename) if File.exist?(build_filename)
31
31
  end
32
32
  end
@@ -82,7 +82,7 @@ class Label::Base < ApplicationRecord
82
82
  end
83
83
 
84
84
  def self.by_query_value(query)
85
- where(["LOWER(#{table_name}.value) LIKE ?", query.mb_chars.downcase.to_s])
85
+ where(["#{table_name}.value ILIKE ?", query.mb_chars.downcase.to_s])
86
86
  end
87
87
 
88
88
  # Attention: This means that even label classes without version controll will also
@@ -101,6 +101,10 @@ class Label::Base < ApplicationRecord
101
101
  true
102
102
  end
103
103
 
104
+ def expired?
105
+ self.expired_at && self.expired_at < Date.today
106
+ end
107
+
104
108
  def <=>(other)
105
109
  self.to_s.downcase <=> other.to_s.downcase
106
110
  end
@@ -122,10 +126,6 @@ class Label::Base < ApplicationRecord
122
126
  end
123
127
 
124
128
  def to_s
125
- if (language.presence || 'none') != I18n.locale.to_s
126
- value.to_s + " [#{I18n.t('txt.common.translation_missing_for')} '#{I18n.locale}']"
127
- else
128
129
  value.to_s
129
- end
130
130
  end
131
131
  end
@@ -69,16 +69,20 @@ class Labeling::SKOS::Base < Labeling::Base
69
69
  scope = scope.includes(:owner)
70
70
 
71
71
  scope = case params[:for]
72
- when 'concept'
73
- scope.where('concepts.type' => Iqvoc::Concept.base_class_name).
74
- references(:concepts)
75
- when 'collection'
76
- scope.where('concepts.type' => Iqvoc::Collection.base_class_name).
77
- references(:concepts)
78
- else
79
- # no additional conditions
80
- scope
81
- end
72
+ when 'concept'
73
+ scope.merge(Iqvoc::Concept.base_class.published)
74
+ when 'collection'
75
+ scope.merge(Iqvoc::Collection.base_class.published)
76
+ else
77
+ # no additional conditions
78
+ scope
79
+ end
80
+
81
+ scope = if params[:include_expired]
82
+ scope.merge(Concept::Base.not_expired).or(scope.merge(Concept::Base.expired))
83
+ else
84
+ scope.merge(Concept::Base.not_expired)
85
+ end
82
86
 
83
87
  if params[:change_note_date_from].present? || params[:change_note_date_to].present?
84
88
  change_note_relation = Iqvoc.change_note_class_name.to_relation_name
@@ -73,7 +73,7 @@ class Note::Base < ApplicationRecord
73
73
  end
74
74
 
75
75
  def self.by_query_value(query)
76
- where(["LOWER(#{table_name}.value) LIKE ?", query.mb_chars.downcase.to_s])
76
+ where(["#{table_name}.value ILIKE ?", query.mb_chars.downcase.to_s])
77
77
  end
78
78
 
79
79
  def self.by_owner_type(klass)
data/app/models/user.rb CHANGED
@@ -3,6 +3,8 @@ class User < AbstractUser
3
3
 
4
4
  validates_inclusion_of :role, in: ROLES
5
5
  validates_length_of :forename, :surname, within: 2..255
6
+ validates_presence_of :email
7
+ validates_format_of :email, with: URI::MailTo::EMAIL_REGEXP
6
8
 
7
9
  def name
8
10
  "#{forename} #{surname}"
@@ -15,7 +15,4 @@
15
15
  # limitations under the License.
16
16
 
17
17
  class UserSession < Authlogic::Session::Base
18
- def to_key
19
- new_record? ? nil : [ self.send(self.class.primary_key) ]
20
- end
21
18
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
- class RDFSyncService
3
+ class RdfSyncService
4
4
  delegate :url_helpers, to: 'Rails.application.routes'
5
5
 
6
6
  ADAPTORS = { # XXX: inappropriate?
@@ -105,11 +105,11 @@ class RDFSyncService
105
105
  end
106
106
  end
107
107
 
108
- module RDFSyncService::Helper # TODO: rename -- XXX: does not belong here!?
108
+ module RdfSyncService::Helper # TODO: rename -- XXX: does not belong here!?
109
109
  def triplestore_syncer
110
110
  base_url = root_url(lang: nil) # XXX: brittle in the face of future changes?
111
111
 
112
- return RDFSyncService.new(base_url, Iqvoc.config['triplestore.url'],
112
+ return RdfSyncService.new(base_url, Iqvoc.config['triplestore.url'],
113
113
  username: Iqvoc.config['triplestore.username'].presence,
114
114
  password: Iqvoc.config['triplestore.password'].presence,
115
115
  view_context: view_context) # fugly, but necessary; cf. RDFSync#serialize
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  class RdfUploader < Base
4
- def extension_white_list
4
+ def extension_allowlist
5
5
  %w(nt)
6
6
  end
7
7
  end
@@ -28,7 +28,7 @@
28
28
  </h2>
29
29
  <div class="relation-body">
30
30
  <ul>
31
- <%- collection.concepts.sort {|a, b| a.pref_label.to_s <=> b.pref_label.to_s }.each do |concept| -%>
31
+ <%- collection.concepts.with_pref_labels.each do |concept| -%>
32
32
  <%- if concept.published? || (!concept.published_version_id && can?(:update, concept)) -%>
33
33
  <li><%= render concept.class.inline_partial_name, :concept => concept %></li>
34
34
  <%- end -%>
@@ -47,6 +47,6 @@
47
47
  <% end %>
48
48
  </h2>
49
49
  <ul class="hybrid-treeview" data-url="<%= collections_path(:format => :json) %>">
50
- <%= render :partial => 'collection', :collection => collection.subcollections.sort {|a, b| a.pref_label <=> b.pref_label } %>
50
+ <%= render :partial => 'collection', :collection => collection.subcollections.with_pref_labels %>
51
51
  </ul>
52
52
  </div>
@@ -3,9 +3,6 @@
3
3
 
4
4
  <%= alert :info, :header => t('txt.common.unpublished_version') + "." do %>
5
5
  <%= t("txt.views.versioning.current_revision", :rev => @collection.rev) %>
6
- <% if @collection.locked? %>
7
- <%= t("txt.views.versioning.in_ongoing_editing_by", :user => @collection.locking_user.name) %>
8
- <% end %>
9
6
  <% end %>
10
7
 
11
8
  <div class="editing_versioning_toolbar">
@@ -24,15 +21,10 @@
24
21
  collection_versions_to_review_path(:origin => @collection.origin), :class => 'btn btn-outline-secondary' %>
25
22
  <% end %>
26
23
 
27
- <% if @collection.locked? %>
28
- <%= button_to t("txt.views.versioning.unlock"),
29
- collection_versions_unlock_path(:origin => @collection.origin), :class => 'btn btn-outline-secondary' if can?(:unlock, @collection) %>
24
+ <% if can?(:update, @collection) %>
30
25
  <%= link_to t("txt.views.versioning.edit_mode"),
31
- edit_collection_path(:published => 0, :id => @collection.origin),
32
- :class => 'btn btn-outline-secondary' if can?(:update, @collection) %>
33
- <% else %>
34
- <%= button_to t("txt.views.versioning.to_edit_mode"),
35
- collection_versions_lock_path(:origin => @collection.origin), :class => 'btn btn-outline-secondary' if can?(:lock, @collection) %>
26
+ edit_collection_path(:published => 0, :id => @collection.origin),
27
+ :class => 'btn btn-outline-secondary' %>
36
28
  <% end %>
37
29
 
38
30
  <% if can?(:destroy, @collection) %>
@@ -2,7 +2,9 @@
2
2
  <p>
3
3
  <%= link_to result.label.to_s, rdf_path(result.concept, lang: nil, format: nil),
4
4
  alt: result.concept.origin, data: { 'resource-path': result.path, 'resource-url': rdf_url(result.concept, lang: nil, format: nil) }, class: 'concept-item-link' %>
5
- <a href="<%= glance_concept_url(result.concept, format: :html) %>" class="dashboard-glance-link"><i class="fa fa-search-plus"></i></a>
5
+ <% if Iqvoc.concept_modal_preview_enabled? %>
6
+ <a href="<%= glance_concept_url(result.concept, format: :html) %>" class="dashboard-glance-link"><i class="fa fa-search-plus"></i></a>
7
+ <% end %>
6
8
 
7
9
  <% if result.concept.additional_info.present? %>
8
10
  <span class="additional_info">(<%= result.concept.additional_info %>)</span>
@@ -3,11 +3,14 @@
3
3
  <ul class="hybrid-treeview" data-url="<%= hcpath %>"
4
4
  data-dragabble="true"
5
5
  data-polyhierarchy-support="<%= Iqvoc::Concept.root_class.instance.poly_hierarchy? %>"
6
+ data-concept-modal-preview-enabled="<%= Iqvoc.concept_modal_preview_enabled? %>"
6
7
  data-save-label="<%= t('txt.common.move') %>"
7
8
  data-copy-label="<%= t('txt.common.copy') %>"
8
9
  data-undo-label="<%= t('txt.common.reset') %>">
9
10
  <% else %>
10
- <ul class="hybrid-treeview" data-url="<%= hcpath %>">
11
+ <ul class="hybrid-treeview"
12
+ data-url="<%= hcpath %>"
13
+ data-concept-modal-preview-enabled="<%= Iqvoc.concept_modal_preview_enabled? %>">
11
14
  <% end %>
12
15
  <% concepts.select { |c| can? :read, c }.each do |concept| %>
13
16
  <% if params[:published] == '0' %>
@@ -6,7 +6,6 @@
6
6
  <%= concept_relation.class.model_name.human %>
7
7
  <%= link_to(concept_relation.target.pref_label.to_s,
8
8
  concept_path(:published => 0, :id => concept_relation.target)) %>
9
- <%= t("txt.common.editor") %> <%= user_details(concept_relation.target.locking_user) %>
10
9
  </li>
11
10
  <% end %>
12
11
  </ul>
@@ -8,9 +8,7 @@
8
8
  <% end %>
9
9
 
10
10
  <% Iqvoc::Concept.labeling_classes.each do |labeling_class, languages| %>
11
- <% (languages || Iqvoc.available_languages).each do |lang| %>
12
- <%= render labeling_class.partial_name(@scheme), klass: labeling_class, concept: @scheme, available_languages: languages || Iqvoc.available_languages %>
13
- <% end %>
11
+ <%= render labeling_class.partial_name(@scheme), klass: labeling_class, concept: @scheme, available_languages: languages || Iqvoc.available_languages %>
14
12
  <% end %>
15
13
 
16
14
  <div class="relation panel">
@@ -1,6 +1,8 @@
1
1
  <%= render 'header', :concept => @concept %>
2
2
  <%= render 'concepts/sidebars/singular', :concept => @concept %>
3
3
 
4
+ <%= error_messages_for @concept %>
5
+
4
6
  <% if @new_concept_version.blank? && can?(:branch, @concept) %>
5
7
  <% if @jobs && @jobs.any? %>
6
8
  <%= render partial: 'partials/concept/reverse_match_notice', locals: {concept: @concept, jobs: @jobs} %>
@@ -1,11 +1,10 @@
1
1
  <%= render 'header', :concept => @concept %>
2
2
  <%= render 'concepts/sidebars/singular', :concept => @concept %>
3
3
 
4
+ <%= error_messages_for @concept %>
5
+
4
6
  <%= alert :info, :header => t('txt.common.unpublished_version') + "." do %>
5
7
  <%= t("txt.views.versioning.current_revision", :rev => @concept.rev) %>
6
- <% if @concept.locked? %>
7
- <%= t("txt.views.versioning.in_ongoing_editing_by", :user => @concept.locking_user.name) %>
8
- <% end %>
9
8
  <% end %>
10
9
 
11
10
  <% if @jobs && @jobs.any? %>
@@ -28,15 +27,10 @@
28
27
  concept_versions_to_review_path(:origin => @concept.origin), :class => 'btn btn-outline-secondary' %>
29
28
  <% end %>
30
29
 
31
- <% if @concept.locked? %>
32
- <%= button_to t("txt.views.versioning.unlock"),
33
- concept_versions_unlock_path(:origin => @concept.origin), :class => 'btn btn-outline-secondary' if can?(:unlock, @concept) %>
30
+ <% if can?(:update, @concept) %>
34
31
  <%= link_to t("txt.views.versioning.edit_mode"),
35
- edit_concept_path(:published => 0, :id => @concept.origin),
36
- :class => 'btn btn-outline-secondary' if can?(:update, @concept) %>
37
- <% elsif can?(:lock, @concept) %>
38
- <%= button_to t("txt.views.versioning.to_edit_mode"),
39
- concept_versions_lock_path(:origin => @concept.origin), :class => 'btn btn-outline-secondary' %>
32
+ edit_concept_path(:published => 0, :id => @concept.origin),
33
+ :class => 'btn btn-outline-secondary' if can?(:update, @concept) %>
40
34
  <% end %>
41
35
 
42
36
  <% if can?(:destroy, @concept) %>