blacklight-spotlight 5.0.1 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +153 -48
  3. data/app/assets/javascripts/spotlight/spotlight.esm.js +33 -1
  4. data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
  5. data/app/assets/javascripts/spotlight/spotlight.js +33 -1
  6. data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
  7. data/app/assets/stylesheets/spotlight/_admin_users.scss +28 -0
  8. data/app/assets/stylesheets/spotlight/_browse.scss +1 -1
  9. data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +1 -1
  10. data/app/assets/stylesheets/spotlight/_spotlight.scss +1 -0
  11. data/app/components/spotlight/admin_users/email_component.html.erb +5 -0
  12. data/app/components/spotlight/admin_users/email_component.rb +22 -0
  13. data/app/components/spotlight/admin_users/exhibit_roles_component.html.erb +28 -0
  14. data/app/components/spotlight/admin_users/exhibit_roles_component.rb +19 -0
  15. data/app/components/spotlight/admin_users/site_admin_component.html.erb +13 -0
  16. data/app/components/spotlight/admin_users/site_admin_component.rb +17 -0
  17. data/app/components/spotlight/analytics/aggregation_component.rb +1 -1
  18. data/app/components/spotlight/analytics/dashboard_component.rb +1 -1
  19. data/app/components/spotlight/breadcrumbs_component.rb +1 -1
  20. data/app/components/spotlight/bulk_action_component.rb +1 -1
  21. data/app/components/spotlight/edit_view_links_component.rb +1 -1
  22. data/app/components/spotlight/header_navigation_link_component.rb +1 -1
  23. data/app/components/spotlight/save_search_component.rb +1 -1
  24. data/app/components/spotlight/select_image_component.rb +1 -1
  25. data/app/components/spotlight/skip_link_component.rb +1 -1
  26. data/app/components/spotlight/solr_document_legacy_embed_component.rb +2 -2
  27. data/app/components/spotlight/tag_list_form_component.rb +1 -1
  28. data/app/components/spotlight/tag_selector_component.rb +1 -1
  29. data/app/components/spotlight/title_component.rb +1 -1
  30. data/app/components/spotlight/translations/subheading_component.rb +1 -1
  31. data/app/components/spotlight/uneditable_non_default_language_component.html.erb +5 -0
  32. data/app/components/spotlight/uneditable_non_default_language_component.rb +25 -0
  33. data/app/controllers/spotlight/admin_users_controller.rb +11 -1
  34. data/app/controllers/spotlight/browse_controller.rb +2 -8
  35. data/app/controllers/spotlight/bulk_actions_controller.rb +1 -1
  36. data/app/controllers/spotlight/bulk_updates_controller.rb +22 -7
  37. data/app/controllers/spotlight/catalog_controller.rb +8 -16
  38. data/app/controllers/spotlight/dashboards_controller.rb +2 -6
  39. data/app/controllers/spotlight/exhibits_controller.rb +1 -0
  40. data/app/controllers/spotlight/home_pages_controller.rb +1 -1
  41. data/app/controllers/spotlight/searches_controller.rb +1 -1
  42. data/app/controllers/spotlight/solr_controller.rb +1 -0
  43. data/app/helpers/spotlight/main_app_helpers.rb +1 -5
  44. data/app/helpers/spotlight/rendering_helper.rb +4 -1
  45. data/app/javascript/spotlight/admin/blocks/pages_block.js +2 -0
  46. data/app/javascript/spotlight/user/carousel.js +32 -2
  47. data/app/jobs/spotlight/add_tags_job.rb +1 -0
  48. data/app/jobs/spotlight/add_uploads_from_csv.rb +1 -0
  49. data/app/jobs/spotlight/change_visibility_job.rb +1 -0
  50. data/app/jobs/spotlight/process_bulk_updates_csv_job.rb +1 -0
  51. data/app/jobs/spotlight/reindex_exhibit_job.rb +1 -0
  52. data/app/jobs/spotlight/reindex_job.rb +1 -0
  53. data/app/jobs/spotlight/remove_tags_job.rb +1 -0
  54. data/app/jobs/spotlight/rename_sidecar_field_job.rb +1 -0
  55. data/app/models/concerns/spotlight/user.rb +5 -0
  56. data/app/models/sir_trevor_rails/blocks/browse_block.rb +1 -1
  57. data/app/models/sir_trevor_rails/blocks/featured_pages_block.rb +1 -1
  58. data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +1 -0
  59. data/app/models/spotlight/ability.rb +1 -1
  60. data/app/models/spotlight/about_page.rb +1 -0
  61. data/app/models/spotlight/blacklight_configuration.rb +6 -7
  62. data/app/models/spotlight/contact.rb +2 -1
  63. data/app/models/spotlight/contact_email.rb +1 -0
  64. data/app/models/spotlight/custom_field.rb +1 -0
  65. data/app/models/spotlight/exhibit.rb +2 -9
  66. data/app/models/spotlight/feature_page.rb +1 -0
  67. data/app/models/spotlight/group.rb +2 -1
  68. data/app/models/spotlight/home_page.rb +1 -0
  69. data/app/models/spotlight/job_tracker.rb +1 -1
  70. data/app/models/spotlight/main_navigation.rb +1 -1
  71. data/app/models/spotlight/page.rb +35 -19
  72. data/app/models/spotlight/resource.rb +1 -0
  73. data/app/models/spotlight/resources/iiif_manifest.rb +0 -126
  74. data/app/models/spotlight/resources/iiif_manifest_metadata.rb +161 -0
  75. data/app/models/spotlight/resources/iiif_manifest_v3.rb +41 -0
  76. data/app/models/spotlight/resources/iiif_service.rb +25 -1
  77. data/app/models/spotlight/search.rb +2 -1
  78. data/app/services/spotlight/exhibit_import_export_service.rb +3 -1
  79. data/app/views/spotlight/accessibility/alt_text.html.erb +3 -0
  80. data/app/views/spotlight/admin_users/index.html.erb +16 -26
  81. data/app/views/spotlight/appearances/edit.html.erb +14 -9
  82. data/app/views/spotlight/catalog/_document_admin_table.html.erb +2 -6
  83. data/app/views/spotlight/catalog/edit.html.erb +1 -6
  84. data/app/views/spotlight/exhibits/_exhibit_card.html.erb +1 -1
  85. data/app/views/spotlight/exhibits/_form.html.erb +2 -2
  86. data/app/views/spotlight/metadata_configurations/edit.html.erb +47 -44
  87. data/app/views/spotlight/pages/_order_pages.html.erb +34 -29
  88. data/app/views/spotlight/pages/show.html.erb +4 -2
  89. data/app/views/spotlight/resources/csv_upload/_form.html.erb +2 -0
  90. data/app/views/spotlight/search_configurations/edit.html.erb +40 -34
  91. data/app/views/spotlight/searches/index.html.erb +4 -2
  92. data/app/views/spotlight/sir_trevor/blocks/_embedded_document.html.erb +2 -2
  93. data/app/views/spotlight/sir_trevor/blocks/_search_results_block.html.erb +2 -2
  94. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +5 -3
  95. data/app/views/spotlight/sir_trevor/blocks/_text_block.html.erb +1 -1
  96. data/app/views/spotlight/translations/_page.html.erb +1 -1
  97. data/config/initializers/devise_rails8_patch.rb +13 -0
  98. data/config/locales/spotlight.en.yml +39 -5
  99. data/config/routes.rb +5 -1
  100. data/lib/spotlight/engine.rb +10 -26
  101. data/lib/spotlight/version.rb +1 -1
  102. data/spec/fixtures/iiif_responses.rb +344 -0
  103. data/spec/support/features/test_features_helpers.rb +4 -6
  104. data/spec/support/stub_iiif_response.rb +1 -0
  105. data/spec/support/with_queue_adapter.rb +17 -0
  106. metadata +44 -31
  107. data/app/components/spotlight/blocks/heading_block_component.erb +0 -2
  108. data/app/components/spotlight/blocks/heading_block_component.rb +0 -36
