hyrax 5.0.0 → 5.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (331) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +7 -176
  3. data/.dassie/.env +8 -3
  4. data/.dassie/Gemfile +13 -2
  5. data/.dassie/app/controllers/hyrax/generic_work_resources_controller.rb +17 -0
  6. data/.dassie/app/controllers/hyrax/generic_works_controller.rb +7 -1
  7. data/.dassie/app/forms/generic_work_resource_form.rb +20 -0
  8. data/.dassie/app/indexers/generic_work_resource_indexer.rb +16 -0
  9. data/.dassie/app/models/admin_set_resource.rb +9 -0
  10. data/.dassie/app/models/collection_resource.rb +2 -0
  11. data/.dassie/app/models/file_set.rb +2 -0
  12. data/.dassie/app/models/generic_work_resource.rb +10 -0
  13. data/.dassie/app/views/hyrax/generic_work_resources/_generic_work_resource.html.erb +2 -0
  14. data/.dassie/config/analytics.yml +6 -1
  15. data/.dassie/config/application.rb +24 -0
  16. data/.dassie/config/initializers/hyrax.rb +13 -3
  17. data/.dassie/config/initializers/wings.rb +109 -0
  18. data/.dassie/config/metadata/generic_work_resource.yaml +22 -0
  19. data/.dassie/config/valkyrie_index.yml +4 -10
  20. data/.dassie/db/migrate/20240506070809_valkyrie_id_to_string.rb +5 -0
  21. data/.dassie/db/schema.rb +2 -2
  22. data/.dassie/spec/indexers/generic_work_resource_indexer_spec.rb +13 -0
  23. data/.dassie/spec/models/generic_work_resource_spec.rb +12 -0
  24. data/.dassie/spec/views/generic_work_resources/_generic_work_resource.html.erb_spec.rb +7 -0
  25. data/.dockerignore +6 -4
  26. data/.github/release.yml +3 -0
  27. data/.github/workflows/lint-build-test.yml +130 -0
  28. data/.github/workflows/test-results.yml +40 -0
  29. data/.koppie/.env +7 -5
  30. data/.koppie/Gemfile +12 -1
  31. data/.koppie/config/analytics.yml +6 -1
  32. data/.koppie/config/environments/test.rb +2 -0
  33. data/.koppie/config/initializers/1_valkyrie.rb +6 -2
  34. data/.koppie/config/solr.yml +1 -1
  35. data/.regen +1 -1
  36. data/.rubocop.yml +5 -0
  37. data/Dockerfile +16 -36
  38. data/Gemfile +2 -0
  39. data/app/assets/javascripts/hydra-editor/field_manager.es6 +187 -0
  40. data/app/assets/javascripts/hyrax/analytics_events.js +48 -24
  41. data/app/assets/javascripts/hyrax/autocomplete/linked_data.es6 +3 -0
  42. data/app/assets/javascripts/hyrax/collapse.js +4 -4
  43. data/app/assets/javascripts/hyrax/editor/controlled_vocabulary.es6 +38 -5
  44. data/app/assets/javascripts/hyrax/file_manager/save_manager.es6 +2 -0
  45. data/app/assets/javascripts/hyrax/search.js +2 -3
  46. data/app/assets/javascripts/hyrax/select_work_type.es6 +3 -1
  47. data/app/assets/javascripts/hyrax/uploader.js +20 -18
  48. data/app/assets/javascripts/hyrax.js +1 -0
  49. data/app/assets/stylesheets/_bootstrap-default-overrides.scss +4 -0
  50. data/app/assets/stylesheets/hyrax/_card.scss +4 -0
  51. data/app/assets/stylesheets/hyrax/_catalog.scss +21 -0
  52. data/app/assets/stylesheets/hyrax/_collections.scss +1 -1
  53. data/app/assets/stylesheets/hyrax/_facets.scss +15 -3
  54. data/app/assets/stylesheets/hyrax/_featured.scss +4 -0
  55. data/app/assets/stylesheets/hyrax/_file_upload.scss +6 -0
  56. data/app/assets/stylesheets/hyrax/_form.scss +4 -0
  57. data/app/assets/stylesheets/hyrax/_forms.scss +2 -1
  58. data/app/assets/stylesheets/hyrax/_nestable.scss +9 -8
  59. data/app/assets/stylesheets/hyrax/_select_work_type.scss +12 -0
  60. data/app/assets/stylesheets/hyrax/_styles.scss +4 -0
  61. data/app/assets/stylesheets/hyrax/_work-show.scss +3 -0
  62. data/app/assets/stylesheets/hyrax/controlled_vocabulary.scss +2 -2
  63. data/app/controllers/concerns/hyrax/singular_subresource_controller.rb +7 -2
  64. data/app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb +11 -2
  65. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +9 -2
  66. data/app/controllers/hyrax/admin/analytics/collection_reports_controller.rb +2 -2
  67. data/app/controllers/hyrax/admin/analytics/work_reports_controller.rb +7 -8
  68. data/app/controllers/hyrax/dashboard/collections_controller.rb +2 -1
  69. data/app/controllers/hyrax/downloads_controller.rb +24 -3
  70. data/app/controllers/hyrax/file_sets_controller.rb +33 -7
  71. data/app/controllers/hyrax/my/works_controller.rb +20 -0
  72. data/app/controllers/hyrax/single_use_links_viewer_controller.rb +9 -2
  73. data/app/controllers/hyrax/stats_controller.rb +1 -1
  74. data/app/controllers/hyrax/uploads_controller.rb +28 -2
  75. data/app/forms/hyrax/forms/admin/appearance.rb +1 -1
  76. data/app/forms/hyrax/forms/admin/collection_type_form.rb +1 -7
  77. data/app/forms/hyrax/forms/pcdm_collection_form.rb +9 -0
  78. data/app/forms/hyrax/forms/work_embargo_form.rb +6 -0
  79. data/app/forms/hyrax/forms/work_lease_form.rb +6 -0
  80. data/app/indexers/concerns/hyrax/location_indexer.rb +2 -2
  81. data/app/indexers/hyrax/indexers/file_set_indexer.rb +4 -0
  82. data/app/indexers/hyrax/indexers/resource_indexer.rb +1 -0
  83. data/app/indexers/hyrax/valkyrie_indexer.rb +3 -5
  84. data/app/jobs/migrate_files_to_valkyrie_job.rb +109 -0
  85. data/app/jobs/migrate_resources_job.rb +34 -0
  86. data/app/jobs/valkyrie_create_derivatives_job.rb +2 -1
  87. data/app/models/admin_set.rb +1 -0
  88. data/app/models/collection.rb +13 -1
  89. data/app/models/concerns/hyrax/ar_resource.rb +104 -0
  90. data/app/models/concerns/hyrax/solr_document/ordered_members.rb +2 -1
  91. data/app/models/concerns/hyrax/solr_document_behavior.rb +13 -2
  92. data/app/models/concerns/hyrax/valkyrie_lazy_migration.rb +82 -0
  93. data/app/models/file_download_stat.rb +1 -1
  94. data/app/models/file_view_stat.rb +1 -1
  95. data/app/models/hyrax/collection_type.rb +12 -4
  96. data/app/models/hyrax/file_metadata.rb +19 -0
  97. data/app/models/hyrax/file_set.rb +25 -0
  98. data/app/models/hyrax/model_registry.rb +3 -4
  99. data/app/models/hyrax/resource.rb +5 -0
  100. data/app/models/hyrax/statistic.rb +12 -37
  101. data/app/presenters/hyrax/file_set_presenter.rb +2 -1
  102. data/app/presenters/hyrax/file_usage.rb +3 -3
  103. data/app/presenters/hyrax/iiif_manifest_presenter.rb +2 -1
  104. data/app/presenters/hyrax/member_presenter_factory.rb +7 -1
  105. data/app/presenters/hyrax/menu_presenter.rb +1 -1
  106. data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +2 -2
  107. data/app/presenters/hyrax/stats_usage_presenter.rb +2 -1
  108. data/app/presenters/hyrax/work_show_presenter.rb +15 -19
  109. data/app/presenters/hyrax/work_usage.rb +5 -2
  110. data/app/search_builders/hyrax/expired_embargo_search_builder.rb +7 -1
  111. data/app/search_builders/hyrax/expired_lease_search_builder.rb +7 -1
  112. data/app/search_builders/hyrax/filter_by_type.rb +1 -3
  113. data/app/search_builders/hyrax/valkyrie_abstract_type_relation.rb +7 -2
  114. data/app/services/hyrax/access_control_list.rb +1 -1
  115. data/app/services/hyrax/admin_set_create_service.rb +16 -5
  116. data/app/services/hyrax/admin_set_service.rb +2 -1
  117. data/app/services/hyrax/analytics/ga4/base.rb +96 -0
  118. data/app/services/hyrax/analytics/ga4/events.rb +25 -0
  119. data/app/services/hyrax/analytics/ga4/events_daily.rb +36 -0
  120. data/app/services/hyrax/analytics/ga4/visits.rb +33 -0
  121. data/app/services/hyrax/analytics/ga4/visits_daily.rb +24 -0
  122. data/app/services/hyrax/analytics/ga4.rb +204 -0
  123. data/app/services/hyrax/analytics/google.rb +16 -2
  124. data/app/services/hyrax/analytics/matomo.rb +16 -3
  125. data/app/services/hyrax/analytics/results.rb +6 -0
  126. data/app/services/hyrax/custom_queries/find_access_control.rb +1 -1
  127. data/app/services/hyrax/custom_queries/find_by_date_range.rb +6 -23
  128. data/app/services/hyrax/custom_queries/find_collections_by_type.rb +2 -2
  129. data/app/services/hyrax/custom_queries/find_count_by.rb +3 -31
  130. data/app/services/hyrax/custom_queries/find_file_metadata.rb +2 -2
  131. data/app/services/hyrax/custom_queries/find_models_by_access.rb +5 -27
  132. data/app/services/hyrax/embargo_manager.rb +2 -1
  133. data/app/services/hyrax/file_set_file_service.rb +10 -1
  134. data/app/services/hyrax/listeners/file_listener.rb +39 -0
  135. data/app/services/hyrax/listeners/file_metadata_listener.rb +0 -30
  136. data/app/services/hyrax/lock_manager.rb +7 -7
  137. data/app/services/hyrax/lockable.rb +4 -3
  138. data/app/services/hyrax/simple_schema_loader.rb +1 -1
  139. data/app/services/hyrax/solr_service.rb +22 -8
  140. data/app/services/hyrax/statistics/query_service.rb +1 -1
  141. data/app/services/hyrax/statistics/works/over_time.rb +1 -1
  142. data/app/services/hyrax/thumbnail_path_service.rb +2 -0
  143. data/app/services/hyrax/user_stat_importer.rb +5 -5
  144. data/app/services/hyrax/valkyrie_upload.rb +14 -9
  145. data/app/services/hyrax/versioning_service.rb +10 -2
  146. data/app/services/hyrax/work_query_service.rb +2 -2
  147. data/app/services/migrate_resource_service.rb +55 -0
  148. data/app/views/_controls.html.erb +5 -5
  149. data/app/views/_masthead.html.erb +1 -1
  150. data/app/views/catalog/_search_form.html.erb +9 -16
  151. data/app/views/catalog/_thumbnail_list_collection.html.erb +1 -1
  152. data/app/views/catalog/_thumbnail_list_default.html.erb +2 -2
  153. data/app/views/hyrax/admin/analytics/collection_reports/index.html.erb +4 -4
  154. data/app/views/hyrax/admin/analytics/work_reports/index.html.erb +1 -1
  155. data/app/views/hyrax/admin/collection_types/_form.html.erb +4 -4
  156. data/app/views/hyrax/admin/collection_types/index.html.erb +1 -1
  157. data/app/views/hyrax/admin/features/index.html.erb +1 -1
  158. data/app/views/hyrax/base/_file_manager_actions.html.erb +1 -1
  159. data/app/views/hyrax/base/_file_manager_member.html.erb +7 -4
  160. data/app/views/hyrax/base/_file_manager_thumbnail.html.erb +1 -1
  161. data/app/views/hyrax/base/_form_files.html.erb +1 -1
  162. data/app/views/hyrax/base/_form_member_of_collections.html.erb +4 -0
  163. data/app/views/hyrax/base/_show_actions.html.erb +7 -8
  164. data/app/views/hyrax/base/_work_button_row.html.erb +1 -1
  165. data/app/views/hyrax/batch_select/_add_button.html.erb +1 -1
  166. data/app/views/hyrax/content_blocks/_form.html.erb +3 -3
  167. data/app/views/hyrax/dashboard/_sidebar.html.erb +1 -1
  168. data/app/views/hyrax/dashboard/_user_activity.html.erb +2 -2
  169. data/app/views/hyrax/dashboard/collections/_form.html.erb +4 -4
  170. data/app/views/hyrax/dashboard/collections/_form_share.html.erb +6 -4
  171. data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +1 -1
  172. data/app/views/hyrax/dashboard/collections/_show_document_list_row.html.erb +1 -1
  173. data/app/views/hyrax/dashboard/show_admin.html.erb +18 -19
  174. data/app/views/hyrax/dashboard/sidebar/_activity.html.erb +1 -1
  175. data/app/views/hyrax/embargoes/_list_expired_active_embargoes.html.erb +7 -7
  176. data/app/views/hyrax/file_sets/_actions.html.erb +9 -1
  177. data/app/views/hyrax/file_sets/_permission_form.html.erb +4 -2
  178. data/app/views/hyrax/file_sets/_show_actions.html.erb +1 -1
  179. data/app/views/hyrax/homepage/_featured.html.erb +1 -1
  180. data/app/views/hyrax/homepage/_recent_document.html.erb +2 -2
  181. data/app/views/hyrax/leases/_list_expired_active_leases.html.erb +6 -6
  182. data/app/views/hyrax/my/collections/_list_collections.html.erb +1 -1
  183. data/app/views/hyrax/my/collections/_tabs.html.erb +1 -1
  184. data/app/views/hyrax/pages/_form.html.erb +8 -8
  185. data/app/views/hyrax/transfers/_received.html.erb +1 -1
  186. data/app/views/hyrax/uploads/_js_templates.html.erb +9 -9
  187. data/app/views/hyrax/uploads/_js_templates_branding.html.erb +3 -3
  188. data/app/views/hyrax/uploads/_js_templates_versioning.html.erb +1 -1
  189. data/app/views/hyrax/uploads/create.json.jbuilder +2 -2
  190. data/app/views/hyrax/users/_activity_log.html.erb +15 -9
  191. data/app/views/hyrax/users/_user_row.html.erb +6 -3
  192. data/app/views/hyrax/users/_vitals.html.erb +3 -2
  193. data/app/views/layouts/_head_tag_content.html.erb +2 -0
  194. data/app/views/shared/_appearance_styles.html.erb +5 -1
  195. data/app/views/shared/_ga4.html.erb +11 -0
  196. data/app/views/shared/_select_work_type_modal.html.erb +10 -1
  197. data/bin/db-migrate-seed.sh +3 -3
  198. data/bin/dev-entrypoint.sh +7 -2
  199. data/bin/{db-wait.sh → service-wait.sh} +1 -1
  200. data/bin/worker-entrypoint.sh +8 -0
  201. data/chart/hyrax/Chart.yaml +1 -1
  202. data/chart/hyrax/templates/deployment-worker.yaml +2 -2
  203. data/chart/hyrax/templates/deployment.yaml +12 -0
  204. data/chart/hyrax/values.yaml +10 -0
  205. data/config/locales/hyrax.en.yml +4 -2
  206. data/config/metadata/basic_metadata.yaml +20 -0
  207. data/config/metadata/hyrax_internal_metadata.yaml +1 -1
  208. data/docker-compose-dassie.yml +167 -0
  209. data/docker-compose-koppie.yml +21 -36
  210. data/docker-compose-sirenia.yml +50 -44
  211. data/docker-compose.yml +2 -183
  212. data/documentation/developing-your-hyrax-based-app.md +4 -4
  213. data/hyrax.gemspec +7 -12
  214. data/lib/freyja/custom_query_container.rb +5 -0
  215. data/lib/freyja/metadata_adapter.rb +32 -0
  216. data/lib/freyja/persister.rb +42 -0
  217. data/lib/freyja/query_service.rb +20 -0
  218. data/lib/freyja/resource_factory.rb +8 -0
  219. data/lib/freyja.rb +14 -0
  220. data/lib/frigg/custom_query_container.rb +5 -0
  221. data/lib/frigg/metadata_adapter.rb +22 -0
  222. data/lib/frigg/persister.rb +33 -0
  223. data/lib/frigg/query_service.rb +15 -0
  224. data/lib/frigg.rb +13 -0
  225. data/lib/generators/hyrax/install_generator.rb +5 -0
  226. data/lib/generators/hyrax/templates/config/analytics.yml +6 -1
  227. data/lib/generators/hyrax/templates/config/initializers/1_valkyrie.rb +6 -2
  228. data/lib/generators/hyrax/templates/config/valkyrie_index.yml +1 -1
  229. data/lib/goddess/custom_query_container.rb +71 -0
  230. data/lib/goddess/metadata.rb +13 -0
  231. data/lib/goddess/query.rb +176 -0
  232. data/lib/hyrax/configuration.rb +83 -0
  233. data/lib/hyrax/engine.rb +2 -0
  234. data/lib/hyrax/form_fields.rb +1 -3
  235. data/lib/hyrax/name.rb +5 -0
  236. data/lib/hyrax/publisher.rb +11 -0
  237. data/lib/hyrax/rubocop/custom_cops.rb +30 -0
  238. data/lib/hyrax/specs/capybara.rb +10 -6
  239. data/{spec → lib/hyrax/specs/shared_specs}/factories/admin_sets.rb +2 -0
  240. data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_embargo.rb +4 -0
  241. data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_lease.rb +4 -0
  242. data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_work.rb +26 -1
  243. data/lib/hyrax/specs/shared_specs/hydra_works.rb +1 -1
  244. data/lib/hyrax/transactions/admin_set_destroy.rb +2 -1
  245. data/lib/hyrax/transactions/collection_destroy.rb +2 -1
  246. data/lib/hyrax/transactions/container.rb +9 -0
  247. data/lib/hyrax/transactions/steps/add_file_sets.rb +2 -1
  248. data/lib/hyrax/transactions/steps/delete_all_file_metadata.rb +4 -5
  249. data/lib/hyrax/transactions/steps/delete_permission_template.rb +30 -0
  250. data/lib/hyrax/transactions/steps/delete_resource.rb +1 -1
  251. data/lib/hyrax/transactions/steps/save_collection_logo.rb +2 -1
  252. data/lib/hyrax/valkyrie_can_can_adapter.rb +8 -1
  253. data/lib/hyrax/version.rb +1 -1
  254. data/lib/wings/active_fedora_converter.rb +13 -5
  255. data/lib/wings/converter_value_mapper.rb +1 -0
  256. data/lib/wings/services/custom_queries/find_collections_by_type.rb +2 -1
  257. data/lib/wings/services/custom_queries/find_file_metadata.rb +2 -2
  258. data/lib/wings/setup.rb +12 -3
  259. data/lib/wings/transformer_value_mapper.rb +5 -1
  260. data/lib/wings/valkyrie/persister.rb +3 -1
  261. data/template.rb +1 -1
  262. metadata +118 -94
  263. data/.koppie/scripts/db-migrate-seed.sh +0 -9
  264. data/.koppie/scripts/entrypoint.sh +0 -10
  265. data/spec/support/book_resource.rb +0 -36
  266. data/spec/support/can_can_overrides.rb +0 -43
  267. data/spec/support/clean_solr.rb +0 -7
  268. data/spec/support/controller_level_helpers.rb +0 -27
  269. data/spec/support/factory_helpers.rb +0 -94
  270. data/spec/support/fakes/fake_actor.rb +0 -22
  271. data/spec/support/fakes/fake_authority.rb +0 -14
  272. data/spec/support/fakes/fake_search_builder_scope.rb +0 -44
  273. data/spec/support/fakes/indexing_adapter.rb +0 -17
  274. data/spec/support/fakes/test_hydra_group_service.rb +0 -55
  275. data/spec/support/features/batch_edit_actions.rb +0 -37
  276. data/spec/support/features/session_helpers.rb +0 -15
  277. data/spec/support/features/workflow.rb +0 -10
  278. data/spec/support/features.rb +0 -11
  279. data/spec/support/form_with_validations.rb +0 -15
  280. data/spec/support/input_support.rb +0 -12
  281. data/spec/support/logging_formatter.rb +0 -67
  282. data/spec/support/matchers/api_responses.rb +0 -27
  283. data/spec/support/matchers/collection_type_property_matchers.rb +0 -30
  284. data/spec/support/matchers/embargo.rb +0 -9
  285. data/spec/support/matchers/lease.rb +0 -9
  286. data/spec/support/matchers/match_valkyrie_ids_with_af_ids.rb +0 -12
  287. data/spec/support/matchers/pcdm_matchers.rb +0 -34
  288. data/spec/support/matchers/permission.rb +0 -31
  289. data/spec/support/matchers/response_matchers.rb +0 -8
  290. data/spec/support/optional_example.rb +0 -17
  291. data/spec/support/rake.rb +0 -42
  292. data/spec/support/selectors.rb +0 -112
  293. data/spec/support/shared_examples_for_collection_presenter.rb +0 -44
  294. data/spec/support/simple_work.rb +0 -28
  295. data/spec/support/spec_statistic.rb +0 -24
  296. data/spec/support/speedup.rb +0 -7
  297. data/spec/support/statistic_helper.rb +0 -10
  298. data/spec/support/valkyrie_indexing.rb +0 -2
  299. data/spec/support/wings_models.rb +0 -9
  300. /data/{spec → lib/hyrax/specs/shared_specs}/factories/access_control.rb +0 -0
  301. /data/{spec → lib/hyrax/specs/shared_specs}/factories/admin_sets_lw.rb +0 -0
  302. /data/{spec → lib/hyrax/specs/shared_specs}/factories/administrative_sets.rb +0 -0
  303. /data/{spec → lib/hyrax/specs/shared_specs}/factories/api_items.rb +0 -0
  304. /data/{spec → lib/hyrax/specs/shared_specs}/factories/collection_branding_infos.rb +0 -0
  305. /data/{spec → lib/hyrax/specs/shared_specs}/factories/collection_type_participants.rb +0 -0
  306. /data/{spec → lib/hyrax/specs/shared_specs}/factories/collection_types.rb +0 -0
  307. /data/{spec → lib/hyrax/specs/shared_specs}/factories/collections.rb +0 -0
  308. /data/{spec → lib/hyrax/specs/shared_specs}/factories/collections_factory.rb +0 -0
  309. /data/{spec → lib/hyrax/specs/shared_specs}/factories/content_blocks.rb +0 -0
  310. /data/{spec → lib/hyrax/specs/shared_specs}/factories/counter_metrics.rb +0 -0
  311. /data/{spec → lib/hyrax/specs/shared_specs}/factories/featured_works.rb +0 -0
  312. /data/{spec → lib/hyrax/specs/shared_specs}/factories/file_sets.rb +0 -0
  313. /data/{spec → lib/hyrax/specs/shared_specs}/factories/generic_works.rb +0 -0
  314. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_collection.rb +0 -0
  315. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_default_admin_set.rb +0 -0
  316. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_file_metadata.rb +0 -0
  317. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_file_set.rb +0 -0
  318. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_resource.rb +0 -0
  319. /data/{spec → lib/hyrax/specs/shared_specs}/factories/object_id.rb +0 -0
  320. /data/{spec → lib/hyrax/specs/shared_specs}/factories/operations.rb +0 -0
  321. /data/{spec → lib/hyrax/specs/shared_specs}/factories/permission.rb +0 -0
  322. /data/{spec → lib/hyrax/specs/shared_specs}/factories/permission_template_accesses.rb +0 -0
  323. /data/{spec → lib/hyrax/specs/shared_specs}/factories/permission_templates.rb +0 -0
  324. /data/{spec → lib/hyrax/specs/shared_specs}/factories/proxy_deposit_requests.rb +0 -0
  325. /data/{spec → lib/hyrax/specs/shared_specs}/factories/single_use_links.rb +0 -0
  326. /data/{spec → lib/hyrax/specs/shared_specs}/factories/sipity_entities.rb +0 -0
  327. /data/{spec → lib/hyrax/specs/shared_specs}/factories/uploaded_files.rb +0 -0
  328. /data/{spec → lib/hyrax/specs/shared_specs}/factories/users.rb +0 -0
  329. /data/{spec → lib/hyrax/specs/shared_specs}/factories/workflow_actions.rb +0 -0
  330. /data/{spec → lib/hyrax/specs/shared_specs}/factories/workflow_states.rb +0 -0
  331. /data/{spec → lib/hyrax/specs/shared_specs}/factories/workflows.rb +0 -0
