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
data/README.md CHANGED
@@ -75,10 +75,11 @@ fork.
75
75
  4. Create the necessary tables by running `rake db:migrate`
76
76
  5. Load some base data by running `rake db:seed`
77
77
  6. Make sure you have got `config/secrets.yml` in place
78
- 7. Boot up the app using `bundle exec rails s` (or `passenger start`
79
- if you use passenger)
80
- 8. Log in with "admin@iqvoc" / "admin" or "demo@iqvoc" / "cooluri" (cf. step #5)
81
- 9. Visit the Users section and change the default passwords
78
+ 7. Install nodejs dependencies for compiling assets: `npm install` (make sure nodejs is installed)
79
+ 8. Compile assets using: `npm run compile` (or `npm run watch` to compile and listen for changes in development)
80
+ 8. Boot up the app using `bundle exec rails s` (or `passenger start` if you use passenger)
81
+ 9. Log in with "admin@iqvoc" / "admin123" or "demo@iqvoc" / "cooluri123" (cf. step #5)
82
+ 10. Visit the Users section and change the default passwords
82
83
 
83
84
  ## Background Jobs
84
85
 
@@ -98,7 +99,7 @@ $ rake jobs:workoff
98
99
 
99
100
  ## Compatibility
100
101
 
101
- iQvoc is fully compatible with Ruby 2.5 and 2.6.
102
+ iQvoc is fully compatible with Ruby 2.6.
102
103
 
103
104
  ## Customization
104
105
 
@@ -144,7 +145,7 @@ If you want to help out there are several options:
144
145
  If you make changes to existing code please make sure that the test suite stays
145
146
  green. Please include tests to your additional contributions.
146
147
 
147
- Tests can be run via `bundle exec rake test`. We're using Poltergeist for
148
+ Tests can be run via `bundle exec rake test`. We're using Cuprite for
148
149
  integration tests with JavaScript support.
149
150
 
150
151
  ## Maintainer & Contributors
@@ -29,14 +29,14 @@ class InlineDataHelper
29
29
  options = CSV_OPTIONS.clone
30
30
  options[:col_sep] = options[:col_sep].strip
31
31
  begin
32
- values = inline_values.parse_csv(options)
32
+ values = inline_values.parse_csv(**options)
33
33
  rescue CSV::MalformedCSVError => exc
34
- values = inline_values.parse_csv(CSV_OPTIONS)
34
+ values = inline_values.parse_csv(**CSV_OPTIONS)
35
35
  end
36
36
  values ? values.compact.map(&:strip) : []
37
37
  end
38
38
 
39
39
  def self.generate_inline_values(values)
40
- values.to_csv(CSV_OPTIONS).strip
40
+ values.to_csv(**CSV_OPTIONS).strip
41
41
  end
42
42
  end
@@ -98,7 +98,7 @@ class SkosExporter
98
98
 
99
99
  # When in single query mode, AR handles ALL includes to be loaded by that
100
100
  # one query. We don't want that! So let's do it manually :-)
101
- ActiveRecord::Associations::Preloader.new.preload(concepts,
101
+ Iqvoc::Concept.base_class.preload(concepts,
102
102
  Iqvoc::Concept.base_class.default_includes + [
103
103
  :matches,
104
104
  :collection_members,
@@ -1,5 +1,5 @@
1
1
  import 'document-register-element/build/document-register-element.js';
2
2
  import 'jquery-ujs/src/rails';
3
- import 'bootstrap-datepicker/js/bootstrap-datepicker';;
4
- import 'bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js';;
5
- import 'simplete/simplete';
3
+ import 'bootstrap-datepicker/js/bootstrap-datepicker';
4
+ import 'bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js';
5
+ import 'simplete/simplete';
@@ -0,0 +1,14 @@
1
+ (function($) {
2
+ "use strict";
3
+
4
+ $(function() {
5
+ $('ul.navbar-nav li.dropdown').hover(function() {
6
+ $(this).find('.dropdown-menu').stop(true, true).delay(100).show();
7
+ $(this).find('> .nav-link').addClass('hover')
8
+ }, function() {
9
+ $(this).find('.dropdown-menu').stop(true, true).delay(100).hide();
10
+ $(this).find('> .nav-link').removeClass('hover')
11
+ });
12
+ });
13
+
14
+ }(jQuery));
@@ -9,52 +9,57 @@ jQuery(document).ready(function($) {
9
9
  var locale = document.documentElement.getAttribute("lang");
10
10
 
11
11
  var langWidget = $("ul.lang-widget")[0];
12
- // primary language (converting links to radio buttons)
13
- $("a", langWidget).each(function(i, node) {
14
- var link = $(node);
15
- var el = link.closest("li");
16
- var btn = $('<input type="radio" name="primary_language">');
17
- if(link.hasClass("active")) {
18
- btn[0].checked = true;
19
- }
20
- var label = $("<label />").append(btn).append(link);
21
- el.append(label);
22
- return label[0];
23
- });
24
- $("input:radio", langWidget).on("change", function(ev) {
25
- window.location = $(this).closest("label").find("a").attr("href");
26
- });
27
- // secondary language
28
- var toggleSections = function(langSelected) {
29
- $(".translation[lang]").each(function(i, node) {
30
- var el = $(node),
31
- lang = el.attr("lang");
32
- if(lang && lang !== locale && $.inArray(lang, langSelected) === -1) {
33
- el.addClass("hidden");
34
- } else {
35
- el.removeClass("hidden");
12
+
13
+ if (langWidget) {
14
+ // primary language (converting links to radio buttons)
15
+ $("a", langWidget).each(function(i, node) {
16
+ var link = $(node);
17
+ var el = link.closest("li");
18
+ var btn = $('<input type="radio" name="primary_language">');
19
+ if(link.hasClass("active")) {
20
+ btn[0].checked = true;
36
21
  }
22
+ var label = $("<label />").append(btn).append(link);
23
+ el.append(label);
24
+ return label[0];
37
25
  });
38
- };
39
- var updateNoteLangs = function(langSelected) {
40
- $(".inline_note.new select[id*=language]").each(function(i, sel) { // NB: new notes only!
41
- $(sel).find("option").each(function(i, opt) {
42
- var el = $(opt),
43
- lang = el.val();
44
- if(lang !== locale && $.inArray(lang, langSelected) === -1) {
45
- el.remove();
26
+
27
+ $("input:radio", langWidget).on("change", function(ev) {
28
+ window.location = $(this).closest("label").find("a").attr("href");
29
+ });
30
+
31
+ // secondary language
32
+ var toggleSections = function(langSelected) {
33
+ $(".translation[lang]").each(function(i, node) {
34
+ var el = $(node),
35
+ lang = el.attr("lang");
36
+ if(lang && lang !== locale && $.inArray(lang, langSelected) === -1) {
37
+ el.addClass("hidden");
38
+ } else {
39
+ el.removeClass("hidden");
46
40
  }
47
41
  });
42
+ };
43
+ var updateNoteLangs = function(langSelected) {
44
+ $(".inline_note.new select[id*=language]").each(function(i, sel) { // NB: new notes only!
45
+ $(sel).find("option").each(function(i, opt) {
46
+ var el = $(opt),
47
+ lang = el.val();
48
+ if(lang !== locale && $.inArray(lang, langSelected) === -1) {
49
+ el.remove();
50
+ }
51
+ });
52
+ });
53
+ };
54
+ $(document).on("lang_selected", function(ev, data) {
55
+ toggleSections(data.langs);
56
+ updateNoteLangs(data.langs);
48
57
  });
49
- };
50
- $(document).on("lang_selected", function(ev, data) {
51
- toggleSections(data.langs);
52
- updateNoteLangs(data.langs);
53
- });
54
- var langSelector = new IQVOC.LanguageSelector(langWidget, "lang_selected");
55
- if($("#new_concept, #edit_concept").length) { // edit mode
56
- // disable secondary language selection to avoid excessive state complexity
57
- $(":checkbox", langSelector.container).prop("disabled", true);
58
+ var langSelector = new IQVOC.LanguageSelector(langWidget, "lang_selected");
59
+ if($("#new_concept, #edit_concept").length) { // edit mode
60
+ // disable secondary language selection to avoid excessive state complexity
61
+ $(":checkbox", langSelector.container).prop("disabled", true);
62
+ }
58
63
  }
59
64
 
60
65
  // hide broader relations for top+ terms (mutually exclusive in mono hierarchies)
@@ -102,26 +107,6 @@ jQuery(document).ready(function($) {
102
107
  });
103
108
  });
104
109
 
105
- // Search
106
- $(".checkbox-select-all").on('click', function() {
107
- $(this).closest('.checkbox-controls').find("input:checkbox").prop("checked", true);
108
- });
109
- $(".checkbox-select-none").on('click', function() {
110
- $(this).closest('.checkbox-controls').find("input:checkbox").prop("checked", false);
111
- });
112
- $("select.search_type").on('change', function() {
113
- var result_type_filter = $(".result_type_filter");
114
- var selected = $(this).val();
115
- var targets = ['labels', 'pref_labels', 'alt_labels'];
116
- if($.inArray(selected, targets) !== -1) {
117
- result_type_filter.show();
118
- }
119
- else {
120
- result_type_filter.hide();
121
- }
122
- });
123
- $("select.search_type").trigger('change');
124
-
125
110
  // unobtrusive tabs
126
111
  $(".tab-panels").addClass("tab-content"); // the latter is for Bootstrap Tabs
127
112
 
@@ -8,4 +8,5 @@ import './federated_concept_mapper'
8
8
  import './concept_mapping_manager'
9
9
  import './label_resolver'
10
10
  import './treeview'
11
- import './autocomplete'
11
+ import './autocomplete'
12
+ import './hover_menues'
@@ -15,6 +15,7 @@ import 'jqtree/tree.jquery.js';
15
15
 
16
16
  var dragabbleSupport = $(container).data('dragabble');
17
17
  var polyhierarchySupport = $(container).data('polyhierarchy-support');
18
+ var conceptModalPreviewEnabled = $(container).data('concept-modal-preview-enabled');
18
19
  var saveLabel = $(container).data('save-label');
19
20
  var copyLabel = $(container).data('copy-label');
20
21
  var undoLabel = $(container).data('undo-label');
@@ -65,7 +66,7 @@ import 'jqtree/tree.jquery.js';
65
66
  link.addClass('published');
66
67
  }
67
68
 
68
- if (link[0]) {
69
+ if (link[0] && conceptModalPreviewEnabled) {
69
70
  var teaserLink = buildTeaserLink(node, link[0]);
70
71
  $li.find('.jqtree-element').append(teaserLink);
71
72
  }
@@ -15,3 +15,4 @@
15
15
  @import 'components/onebox';
16
16
 
17
17
  @import 'hacks/hacks';
18
+ @import 'search_results';
@@ -0,0 +1,14 @@
1
+ form#search {
2
+ .collapse-toggle[aria-expanded=false] .hide-if-collapsed {
3
+ display: none;
4
+ }
5
+
6
+ .collapse-toggle[aria-expanded=true] .hide-if-expanded {
7
+ display: none;
8
+ }
9
+
10
+ input[type="search"] {
11
+ -webkit-box-shadow: none;
12
+ outline: none;
13
+ }
14
+ }
@@ -30,8 +30,9 @@
30
30
  list-style-type: none;
31
31
  margin-top: 5px;
32
32
  padding-left: 0;
33
+
33
34
  li {
34
- float: left;
35
+ display: inline-block;
35
36
  }
36
37
  }
37
38
 
@@ -40,11 +41,7 @@
40
41
  padding: 0;
41
42
  }
42
43
 
43
- .sections .entity_list li:after,
44
- .relation-body .entity_list li:after {
45
- content: ",\00a0"; // => ', '
46
- }
47
- .sections .entity_list li:last-child:after,
48
- .relation-body .entity_list li:last-child:after {
49
- content: "";
44
+ .relation-body .entity_list li:not(:last-child):after {
45
+ content: ",";
46
+ margin-left: -0.2rem;
50
47
  }
@@ -12,6 +12,7 @@ simplete-suggestions {
12
12
  position: absolute;
13
13
  width: 100%;
14
14
  display: block;
15
+ z-index: 100;
15
16
 
16
17
  .search-results {
17
18
  overflow-y: auto;
@@ -34,4 +35,4 @@ simplete-suggestions {
34
35
  li.search-result:hover {
35
36
  background-color: $gray-200;
36
37
  }
37
- }
38
+ }
@@ -1,5 +1,6 @@
1
1
  ul.hybrid-treeview {
2
2
  padding: 0;
3
+ margin-bottom: 0;
3
4
  }
4
5
 
5
6
  ul.jqtree-tree {
@@ -2,7 +2,7 @@ legend {
2
2
  margin-bottom: 0;
3
3
  }
4
4
 
5
- fieldset > div:first-of-type, ol:first-of-type, p {
5
+ fieldset > div:first-of-type, ol:first-of-type {
6
6
  -webkit-margin-top-collapse: separate;
7
7
  margin-top: 27px;
8
8
  }
@@ -15,7 +15,7 @@
15
15
  # limitations under the License.
16
16
 
17
17
  class Collections::VersionsController < ApplicationController
18
- include RDFSyncService::Helper
18
+ include RdfSyncService::Helper
19
19
 
20
20
  def merge
21
21
  scope = Iqvoc::Collection.base_class.by_origin(params[:origin])
@@ -28,7 +28,7 @@ class Collections::VersionsController < ApplicationController
28
28
  ActiveRecord::Base.transaction do
29
29
  new_version.rdf_updated_at = nil
30
30
  new_version.publish
31
- new_version.unlock
31
+
32
32
  if new_version.publishable?
33
33
  new_version.save
34
34
 
@@ -63,7 +63,7 @@ class Collections::VersionsController < ApplicationController
63
63
 
64
64
  new_version = nil
65
65
  ActiveRecord::Base.transaction do
66
- new_version = current_collection.branch(current_user)
66
+ new_version = current_collection.branch
67
67
  new_version.save!
68
68
  end
69
69
  flash[:success] = t('txt.controllers.versioning.branched')
@@ -71,45 +71,6 @@ class Collections::VersionsController < ApplicationController
71
71
  end
72
72
  end
73
73
 
74
- def lock
75
- new_version = Iqvoc::Collection.base_class.
76
- by_origin(params[:origin]).
77
- unpublished.
78
- last!
79
-
80
- if new_version.locked?
81
- raise "Collection '#{new_version.origin}' is already locked."
82
- end
83
-
84
- authorize! :lock, new_version
85
-
86
- new_version.lock_by_user(current_user.id)
87
- new_version.save validate: false
88
-
89
- flash[:success] = t('txt.controllers.versioning.locked')
90
- redirect_to edit_collection_path(new_version, published: 0)
91
- end
92
-
93
- def unlock
94
- new_version = Iqvoc::Collection.base_class.
95
- by_origin(params[:origin]).
96
- unpublished.
97
- last!
98
-
99
- unless new_version.locked?
100
- raise "Collection '#{new_version.origin}' is not locked."
101
- end
102
-
103
- authorize! :unlock, new_version
104
-
105
- new_version.unlock
106
- new_version.save validate: false
107
-
108
- flash[:success] = t('txt.controllers.versioning.unlocked')
109
-
110
- redirect_to collection_path(new_version, published: 0)
111
- end
112
-
113
74
  def consistency_check
114
75
  collection = Iqvoc::Collection.base_class.
115
76
  by_origin(params[:origin]).
@@ -134,13 +95,17 @@ class Collections::VersionsController < ApplicationController
134
95
  last!
135
96
 
136
97
  authorize! :send_to_review, collection
137
- collection.to_review
138
98
 
139
- authorize! :unlock, collection
140
- collection.unlock
99
+ # Only send the concept to review if it is publishable (e.g. consistency check is OK)
100
+ if collection.publishable?
101
+ collection.to_review
141
102
 
142
- collection.save!
143
- flash[:success] = t('txt.controllers.versioning.to_review_success')
144
- redirect_to collection_path(collection, published: 0)
103
+ collection.save!
104
+ flash[:success] = t('txt.controllers.versioning.to_review_success')
105
+ redirect_to collection_path(collection, published: 0)
106
+ else
107
+ flash[:error] = t('txt.controllers.versioning.consistency_check_error')
108
+ redirect_to edit_collection_path(collection, published: 0, full_consistency_check: '1')
109
+ end
145
110
  end
146
111
  end
@@ -29,11 +29,16 @@ class CollectionsController < ApplicationController
29
29
 
30
30
  @top_collections.to_a.sort! { |a, b| a.pref_label.to_s <=> b.pref_label.to_s }
31
31
 
32
- ActiveRecord::Associations::Preloader.new.preload(@top_collections, { members: :target })
32
+ Iqvoc::Collection.base_class.preload(@top_collections, { members: :target })
33
33
  end
34
34
  format.json do # For the widget and treeview
35
35
  response = if params[:root].present?
36
- collections = Iqvoc::Collection.base_class.with_pref_labels.published.by_parent_id(params[:root])
36
+ collections = Iqvoc::Collection.base_class
37
+ .with_pref_labels
38
+ .published
39
+ .by_parent_id(params[:root])
40
+ .sort_by { |c| c.pref_label.to_s }
41
+
37
42
  collections.map do |collection|
38
43
  res = {
39
44
  id: collection.id,
@@ -46,10 +51,12 @@ class CollectionsController < ApplicationController
46
51
  res
47
52
  end
48
53
  else
49
- collections = Iqvoc::Collection.base_class.with_pref_labels.published.merge(Label::Base.by_query_value("#{params[:query]}%"))
50
- collections.map do |c|
51
- collection_widget_data(c)
52
- end
54
+ collections = Iqvoc::Collection.base_class
55
+ .with_pref_labels
56
+ .published
57
+ .merge(Label::Base.by_query_value("#{params[:query]}%"))
58
+ .sort_by { |c| c.pref_label.to_s }
59
+ .map { |c| collection_widget_data(c) }
53
60
  end
54
61
  render json: response
55
62
  end
@@ -72,7 +79,7 @@ class CollectionsController < ApplicationController
72
79
 
73
80
  # When in single query mode, AR handles ALL includes to be loaded by that
74
81
  # one query. We don't want that! So let's do it manually :-)
75
- ActiveRecord::Associations::Preloader.new.preload(@collection,
82
+ Iqvoc::Collection.base_class.preload(@collection,
76
83
  [:pref_labels,
77
84
  { members: { target: [:pref_labels] + Iqvoc::Collection.base_class.default_includes } }])
78
85
 
@@ -111,7 +118,7 @@ class CollectionsController < ApplicationController
111
118
 
112
119
  # When in single query mode, AR handles ALL includes to be loaded by that
113
120
  # one query. We don't want that! So let's do it manually :-)
114
- ActiveRecord::Associations::Preloader.new.preload(@collection, [
121
+ Iqvoc::Collection.base_class.preload(@collection, [
115
122
  :pref_labels,
116
123
  { members: { target: [:pref_labels] + Iqvoc::Concept.base_class.default_includes } }])
117
124
 
@@ -125,7 +132,7 @@ class CollectionsController < ApplicationController
125
132
  # set to_review to false if someone edits a concepts
126
133
  concept_params["to_review"] = "false"
127
134
 
128
- if @collection.update_attributes(concept_params)
135
+ if @collection.update(concept_params)
129
136
  flash[:success] = I18n.t('txt.controllers.collections.save.success')
130
137
  redirect_to collection_path(@collection, published: 0)
131
138
  else
@@ -42,7 +42,7 @@ class Concepts::AlphabeticalController < ConceptsController
42
42
 
43
43
  search_results_size = find_labelings.count
44
44
  search_results = find_labelings.page(params[:page])
45
- ActiveRecord::Associations::Preloader.new.preload(search_results, owner: includes)
45
+ Iqvoc::Concept.pref_labeling_class.preload(search_results, owner: includes)
46
46
 
47
47
  @search_results = search_results.to_a.map { |pl| AlphabeticalSearchResult.new(pl) }
48
48
  @search_results = Kaminari.paginate_array(@search_results, total_count: search_results_size).page(params[:page])
@@ -61,7 +61,7 @@ class Concepts::AlphabeticalController < ConceptsController
61
61
 
62
62
  def find_labelings
63
63
  letter = (@letters.include?('A')) ? 'a' : @letters.first
64
- query = (params[:prefix] || letter).mb_chars.downcase.to_s
64
+ query = (params[:prefix] || letter)&.mb_chars&.downcase.to_s
65
65
 
66
66
  Iqvoc::Concept.pref_labeling_class
67
67
  .concept_published
@@ -16,22 +16,24 @@
16
16
 
17
17
  class Concepts::HierarchicalController < ConceptsController
18
18
  def index
19
+ base_class = Iqvoc::Concept.base_class
20
+
19
21
  if params[:published] == '0'
20
- authorize! :update, Iqvoc::Concept.base_class
22
+ authorize! :update, base_class
21
23
  else
22
- authorize! :read, Iqvoc::Concept.base_class
24
+ authorize! :read, base_class
23
25
  end
24
26
 
25
- scope = Iqvoc::Concept.base_class.includes(:pref_labels).order('labels.value')
27
+ scope = base_class.includes(base_class.default_includes + [:pref_labels]).order('labels.value')
26
28
  scope = params[:published] == '0' ? scope.published_with_newer_versions : scope.published
27
29
 
30
+ # only select unexpired concepts
31
+ scope = scope.not_expired
32
+
28
33
  # unrelated concepts for sidebar
29
34
  # TODO: order parentless concepts
30
35
  @loose_concepts = scope.parentless.includes(:pref_labels).page(params[:page])
31
36
 
32
- # only select unexpired concepts
33
- scope = scope.not_expired
34
-
35
37
  # if params[:broader] is given, the action is handling the reversed tree
36
38
  root_id = params[:root]
37
39
  if root_id && root_id =~ /\d+/
@@ -50,11 +52,6 @@ class Concepts::HierarchicalController < ConceptsController
50
52
  end
51
53
  end
52
54
 
53
- # When in single query mode, AR handles ALL includes to be loaded by that
54
- # one query. We don't want that! So let's do it manually :-)
55
- ActiveRecord::Associations::Preloader.new.preload(@concepts,
56
- Iqvoc::Concept.base_class.default_includes + [:pref_labels])
57
-
58
55
  respond_to do |format|
59
56
  format.html
60
57
  format.json do # Treeview data
@@ -75,8 +72,7 @@ class Concepts::HierarchicalController < ConceptsController
75
72
  url: url,
76
73
  update_url: move_concept_url(c),
77
74
  glance_url: glance_concept_url(c, format: :html),
78
- published: (c.published?) ? true : false,
79
- locked: (can?(:branch, c) || can?(:update, c) ? false : true)
75
+ published: (c.published?) ? true : false
80
76
  }
81
77
  end
82
78
  render json: concepts
@@ -42,6 +42,7 @@ class Concepts::SchemeController < ApplicationController
42
42
  @top_concepts = Iqvoc::Concept.base_class
43
43
  .preload(:pref_labels)
44
44
  .tops
45
+ .not_expired
45
46
  .published.sort_by {|c| c.pref_label }
46
47
 
47
48
  respond_to do |format|
@@ -59,7 +60,7 @@ class Concepts::SchemeController < ApplicationController
59
60
  @scheme = Iqvoc::Concept.root_class.instance
60
61
  authorize! :update, @scheme
61
62
 
62
- if @scheme.update_attributes(concept_params)
63
+ if @scheme.update(concept_params)
63
64
  flash[:success] = t('txt.controllers.concept_scheme.save.success')
64
65
  redirect_to scheme_path
65
66
  else