@@ -9,9 +9,11 @@
9
9
  <div class="clearfix">
10
10
  <%= render 'edit_page_link' if can? :edit, @page %>
11
11
  <% if @page.should_display_title? %>
12
- <h1 class="page-title">
12
+ <h2 class="page-title h1">
13
13
  <%= @page.title %>
14
- </h1>
14
+ </h2>
15
+ <% else %>
16
+ <h2 class="visually-hidden"><%= t '.default_page_title'%></h2>
15
17
  <% end %>
16
18
  </div>
17
19
  <div>
@@ -1,3 +1,5 @@
1
+ <div class="instructions mb-4"><%= t('.instructions_html') %></div>
2
+
1
3
  <%= bootstrap_form_for([current_exhibit, @resource.becomes(Spotlight::Resources::CsvUpload)], layout: :horizontal, label_col: 'col-md-2', control_col: 'col-sm-6 col-md-6', html: { class: 'item-upload-form', multipart: true } ) do |f| %>
2
4
  <%= f.url_field :url, type: "file", help: t('.help_html', link: link_to(t('.template'), template_exhibit_resources_csv_uploads_path, data: { turbo: false })), label: t('.file_label') %>
3
5
  <div class="form-actions">
@@ -3,45 +3,51 @@
3
3
  <% end %>