@@ -4,39 +4,53 @@ class TrackingTags {
4
4
  }
5
5
 
6
6
  analytics() {
7
- if(this.provider === "matomo") {
7
+ switch(this.provider) {
8
+ case "matomo":
8
9
  return _paq;
9
- }
10
- else {
10
+ case "ga4":
11
+ return dataLayer;
12
+ default:
11
13
  return _gaq;
12
14
  }
13
15
  }
14
16
 
15
17
  pageView() {
16
- if(this.provider === "matomo") {
17
- return 'trackPageView'
18
- } else {
19
- return '_trackPageview'
18
+ switch(this.provider) {
19
+ case "matomo":
20
+ return 'trackPageView';
21
+ case "ga4":
22
+ return 'event';
23
+ default:
24
+ return '_trackPageview';
20
25
  }
21
26
  }
22
27
 
23
28
  trackEvent() {
24
- if(this.provider === "matomo") {
25
- return 'trackEvent'
26
- } else {
27
- return '_trackEvent'
29
+ switch(this.provider) {
30
+ case "matomo":
31
+ return 'trackEvent';
32
+ case "ga4":
33
+ return 'event';
34
+ default:
35
+ return '_trackEvent';
28
36
  }
29
37
  }
30
38
  }
31
39
 
32
- function trackPageView() {
33
- window.trackingTags.analytics().push([window.trackingTags.pageView()]);
40
+ function trackPageView(provider) {
41
+ if(provider !== 'ga4'){
42
+ window.trackingTags.analytics().push([window.trackingTags.pageView()]);
43
+ }
34
44
  }
35
45
 
36
- function trackAnalyticsEvents() {
46
+ function trackAnalyticsEvents(provider) {
37
47
  $('span.analytics-event').each(function(){
38
48
  var eventSpan = $(this)
39
- window.trackingTags.analytics().push([window.trackingTags.trackEvent(), eventSpan.data('category'), eventSpan.data('action'), eventSpan.data('name')]);
49
+ if(provider !== 'ga4') {
50
+ window.trackingTags.analytics().push([window.trackingTags.trackEvent(), eventSpan.data('category'), eventSpan.data('action'), eventSpan.data('name')]);
51
+ } else {
52
+ gtag('event', eventSpan.data('action'), { 'content_type': eventSpan.data('category'), 'content_id': eventSpan.data('name')})
53
+ }
40
54
  })
41
55
  }
42
56
 
@@ -46,8 +60,8 @@ function setupTracking() {
46
60
  return;
47
61
  }
48
62
  window.trackingTags = new TrackingTags(provider)
49
- trackPageView()
50
- trackAnalyticsEvents()
63
+ trackPageView(provider)
64
+ trackAnalyticsEvents(provider)
51
65
  }
52
66
 
53
67
  if (typeof Turbolinks !== 'undefined') {
@@ -55,7 +69,7 @@ if (typeof Turbolinks !== 'undefined') {
55
69
  setupTracking()
56
70
  })
57
71
  } else {
58
- $(document).on('ready', function() {
72
+ $(document).ready(function() {
59
73
  setupTracking()
60
74
  })
61
75
  }
@@ -66,10 +80,20 @@ $(document).on('click', '#file_download', function(e) {
66
80
  return;
67
81
  }
68
82
  window.trackingTags = new TrackingTags(provider)
69
- window.trackingTags.analytics().push([trackingTags.trackEvent(), 'file-set', 'file-set-download', $(this).data('label')]);
70
- window.trackingTags.analytics().push([trackingTags.trackEvent(), 'file-set-in-work', 'file-set-in-work-download', $(this).data('work-id')]);
71
- $(this).data('collection-ids').forEach(function (collection) {
72
- window.trackingTags.analytics().push([trackingTags.trackEvent(), 'file-set-in-collection', 'file-set-in-collection-download', collection]);
73
- window.trackingTags.analytics().push([trackingTags.trackEvent(), 'work-in-collection', 'work-in-collection-download', collection]);
74
- });
83
+
84
+ if(provider !== 'ga4') {
85
+ window.trackingTags.analytics().push([trackingTags.trackEvent(), 'file-set', 'file-set-download', $(this).data('label')]);
86
+ window.trackingTags.analytics().push([trackingTags.trackEvent(), 'file-set-in-work', 'file-set-in-work-download', $(this).data('work-id')]);
87
+ $(this).data('collection-ids').forEach(function (collection) {
88
+ window.trackingTags.analytics().push([trackingTags.trackEvent(), 'file-set-in-collection', 'file-set-in-collection-download', collection]);
89
+ window.trackingTags.analytics().push([trackingTags.trackEvent(), 'work-in-collection', 'work-in-collection-download', collection]);
90
+ });
91
+ } else {
92
+ gtag('event', 'file-set-download', { 'content_type': 'file-set', 'content_id': $(this).data('label')})
93
+ gtag('event', 'file-set-in-work-download', { 'content_type': 'file-set-in-work', 'content_id': $(this).data('work-id')})
94
+ $(this).data('collection-ids').forEach(function (collection) {
95
+ gtag('event', 'file-set-in-collection-download', { 'content_type': 'file-set-in-collection', 'content_id': collection })
96
+ gtag('event', 'work-in-collection-download', { 'content_type': 'work-in-collection', 'content_id': collection })
97
+ });
98
+ }
75
99
  });
@@ -18,6 +18,9 @@ export default class LinkedData {
18
18
  let result = this.element.select2("data")
19
19
  this.element.select2("destroy")
20
20
  this.element.val(result.label).attr("readonly", "readonly")
21
+ // Adding d-block class to the remove button to show it after a selection is made.
22
+ let removeButton = this.element.closest('.field-wrapper').find('.input-group-btn.field-controls .remove')
23
+ removeButton.addClass('d-block')
21
24
  this.setIdentifier(result.id)
22
25
  }
23
26
 
@@ -40,10 +40,10 @@ function getStatusActivity(){
40
40
  }
41
41
  else if(isCollapsed){
42
42
  resultDiv.classList.remove("in");
43
- resultDiv.setAttribute("aria-expanded", "false");
43
+ // resultDiv.setAttribute("aria-expanded", "false");
44
44
  }else{
45
45
  resultDiv.classList.add("in");
46
- resultDiv.setAttribute("aria-expanded", "true");
46
+ // resultDiv.setAttribute("aria-expanded", "true");
47
47
  }
48
48
  }
49
49
 
@@ -55,10 +55,10 @@ function getStatusSettings(){
55
55
  }
56
56
  else if(isCollapsed){
57
57
  resultDiv.classList.remove("in");
58
- resultDiv.setAttribute("aria-expanded", "false");
58
+ // resultDiv.setAttribute("aria-expanded", "false");
59
59
  }else{
60
60
  resultDiv.classList.add("in");
61
- resultDiv.setAttribute("aria-expanded", "true");
61
+ // resultDiv.setAttribute("aria-expanded", "true");
62
62
  }
63
63
  }
64
64
 
@@ -31,6 +31,8 @@ export default class ControlledVocabulary extends FieldManager {
31
31
  this.paramKey = paramKey
32
32
  this.fieldName = this.element.data('fieldName')
33
33
  this.searchUrl = this.element.data('autocompleteUrl')
34
+ // Used to prevent index collisions for existing words when removing and adding back in values.
35
+ this.postRemovalAdjustment = 0
34
36
  }
35
37
 
36
38
  // Overrides FieldManager, because field manager uses the wrong selector
@@ -49,6 +51,15 @@ export default class ControlledVocabulary extends FieldManager {
49
51
  // this._manageFocus()
50
52
  // }
51
53
 
54
+ // Overrides FieldManager in order to display Remove button for values that exist at initial load time
55
+ _createRemoveControl() {
56
+ if (this.element.find('input.multi-text-field').val()) {
57
+ this.remover.addClass('d-block')
58
+ this.remover.addClass('has-existing-value')
59
+ }
60
+ $(this.fieldWrapperClass + ' .field-controls', this.element).append(this.remover)
61
+ }
62
+
52
63
  // Overrides FieldManager in order to avoid doing a clone of the existing field
53
64
  createNewField($activeField) {
54
65
  let $newField = this._newFieldTemplate()
@@ -68,20 +79,24 @@ export default class ControlledVocabulary extends FieldManager {
68
79
  }
69
80
 
70
81
  _newFieldTemplate() {
71
- let index = this._maxIndex()
82
+ let index = this._maxIndex() + this.postRemovalAdjustment
72
83
  let rowTemplate = this._template()
73
84
  let controls = this.controls.clone()//.append(this.remover)
74
85
  let row = $(rowTemplate({ "paramKey": this.paramKey,
75
86
  "name": this.fieldName,
76
87
  "index": index,
77
- "class": "controlled_vocabulary" }))
88
+ "class": "controlled_vocabulary",
89
+ "placeholder": "Search for a location..." }))
78
90
  .append(controls)
91
+ let removeButton = row.find('.remove');
92
+ removeButton.removeClass('d-block')
93
+ removeButton.removeClass('has-existing-value')
79
94
  return row
80
95
  }
81
96
 
82
97
  get _source() {
83
98
  return "<li class=\"field-wrapper input-group input-append\">" +
84
- "<input class=\"string {{class}} optional form-control {{paramKey}}_{{name}} form-control multi-text-field\" name=\"{{paramKey}}[{{name}}_attributes][{{index}}][hidden_label]\" value=\"\" id=\"{{paramKey}}_{{name}}_attributes_{{index}}_hidden_label\" data-attribute=\"{{name}}\" type=\"text\">" +
99
+ "<input class=\"string {{class}} optional form-control {{paramKey}}_{{name}} form-control multi-text-field\" name=\"{{paramKey}}[{{name}}_attributes][{{index}}][hidden_label]\" value=\"\" id=\"{{paramKey}}_{{name}}_attributes_{{index}}_hidden_label\" data-attribute=\"{{name}}\" type=\"text\" placeholder=\"{{placeholder}}\">" +
85
100
  "<input name=\"{{paramKey}}[{{name}}_attributes][{{index}}][id]\" value=\"\" id=\"{{paramKey}}_{{name}}_attributes_{{index}}_id\" type=\"hidden\" data-id=\"remote\">" +
86
101
  "<input name=\"{{paramKey}}[{{name}}_attributes][{{index}}][_destroy]\" id=\"{{paramKey}}_{{name}}_attributes_{{index}}__destroy\" value=\"\" data-destroy=\"true\" type=\"hidden\"></li>"
87
102
  }