4
4
 
5
5
  <%= configuration_page_title %>
6
- <%= bootstrap_form_for @blacklight_configuration, url: spotlight.exhibit_search_configuration_path(@exhibit), layout: :horizontal, label_col: 'col-md-3 col-sm-3', control_col: 'col-md-5 col-sm-5' do |f| %>
7
-
8
- <div role="tabpanel">
9
- <ul class="nav nav-tabs" role="tablist">
10
- <li role="presentation" class="nav-item">
11
- <a href="#options" aria-controls="options" role="tab" data-bs-toggle="tab" class="nav-link active"><%= t(:'.tab.options') %></a>
12
- </li>
13
- <li role="presentation" class="nav-item">
14
- <a href="#facets" aria-controls="facets" role="tab" data-bs-toggle="tab" class="nav-link"><%= t(:'.tab.facets') %></a>
15
- </li>
16
- <li role="presentation" class="nav-item">
17
- <a href="#results" aria-controls="results" role="tab" data-bs-toggle="tab" class="nav-link"><%= t(:'.tab.results') %></a>
18
- </li>
19
- </ul>
20
- <div class="tab-content">
21
- <div role="tabpanel" class="tab-pane active" id="options">
22
- <%= render 'search_fields', f: f %>
23
- </div>
24
-
25
- <div role="tabpanel" class="tab-pane" id="facets">
26
- <%= render 'facets', f: f %>
27
- </div>
28
6
 
29
- <div role="tabpanel" class="tab-pane" id="results">
30
- <%= field_set_tag do %>
31
- <%= render 'document_index_view_types', f: f %>
32
- <%= render 'default_per_page', f: f %>
33
- <% end %>
7
+ <%# These fields are translatable and should only be edited here in the default locale %>
8
+ <% if default_language? %>
9
+ <%= bootstrap_form_for @blacklight_configuration, url: spotlight.exhibit_search_configuration_path(@exhibit), layout: :horizontal, label_col: 'col-md-3 col-sm-3', control_col: 'col-md-5 col-sm-5' do |f| %>
10
+
11
+ <div role="tabpanel">
12
+ <ul class="nav nav-tabs" role="tablist">
13
+ <li role="presentation" class="nav-item">
14
+ <a href="#options" aria-controls="options" role="tab" data-bs-toggle="tab" class="nav-link active"><%= t(:'.tab.options') %></a>
15
+ </li>
16
+ <li role="presentation" class="nav-item">
17
+ <a href="#facets" aria-controls="facets" role="tab" data-bs-toggle="tab" class="nav-link"><%= t(:'.tab.facets') %></a>
18
+ </li>
19
+ <li role="presentation" class="nav-item">
20
+ <a href="#results" aria-controls="results" role="tab" data-bs-toggle="tab" class="nav-link"><%= t(:'.tab.results') %></a>
21
+ </li>
22
+ </ul>
23
+ <div class="tab-content">
24
+ <div role="tabpanel" class="tab-pane active" id="options">
25
+ <%= render 'search_fields', f: f %>
26
+ </div>
27
+
28
+ <div role="tabpanel" class="tab-pane" id="facets">
29
+ <%= render 'facets', f: f %>
30
+ </div>
31
+
32
+ <div role="tabpanel" class="tab-pane" id="results">
33
+ <%= field_set_tag do %>
34
+ <%= render 'document_index_view_types', f: f %>
35
+ <%= render 'default_per_page', f: f %>
36
+ <% end %>
37
+
38
+ <%= render 'sort', f: f %>
39
+ </div>
34
40
 