@@ -114,9 +129,27 @@ export default class ControlledVocabulary extends FieldManager {
114
129
  // '_destroy' hidden parameter
115
130
  removeFromList( event ) {
116
131
  event.preventDefault()
132
+ // Changing behavior of the remove button to add a new field if the last field is removed
133
+ // Using querySelector to find elements with data-attribute="based_near"
134
+ const inputElements = this.element.find('input' + this.inputTypeClass)
135
+ const parentsArray = Array.from(inputElements).map(element => element.parentElement)
136
+ const nonHiddenElements = parentsArray.filter(element => element.style.display !== 'none')
137
+ const nonHiddenCount = nonHiddenElements.length
138
+ if (nonHiddenCount < 2){
139
+ let $listing = $(event.target).closest(this.inputTypeClass).find(this.listClass)
140
+ let $activeField = $listing.children('li').last()
141
+ $listing.append(this.createNewField($activeField))
142
+ this.postRemovalAdjustment += 1
143
+ }
117
144
  let field = $(event.target).parents(this.fieldWrapperClass)
118
- field.find('[data-destroy]').val('true')
119
- field.hide()
145
+ // Removes field if a value hasn't been selected, otherwise marks it for destruction.
146
+ // Prevents bug caused by marking empty fields for destruction.
147
+ if (field.find('.has-existing-value').length > 0) {
148
+ field.find('[data-destroy]').val('true')
149
+ field.hide()
150
+ } else {
151
+ field.remove()
152
+ }
120
153
  this.element.trigger("managed_field:remove", field)
121
154
  }
122
155
  }
@@ -26,8 +26,10 @@ export default class SaveManager {
26
26
  check_button() {
27
27
  if (this.is_changed) {
28
28
  this.save_button.removeClass("disabled")
29
+ this.save_button.attr("aria-disabled", "false")
29
30
  } else {
30
31
  this.save_button.addClass("disabled")
32
+ this.save_button.attr("aria-disabled", "true")
31
33
  }
32
34
  }
33
35
 
@@ -4,6 +4,7 @@
4
4
 
5
5
  this.init = function() {
6
6
  this.$label = this.$element.find('[data-search-element="label"]');
7
+ this.$visibleLabel = this.$element.find('.dropdown-toggle').find('span[aria-hidden="true"]');
7
8
  this.$items = this.$element.find('[data-search-option]');
8
9
  this.setDefault();
9
10
  }
@@ -12,7 +13,6 @@
12
13
  this.attachEvents();
13
14
  }
14
15
 
15
-
16
16
  Hyrax.Search.prototype = {
17
17
  attachEvents: function() {
18
18
 
@@ -43,6 +43,7 @@
43
43
 
44
44
  setLabel: function(label) {
45
45
  this.$label.html(label);
46
+ this.$visibleLabel.html(label);
46
47
  }
47
48
 
48
49
  }
@@ -58,8 +59,6 @@
58
59
 
59
60
  })(jQuery);