35
- <%= render 'sort', f: f %>
36
41
  </div>
37
-
38
42
  </div>
39
- </div>
40
43
 
41
- <div class="form-actions">
42
- <div class="primary-actions">
43
- <%= f.submit nil, class: 'btn btn-primary' %>
44
+ <div class="form-actions">
45
+ <div class="primary-actions">
46
+ <%= f.submit nil, class: 'btn btn-primary' %>
47
+ </div>
44
48
  </div>
45
- </div>
46
49
 
50
+ <% end %>
51
+ <% else %>
52
+ <%= render Spotlight::UneditableNonDefaultLanguageComponent.new(current_exhibit:, current_language: I18n.locale)%>
47
53
  <% end %>
@@ -4,14 +4,14 @@
4
4
 
5
5
  <%= curation_page_title %>
6
6
 
7
- <% if @searches.empty? %>
7
+ <% if @searches.empty? && default_language? %>
8
8
  <%= t :'.no_saved_searches' %>
9
9
  <% unless @exhibit.searchable? %>
10
10
  <p class="instructions alert-warning">
11
11
  <%= t(:'.not_searchable_html', href: link_to(t(:'spotlight.configuration.sidebar.search_configuration'), spotlight.edit_exhibit_search_configuration_path(@exhibit))) %>
12
12
  </p>
13
13
  <% end %>
14
- <% else %>
14
+ <% elsif default_language? %>
15
15
  <div role="tabpanel">
16
16
  <ul class="nav nav-tabs" role="tablist">
17
17
  <li role="presentation" class="nav-item">
@@ -74,4 +74,6 @@
74
74
  </div>
75
75
  </div>
76
76
  </div>
77
+ <% else %>
78
+ <%= render Spotlight::UneditableNonDefaultLanguageComponent.new(current_exhibit:, current_language: I18n.locale) %>
77
79
  <% end %>
@@ -1,8 +1,8 @@
1
1
  <div class="box" data-id="<%= document.id %>">
2
2
  <% view_config = blacklight_config.view_config(:embed) %>
3
- <%= render (view_config.document_component || Spotlight::SolrDocumentLegacyEmbedComponent).new((Blacklight.version > '8.0' ? :document : :presenter) => document_presenter(document, view_config: view_config), counter: nil, block: local_assigns[:block]) do |component| %>
3
+ <%= render (view_config.document_component || Spotlight::SolrDocumentLegacyEmbedComponent).new(document: document_presenter(document, view_config: view_config), counter: nil, block: local_assigns[:block]) do |component| %>
4
4
  <% component.with_partial do %>
5
5
  <%= render_document_partials document, view_config.partials, component: component, document_counter: nil, view_config: view_config, block: local_assigns[:block], **(view_config.locals) %>
6
- <% end if view_config&.partials&.any? %>
6
+ <% end if Blacklight.version < '9.0' && view_config&.partials&.any? %>
7
7
  <% end %>
8
8
  </div>
@@ -1,12 +1,12 @@
1
1
  <% if search_results_block.searches? %>
2
2
  <div class="content-block documents">
3
- <% response, document_list = get_search_widget_search_results(search_results_block) %>
3
+ <% response = get_search_widget_search_results(search_results_block) %>
4
4
  <%- unless response.documents.present? %>
5
5
  <div class="alert alert-warning">
6
6
  <strong>No items to display.</strong> There are currently no items in this exhibit that match the curator's search criteria.
7
7
  </div>
8
8
  <%- else %>