60
61
 
61
-
62
62
  Blacklight.onLoad(function() {
63
63
  $('#search-form-header').search();
64
64
  });
65
-
@@ -39,6 +39,8 @@ export default class SelectWorkType {
39
39
  // for a single work. So, given the value of 'this.type', return the appropriate
40
40
  // path.
41
41
  destination() {
42
- return this.form.find('input[type="radio"]:checked').data(this.type)
42
+ let admin_set_id = this.form.find('select').val()
43
+ let url = this.form.find('input[type="radio"]:checked').data(this.type)
44
+ return url + "&admin_set_id=" + admin_set_id
43
45
  }
44
46
  }
@@ -10,7 +10,6 @@
10
10
  * https://github.com/blueimp/jQuery-File-Upload
11
11
  *
12
12
  * Copyright 2010, Sebastian Tschan
13
- * https://blueimp.net
14
13
  *
15
14
  * Licensed under the MIT license:
16
15
  * http://www.opensource.org/licenses/MIT
@@ -21,45 +20,48 @@
21
20
 
22
21
  $.fn.extend({
23
22
  hyraxUploader: function( options ) {
24
- // Initialize our jQuery File Upload widget.
25
23
  this.fileupload($.extend({
26
- // xhrFields: {withCredentials: true}, // to send cross-domain cookies
27
- // acceptFileTypes: /(\.|\/)(png|mov|jpe?g|pdf)$/i, // not a strong check, just a regex on the filename
28
- // limitMultiFileUploadSize: 500000000, // bytes
24
+ maxChunkSize: 10000000, // 10 MB chunk size
29
25
  autoUpload: true,
30
26
  url: '/uploads/',
31
27
  type: 'POST',
32
- dropZone: $(this).find('.dropzone')
28
+ dropZone: $(this).find('.dropzone'),
29
+ add: function (e, data) {
30
+ var that = this;
31
+ $.post('/uploads/', { files: [data.files[0].name] }, function (result) {
32
+ data.formData = {id: result.files[0].id};
33
+ $.blueimp.fileupload.prototype.options.add.call(that, e, data);
34
+ });
35
+ }
33
36
  }, Hyrax.config.uploader, options))
34
37
  .on('fileuploadadded', function (e, data) {
35
38
  $(e.currentTarget).find('button.cancel').removeAttr("hidden");
36
39
  });
37
-
38
40
  $(document).on('dragover', function(e) {
39
41
  var dropZone = $('.dropzone'),
40
42
  timeout = window.dropZoneTimeout;
41
43
  if (!timeout) {
42
- dropZone.addClass('in');
44
+ dropZone.addClass('in');
43
45
  } else {
44
- clearTimeout(timeout);
46
+ clearTimeout(timeout);
45
47
  }
46
48
  var found = false,
47
49
  node = e.target;
48
50
  do {
49
- if (node === dropZone[0]) {
50
- found = true;
51
- break;
52
- }
53
- node = node.parentNode;
51
+ if (node === dropZone[0]) {
52
+ found = true;
53
+ break;
54
+ }
55
+ node = node.parentNode;
54
56
  } while (node !== null);
55
57
  if (found) {
56
- dropZone.addClass('hover');
58
+ dropZone.addClass('hover');
57
59
  } else {
58
- dropZone.removeClass('hover');
60
+ dropZone.removeClass('hover');
59
61
  }
60
62
  window.dropZoneTimeout = setTimeout(function () {
61
- window.dropZoneTimeout = null;
62
- dropZone.removeClass('in hover');
63
+ window.dropZoneTimeout = null;
64
+ dropZone.removeClass('in hover');
63
65
  }, 100);
64
66
  });
65
67
  }
@@ -90,6 +90,7 @@
90
90
  //= require hyrax/collapse
91
91
  //= require hyrax/skip_to_content
92
92
  //= require hyrax/reports-buttons
93
+ //= require hydra-editor/field_manager
93
94
 
94
95
  // this needs to be after batch_select so that the form ids get setup correctly
95
96
  //= require hyrax/batch_edit
@@ -18,6 +18,10 @@ $warning: #565653 !default;
18
18
  // * Darkens the text for disabled pagination buttons on every page.
19
19
  $breadcrumb-active-color: #4c4c4c;
20
20
  $pagination-disabled-color: #4c4c4c;
21
+ $blue: #0056B3 !default;
22
+ // Adjusts link text to show as underlined and then not underlined on hover
23
+ $link-decoration: underline !default;
24
+ $link-hover-decoration: none !default;
21
25
 
22
26
  // Date picker on safari placeholder text was misaligned
23
27
  @media screen {
@@ -2,6 +2,10 @@
2
2
  margin-bottom: 20px;
3
3
  }
4
4
 
5
+ #featured_works .card {
6
+ margin-bottom: 5px;
7
+ }
8
+
5
9
  .card-title {
6
10
  margin-top: 0;
7
11
  margin-bottom: 0;
@@ -23,6 +23,16 @@
23
23
  }
24
24
  }
25
25
 
26
+ .search-results-title-row {
27
+ .badge {
28
+ margin-bottom: 6px;
29
+ }
30
+
31
+ .search-result-title {
32
+ margin-right: 16px;
33
+ }
34
+ }
35
+
26
36
  .collection-icon-search {
27
37
  padding-bottom: 20px;
28
38
  }
@@ -91,3 +101,14 @@
91
101
  display: inline-block;
92
102
  }
93
103
  }
104
+
105
+ @media (max-width: 1199px) {
106
+ .sort-pagination {
107
+ display: block !important;
108
+ }
109
+ }
110
+
111
+ #search-results .search-result-wrapper .metadata a,
112
+ #documents .document-metadata a {
113
+ word-break: break-all;
114
+ }
@@ -684,7 +684,7 @@ button.branding-banner-remove:hover {
684
684
 
685
685
  .pagination {
686
686
 
687
- display: block;
687
+ display: flex;
688
688
  margin: 0;
689
689
  padding: 0;
690
690
 
@@ -1,9 +1,21 @@
1
1
  #facet-panel-collapse {
2
- display: inline-block !important;
2
+ display: inline-block !important;
3
3
  width: 100%;
4
4
  }
5
5
 
6
- .navbar-toggler-icon {
6
+ .facet-field-heading button.collapsed::after {
7
+ transition: transform 0.25s ease;
8
+ }
9
+
10
+ .facet-field-heading button::after {
11
+ transition: transform 0.25s ease;
12
+ }
13
+
14
+ .collapsing {
15
+ transition: height 0.25s ease;
16
+ }
17
+
18
+ .facets-header > .navbar-toggler {
7
19
  display: none;
8
20
  }
9
21
 
@@ -43,4 +55,4 @@ ul.facet-values.list-unstyled {
43
55
  content: "\f105";
44
56
  font-family: "FontAwesome";
45
57
  padding-left: 0.5rem;
46
- }
58
+ }
@@ -44,3 +44,7 @@ ol#featured_works {
44
44
  padding: 1em 0;
45
45
  border-bottom: 1px dotted $gray-lighter;
46
46
  }
47
+
48
+ .dd-handle.dd3-handle {
49
+ z-index: 1;
50
+ }
@@ -34,3 +34,9 @@
34
34
  padding-bottom: 10px;