9
- <% @response, @document_list = [response, document_list] %>
9
+ <% @response = response %>
10
10
 
11
11
  <% views = blacklight_view_config_for_search_block(search_results_block) %>
12
12
  <% if views.length > 1 -%>
@@ -15,7 +15,7 @@
15
15
  <% elsif doc_presenter.thumbnail.exists? %>
16
16
  <%= doc_presenter.thumbnail.thumbnail_tag({ alt: resource_alt_text(block_options, doc_presenter.heading) }, document_counter: -1) %>
17
17
  <% end %>
18
- <div class="carousel-caption">
18
+ <div class="carousel-caption" id="carousel-caption-<%= document.id %>">
19
19
  <% if solr_documents_carousel_block.primary_caption? %>
20
20
  <h3 class="primary">
21
21
  <%= solr_documents_carousel_block.document_caption(doc_presenter, solr_documents_carousel_block.primary_caption_field) %>
@@ -40,10 +40,12 @@
40
40
  </ol>
41
41
 
42
42
  <!-- Controls -->
43
- <a class="left carousel-control-prev" href="#<%= html_id %>" data-bs-slide="prev">
43
+ <a class="left carousel-control-prev" href="#<%= html_id %>" data-bs-slide="prev"
44
+ aria-label="<%= t('spotlight.sir_trevor.blocks.solr_documents_carousel_block.controls.previous_item') %>">
44
45
  <%= blacklight_icon('arrow_back_ios') %>
45
46
  </a>
46
- <a class="right carousel-control-next" href="#<%= html_id %>" data-bs-slide="next">
47
+ <a class="right carousel-control-next" href="#<%= html_id %>" data-bs-slide="next"
48
+ aria-label="<%= t('spotlight.sir_trevor.blocks.solr_documents_carousel_block.controls.next_item') %>">
47
49
  <%= blacklight_icon('arrow_forward_ios') %>
48
50
  </a>
49
51
  </div>
@@ -1,4 +1,4 @@
1
1
  <div class="st__content-block st__content-block--text">
2
- <%# We prefer the GitHub markup here. %>
2
+ <%# We prefer the Redcarpet markup here. %>
3
3
  <%= sir_trevor_markdown text_block.text %>
4
4
  </div>
@@ -1,7 +1,7 @@
1
1
  <% translated_page = page.translated_page_for(@language) %>
2
2
  <tr data-translation-progress-item="true">
3
3
  <td>
4
- <%= link_to page.title, polymorphic_path([spotlight, current_exhibit, page]) %>
4
+ <%= link_to page.default_locale_title, polymorphic_path([spotlight, current_exhibit, page], locale: I18n.default_locale) %>
5
5
  <p class="<%= 'default-page-outdated' if page.updated_after? translated_page %>">
6
6
  <%= l(page.updated_at, format: :long) %>
7
7
  </p>
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'devise' # make sure it's already loaded
4
+
5
+ # Starting from Rails 8.0, routes are lazy-loaded by default in test and development environments.
6
+ # However, Devise's mappings are built during the routes loading phase.
7
+ # To ensure it works correctly, we need to load the routes first before accessing @@mappings.
8
+ module Devise
9
+ def self.mappings
10
+ Rails.application.try(:reload_routes_unless_loaded)
11
+ @@mappings
12
+ end
13
+ end
@@ -200,6 +200,7 @@ en:
200
200
  has_alt_text: Items with alt text
201
201
  page_title: Page title
202
202
  total_items: Of the items displayed via widgets, <b>%{has_alt_text} of %{total_alt_items}</b> have entered alt text (or a checked decorative box).
203
+ unpublished: Unpublished
203
204
  header: Accessibility
204
205
  admin_users:
205
206
  create:
@@ -212,13 +213,22 @@ en:
212
213
  admins_curators: Administrators and curators of all exhibits
213
214
  all_users: All registered users
214
215
  copy: Copy
215
- create: Add new administrator
216
- destroy: Remove from admin role
217
- instructions: Existing exhibits administrators
216
+ create: Add new site admin
217
+ destroy: Remove site admin role
218
+ destroy_confirm: Are you sure you want to remove the site admin role for %{email}?
219
+ exhibit_roles: Exhibit roles
220
+ instructions: Existing exhibits site administrators
218
221
  page_title: Manage users