35
35
  }
36
36
  }
37
+
38
+ // fix blueimp jQuery-File-Upload display problems under Bootstrap 4+
39
+ // found here: https://stackoverflow.com/a/48162651
40
+ .fade.in {
41
+ opacity: 1
42
+ }
@@ -1,5 +1,9 @@
1
1
  .form-tab-content {
2
2
  margin: 15px 10px;
3
+
4
+ label {
5
+ font-weight: bold;
6
+ }
3
7
  }
4
8
 
5
9
  // For the admin page //
@@ -1,6 +1,6 @@
1
1
  legend small {
2
2
  margin-left: 0.5em;
3
- color: #999999;
3
+ color: #595959;
4
4
  font-size: 15px;
5
5
  }
6
6
 
@@ -40,6 +40,7 @@ legend small {
40
40
 
41
41
  .select2-container .select2-choice > .select2-chosen {
42
42
  max-width: 26em;
43
+ overflow: auto;
43
44
  }
44
45
 
45
46
  form {
@@ -47,12 +47,12 @@ tr.dd-item {
47
47
 
48
48
  .dd-placeholder,
49
49
  .dd-empty { margin: 5px 0; padding: 0; min-height: 30px; border: 1px dashed #b6bcbf; box-sizing: border-box; -moz-box-sizing: border-box; }
50
- .dd-empty { border: 1px dashed #bbb; min-height: 100px;
51
- background-image: -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
50
+ .dd-empty { border: 1px dashed #bbb; min-height: 100px;
51
+ background-image: -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
52
52
  -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
53
- background-image: -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
53
+ background-image: -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
54
54
  -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
55
- background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
55
+ background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
56
56
  linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
57
57
  background-size: 60px 60px;
58
58
  background-position: 0 0, 30px 30px;
@@ -82,7 +82,7 @@ tr.dd-item {
82
82
  background: #fafafa;
83
83
  background: -webkit-linear-gradient(top, #fafafa 0%, #eee 100%);
84
84
  background: -moz-linear-gradient(top, #fafafa 0%, #eee 100%);
85
- background: linear-gradient(top, #fafafa 0%, #eee 100%);
85
+ background: linear-gradient(to bottom, #fafafa 0%, #eee 100%);
86
86
  -webkit-border-radius: 3px;
87
87
  border-radius: 3px;
88
88
  box-sizing: border-box; -moz-box-sizing: border-box;
@@ -95,15 +95,16 @@ tr.dd-item {
95
95
 
96
96
  .dd3-item > button { margin-left: 30px; }
97
97
 
98
- .dd3-handle {
98
+ .dd3-handle {
99
99
  position: absolute; margin: 0; left: 0; top: 0; cursor: pointer; width: 30px;
100
100
  text-indent: 100px;
101
101
  white-space: nowrap; overflow: hidden;
102
102
  border: 1px solid #aaa;
103
103
  background: #ddd;
104
104
  background: -webkit-linear-gradient(top, #ddd 0%, #bbb 100%);
105
- background: -moz-linear-gradient(top, #ddd 0%, #bbb 100%);
106
- background: linear-gradient(top, #ddd 0%, #bbb 100%);
105
+ background: -moz-linear-gradient(top, #ddd 0%, #bbb 100%);
106
+ background: -o-linear-gradient(to bottom, #ddd 0%, #bbb 100%);
107
+ background: linear-gradient(to bottom, #ddd 0%, #bbb 100%);
107
108
  border-top-right-radius: 0;
108
109
  border-bottom-right-radius: 0;
109
110
  }
@@ -54,3 +54,15 @@
54
54
  }
55
55
  }
56
56
  }
57
+
58
+ .select-work-admin-set {
59
+ margin: 20px;
60
+ select {
61
+ width: 100%;
62
+ }
63
+
64
+ .admin-set-title {
65
+ font-size: $h4-font-size;
66
+ margin-top: 0;
67
+ }
68
+ }
@@ -72,3 +72,7 @@ label.disabled {
72
72
  margin-bottom: 1rem;
73
73
  }
74
74
  }
75
+
76
+ #content_block_page {
77
+ display: block;
78
+ }
@@ -10,6 +10,9 @@
10
10
  margin-left: auto;
11
11
  }
12
12
  }
13
+ .dropdown-item {
14
+ font-size: 125%;
15
+ }
13
16
  }
14
17
 
15
18
  .no-preview,
@@ -1,7 +1,7 @@
1
1
  .controlled_vocabulary {
2
2
  @extend .multi_value;
3
3
 
4
- .listing li:only-of-type .remove {
5
- display: block;
4
+ .listing li .remove {
5
+ display: none;
6
6
  }
7
7
  }
@@ -6,12 +6,17 @@ module Hyrax
6
6
 
7
7
  included do
8
8
  before_action :find_work, only: :work
9
+ before_action :find_file_set, only: :file
9
10
  load_and_authorize_resource :work, only: :work
10
- load_and_authorize_resource :file, class: 'FileSet', only: :file, id_param: :id
11
+ load_and_authorize_resource :file, only: :file
11
12
  end
12
13
 
13
14
  def find_work
14
- @work = Hyrax::WorkRelation.new.find(params[:id])
15
+ @work = Hyrax.query_service.find_by(id: params[:id])
16
+ end
17
+
18
+ def find_file_set
19
+ @file = Hyrax.query_service.find_by(id: params[:id])
15
20
  end
16
21
  end
17
22
  end
@@ -11,10 +11,19 @@ module Hyrax
11
11
 
12
12
  # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
13
13
  def send_file_contents_valkyrie(file_set)
14
- response.headers["Accept-Ranges"] = "bytes"
15
- self.status = 200
14
+ # TODO: Refactor for goddess adapter usage
15
+ # This determines if we're dealing with active fedora or not. If we are,
16
+ # fallback to the original implementation.
16
17
  mime_type = params[:mime_type]
17
18
  file_metadata = find_file_metadata(file_set: file_set, use: use, mime_type: mime_type)
19
+ begin
20
+ ::Valkyrie::StorageAdapter.adapter_for(id: file_metadata.file_identifier)
21
+ rescue Valkyrie::StorageAdapter::AdapterNotFoundError
22
+ return show_active_fedora
23
+ end
24
+
25
+ response.headers["Accept-Ranges"] = "bytes"
26
+ self.status = 200
18
27
  return unless stale?(last_modified: file_metadata.updated_at, template: false)
19
28
 
20
29
  file = Valkyrie::StorageAdapter.find_by(id: file_metadata.file_identifier)