219
222
  pending: pending
223
+ remove_roles: Remove all exhibit roles
224
+ remove_roles_confirm: Are you sure you want to remove all exhibit roles for %{email}?
220
225
  save: Add role
221
- update: Make user an administrator
226
+ show_exhibit_roles: Show exhibit title (role)
227
+ site_admin: Site admin
228
+ update: Make user a site admin
229
+ remove_exhibit_roles:
230
+ error: There was a problem removing the user's exhibit roles
231
+ success: Removed all exhibit roles for user
222
232
  appearances:
223
233
  edit:
224
234
  header: Appearance
@@ -575,6 +585,10 @@ en:
575
585
  published:
576
586
  help_block: ''
577
587
  uneditable_non_default_language: This field is not editable in the current language. Switch to the default language to edit it.
588
+ uneditable_non_default_language_form:
589
+ default_language: Switch to default language
590
+ instructions: Please use the translations editor or switch to the default language to make configuration changes.
591
+ translations: Edit translations
578
592
  groups:
579
593
  all: All
580
594
  import:
@@ -757,16 +771,31 @@ en:
757
771
  header: New page
758
772
  order_pages:
759
773
  cancel: Cancel
760
- instructions: Add new pages below. Drag and drop pages to change the order in which they are displayed in the sidebar.
774
+ instructions_html: |
775
+ <p>Add new pages below. Drag and drop pages to change the order in which they are displayed in the sidebar.</p>
776
+ <p><b>Note About Page Titles and URLs</b></p>
777
+ <p>When renaming pages, keep in mind that Spotlight automatically creates a unique URL (called a slug) based on the page title. If another page is already using that slug—even if it has been renamed—the new page's URL will include extra characters to make it unique.</p>
778
+ <p><b>Tip:</b> If you want a new or renamed page to have a clean URL (e.g., /collection-highlights), make sure to delete the original page that first used that title before renaming.</p>
761
779
  new_page: Add new page
762
780
  pages_header: Custom pages
763
781
  save: Save
782
+ show:
783
+ default_page_title: Main Content
764
784
  resources:
765
785
  csv_upload:
766
786
  form:
767
787
  add_item: Add item
768
788
  file_label: CSV file
769
789
  help_html: "%{link}"
790
+ instructions_html: |
791
+ <p><b>Tips for uploading items via CSV</b></p>
792
+ <ul>
793
+ <li>Only .jpg, .jpeg, or .png files can be uploaded as items.</li>
794
+ <li>Each item file must be under 10 MB.</li>
795
+ <li>Images from phones/tablets may display sideways or upside-down. Re-saving the image in Photoshop or another editor can help correct this.</li>
796
+ <li>Rows with a blank URL field will be skipped. Use ~ to skip the field but still index the item.</li>
797
+ <li>CSVs saved from Excel may include hidden characters. Use a plain text editor to clean and re-save the file if errors occur.</li>
798
+ </ul>
770
799
  template: Download template
771
800
  title: Upload multiple items
772
801
  external_resources_form:
@@ -822,6 +851,7 @@ en:
822
851
  fields:
823
852
  abstract_tesim: Abstract
824
853
  corporate_name_ssm: Corporate names
854
+ exhibit_tags: Exhibit tags
825
855
  facet:
826
856
  corporate_name_ssm: Corporate names
827
857
  exhibit_tags: Exhibit tags
@@ -975,6 +1005,10 @@ en:
975
1005
  other: "%{count} items"
976
1006
  solr_documents_block:
977
1007
  zpr_link_html: View <span class="visually-hidden">%{title}</span> larger
1008
+ solr_documents_carousel_block:
1009
+ controls:
1010
+ next_item: Next item
1011
+ previous_item: Previous item
978
1012
  uploaded_items_block:
979
1013
  zpr_link_html: View <span class="visually-hidden">%{title}</span> larger
980
1014
  sites:
data/config/routes.rb CHANGED
@@ -16,7 +16,11 @@ Spotlight::Engine.routes.draw do
16
16
 
17
17
  get '/exhibits/edit', to: 'sites#edit_exhibits', as: 'edit_site_exhibits'
18
18
 
19
- resources :admin_users, only: %i[index create update destroy]
19
+ resources :admin_users, only: %i[index create update destroy] do
20
+ member do
21
+ delete 'remove_exhibit_roles'
22
+ end
23
+ end
20
24
 
21
25
  resources :exhibits, path: '/', except: [:show] do
22
26
  member do
@@ -25,8 +25,7 @@ module Spotlight
25
25
  isolate_namespace Spotlight
26
26
 
27
27
  require 'carrierwave'
28
- require 'redcarpet' # required for markdown support in github/markup https://github.com/github/markup#markups
29
- require 'github/markup'
28
+ require 'redcarpet' # required for markdown support
30
29
  require 'openseadragon'
31
30
 
32
31
  config.assets.precompile += %w[spotlight/fallback/*.png] if defined?(Sprockets)
@@ -158,7 +157,7 @@ module Spotlight
158
157
  ]
159
158
 
160
159
  config.iiif_manifest_field = :iiif_manifest_url_ssi
161
- config.iiif_metadata_class = -> { Spotlight::Resources::IiifManifest::Metadata }
160
+ config.iiif_metadata_class = -> { Spotlight::Resources::IiifManifestMetadata }
162
161
  config.iiif_collection_id_field = :collection_id_ssim
163
162
  config.iiif_title_fields = nil
164
163
  config.default_json_ld_language = 'en'
@@ -265,31 +264,16 @@ module Spotlight
265
264
 
266
265
  config.spambot_honeypot_email_field = :email_address
267
266
 
268
- if Blacklight::VERSION > '8'
269
- Blacklight::Configuration.default_configuration do
270
- # Field containing the last modified date for a Solr document
271
- Blacklight::Configuration.default_values[:index].timestamp_field ||= 'timestamp'
267
+ Blacklight::Configuration.default_configuration do
268
+ # Field containing the last modified date for a Solr document
269
+ Blacklight::Configuration.default_values[:index].timestamp_field ||= 'timestamp'
272
270
 
273
- # Default configuration for the browse view
274
- Blacklight::Configuration.property :browse, default: Blacklight::OpenStructWithHashAccess.new(document_actions: [])
271
+ # Default configuration for the browse view
272
+ Blacklight::Configuration.property :browse, default: Blacklight::OpenStructWithHashAccess.new(document_actions: [])
275
273
 
276
- Blacklight::Configuration.default_values[:search_state_fields] ||= []
277
- Blacklight::Configuration.default_values[:search_state_fields] += %i[id exhibit_id browse_category_id]
278
- Blacklight::Configuration.default_values[:skip_link_component] = Spotlight::SkipLinkComponent
279
- end
280
- else
281
- config.to_prepare do
282
- Blacklight::Configuration.try(:initialize_default_configuration) unless Blacklight::Configuration.try(:initialized_default_configuration?)
283
-
284
- # Field containing the last modified date for a Solr document
285
- Blacklight::Configuration.default_values[:index].timestamp_field ||= 'timestamp'
286
-
287
- # Default configuration for the browse view
288
- Blacklight::Configuration.default_values[:browse] ||= Blacklight::OpenStructWithHashAccess.new(document_actions: [])
289
-
290
- Blacklight::Configuration.default_values[:search_state_fields] ||= []
291
- Blacklight::Configuration.default_values[:search_state_fields] += %i[id exhibit_id browse_category_id]
292
- end
274
+ Blacklight::Configuration.default_values[:search_state_fields] ||= []
275
+ Blacklight::Configuration.default_values[:search_state_fields] += %i[id exhibit_id browse_category_id]
276
+ Blacklight::Configuration.default_values[:skip_link_component] = Spotlight::SkipLinkComponent
293
277
  end
294
278
 
295
279
  # make blacklight configuration play nice with bootstrap_form
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotlight
4
- VERSION = '5.0.1'
4
+ VERSION = '5.2.0'
5
5
  end