blacklight-spotlight 4.1.2 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spotlight/spotlight.esm.js +27 -24
  3. data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
  4. data/app/assets/javascripts/spotlight/spotlight.js +27 -24
  5. data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
  6. data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +19 -1
  7. data/app/components/spotlight/breadcrumbs_component.html.erb +19 -0
  8. data/app/components/spotlight/breadcrumbs_component.rb +23 -0
  9. data/app/components/spotlight/exhibit_navbar_component.html.erb +25 -0
  10. data/app/components/spotlight/exhibit_navbar_component.rb +12 -0
  11. data/app/components/spotlight/tag_list_form_component.html.erb +14 -0
  12. data/app/components/spotlight/tag_list_form_component.rb +13 -0
  13. data/app/controllers/concerns/spotlight/controller.rb +9 -1
  14. data/app/controllers/spotlight/about_pages_controller.rb +1 -1
  15. data/app/controllers/spotlight/admin_users_controller.rb +2 -2
  16. data/app/controllers/spotlight/appearances_controller.rb +3 -3
  17. data/app/controllers/spotlight/browse_controller.rb +2 -2
  18. data/app/controllers/spotlight/bulk_updates_controller.rb +6 -1
  19. data/app/controllers/spotlight/catalog_controller.rb +11 -10
  20. data/app/controllers/spotlight/contacts_controller.rb +5 -5
  21. data/app/controllers/spotlight/custom_fields_controller.rb +5 -5
  22. data/app/controllers/spotlight/custom_search_fields_controller.rb +5 -5
  23. data/app/controllers/spotlight/dashboards_controller.rb +4 -4
  24. data/app/controllers/spotlight/exhibits_controller.rb +6 -5
  25. data/app/controllers/spotlight/feature_pages_controller.rb +5 -5
  26. data/app/controllers/spotlight/home_pages_controller.rb +2 -2
  27. data/app/controllers/spotlight/job_trackers_controller.rb +3 -3
  28. data/app/controllers/spotlight/metadata_configurations_controller.rb +3 -3
  29. data/app/controllers/spotlight/pages_controller.rb +2 -2
  30. data/app/controllers/spotlight/resources_controller.rb +4 -4
  31. data/app/controllers/spotlight/roles_controller.rb +3 -3
  32. data/app/controllers/spotlight/search_configurations_controller.rb +3 -3
  33. data/app/controllers/spotlight/searches_controller.rb +4 -4
  34. data/app/controllers/spotlight/sites_controller.rb +4 -4
  35. data/app/controllers/spotlight/tags_controller.rb +3 -3
  36. data/app/controllers/spotlight/translations_controller.rb +3 -3
  37. data/app/javascript/spotlight/admin/edit_in_place.js +27 -0
  38. data/app/javascript/spotlight/admin/index.js +0 -2
  39. data/app/models/breadcrumb.rb +15 -0
  40. data/app/models/spotlight/analytics/ga.rb +2 -2
  41. data/app/views/shared/_exhibit_navbar.html.erb +2 -24
  42. data/app/views/shared/_masthead.html.erb +1 -1
  43. data/app/views/spotlight/exhibits/_form.html.erb +1 -1
  44. data/app/views/spotlight/exhibits/_new_exhibit_form.html.erb +1 -1
  45. data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +16 -5
  46. data/app/views/spotlight/metadata_configurations/edit.html.erb +2 -2
  47. data/config/locales/spotlight.en.yml +4 -0
  48. data/lib/generators/spotlight/templates/catalog_controller.rb +1 -0
  49. data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +4 -0
  50. data/lib/spotlight/engine.rb +2 -9
  51. data/lib/spotlight/version.rb +1 -1
  52. data/spec/support/views/test_view_helpers.rb +0 -1
  53. metadata +10 -26
  54. data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +0 -39
  55. data/app/javascript/spotlight/admin/appearance.js +0 -22
  56. data/app/views/shared/_breadcrumbs.html.erb +0 -7
@@ -18,7 +18,6 @@
18
18
  padding: 0.75rem 0.75rem 0.75rem 40px;
19
19
  margin: 0;
20
20
  margin-top: -1px;
21
-
22
21
  }
23
22
 
24
23
  .dd3-handle:before {
@@ -48,9 +47,27 @@
48
47
  }
49
48
  }
50
49
 
50
+ .metadata-configuration {
51
+ td, th {
52
+ padding: 0.75rem 0.25rem;
53
+ }
54
+ th {
55
+ font-size: $font-size-sm;
56
+ }
57
+ .metadata-label-edit {
58
+ max-width: fit-content;
59
+ }
60
+ .restore-default .btn {
61
+ text-wrap: nowrap;
62
+ margin-left: 0.5rem;
63
+ }
64
+ }
65
+
66
+ // the table id
51
67
  #nested-fields {
52
68
  margin-bottom: 1em;
53
69
 
70
+ // the tbody class
54
71
  .metadata_fields {
55
72
  .checkbox-cell {
56
73
  vertical-align: middle;
@@ -59,6 +76,7 @@
59
76
 
60
77
  .metadata-select {
61
78
  display: inline-block;
79
+ text-wrap: nowrap;
62
80
  min-width: 72px;
63
81
  }
64
82
  }
@@ -0,0 +1,19 @@
1
+ <div class="container breadcrumbs-container" role="navigation" aria-label="<%= t('spotlight.breadcrumb.label') %>">
2
+ <div class="row">
3
+ <div class="col-md-12">
4
+ <nav>
5
+ <ul class="breadcrumb list-unstyled d-flex">
6
+ <% breadcrumbs.each do |crumb| %>
7
+ <li class="breadcrumb-item <%= crumb == breadcrumbs.last ? 'active' : '' %>">
8
+ <% if crumb.link? && crumb != breadcrumbs.last %>
9
+ <%= link_to crumb.name, path(crumb.path) %>
10
+ <% else %>
11
+ <%= crumb.name %>
12
+ <% end %>
13
+ </li>
14
+ <% end %>
15
+ </ul>
16
+ </nav>
17
+ </div>
18
+ </div>
19
+ </div>
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spotlight
4
+ # Component to render breadcrumbs
5
+ class BreadcrumbsComponent < ViewComponent::Base
6
+ attr_reader :breadcrumbs
7
+
8
+ def initialize(breadcrumbs: [])
9
+ @breadcrumbs = breadcrumbs
10
+ super
11
+ end
12
+
13
+ def render?
14
+ !helpers.resource_masthead? && breadcrumbs.present?
15
+ end
16
+
17
+ def path(path)
18
+ return path unless path.instance_of?(::Spotlight::Exhibit)
19
+
20
+ helpers.exhibit_path(path)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,25 @@
1
+ <div id="exhibit-navbar" class="exhibit-navbar navbar navbar-light navbar-expand-md" role="navigation" aria-label="<%= t('spotlight.exhibitnavbar.label') %>">
2
+ <div class="container flex-column flex-md-row">
3
+ <% if helpers.resource_masthead? %>
4
+ <%= link_to(helpers.current_exhibit.title, helpers.spotlight.exhibit_path(helpers.current_exhibit), class: 'navbar-brand') %>
5
+ <% end %>
6
+
7
+ <ul class="navbar-nav <%= helpers.resource_masthead? ? 'justify-content-md-end' : 'mr-auto me-auto' %>">
8
+ <li class="nav-item <%= "active" if helpers.current_page?([helpers.spotlight, helpers.current_exhibit]) %>"><%= link_to t(:'spotlight.curation.nav.home'), [helpers.spotlight, helpers.current_exhibit], class: 'nav-link' %></li>
9
+ <% helpers.current_exhibit.main_navigations.displayable.each do |navigation| %>
10
+ <%= render partial: "shared/#{navigation.nav_type}_navbar", locals: { navigation: navigation } %>
11
+ <% end %>
12
+ </ul>
13
+ <% if helpers.should_render_spotlight_search_bar? %>
14
+ <div class="navbar-right navbar-nav exhibit-search-form mt-3 mt-md-0">
15
+ <%= prepend_to_search_bar %>
16
+ <%= render search_component.new(
17
+ url: helpers.search_action_url,
18
+ advanced_search_url: helpers.search_action_url(action: 'advanced_search'),
19
+ params: helpers.search_state.params_for_search.except(:qt),
20
+ autocomplete_path: suggest_index_catalog_path
21
+ ) %>
22
+ </div>
23
+ <% end %>
24
+ </div>
25
+ </div>
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spotlight
4
+ # Allows component addition to exhibit navbar
5
+ class ExhibitNavbarComponent < ViewComponent::Base
6
+ renders_one :prepend_to_search_bar
7
+
8
+ def search_component
9
+ helpers.blacklight_config&.view_config(helpers.document_index_view_type)&.search_bar_component || Blacklight::SearchBarComponent
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,14 @@
1
+ <% if Spotlight::Engine.config.site_tags %>
2
+ <div class="form-group row">
3
+ <label class="col-form-label col-md-2" for="tag_list">Tag list</label>
4
+ <div class="col-md-10">
5
+ <div class="overflow-scroll rounded border px-3 py-2 h-25" style="overflow: scroll; height: 25vh!important;">
6
+ <% Spotlight::Engine.config.site_tags.each do |tag| %>
7
+ <%= form.check_box :tag_list, { multiple: true, label: tag }, tag , nil %>
8
+ <% end %>
9
+ </div>
10
+ </div>
11
+ </div>
12
+ <% else %>
13
+ <%= form.text_field :tag_list, value: form.object.tag_list.to_s %>
14
+ <% end %>
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spotlight
4
+ # Create tag list for exhibit general/create form
5
+ class TagListFormComponent < ViewComponent::Base
6
+ attr_reader :form
7
+
8
+ def initialize(form:)
9
+ @form = form
10
+ super
11
+ end
12
+ end
13
+ end
@@ -11,7 +11,7 @@ module Spotlight
11
11
  include Spotlight::Config
12
12
 
13
13
  included do
14
- helper_method :current_site, :current_exhibit, :current_masthead, :exhibit_masthead?, :resource_masthead?
14
+ helper_method :current_site, :current_exhibit, :current_masthead, :exhibit_masthead?, :resource_masthead?, :breadcrumbs
15
15
  before_action :set_exhibit_locale_scope, :set_locale
16
16
  end
17
17
 
@@ -23,6 +23,14 @@ module Spotlight
23
23
  @current_site ||= Spotlight::Site.instance
24
24
  end
25
25
 
26
+ def breadcrumbs
27
+ @breadcrumbs ||= []
28
+ end
29
+
30
+ def add_breadcrumb(name, path = nil, _current = nil)
31
+ breadcrumbs << Breadcrumb.new(name, path)
32
+ end
33
+
26
34
  def current_exhibit
27
35
  @exhibit || (Spotlight::Exhibit.find(params[:exhibit_id]) if params[:exhibit_id].present?)
28
36
  end
@@ -46,7 +46,7 @@ module Spotlight
46
46
 
47
47
  def attach_section_breadcrumbs
48
48
  if action_name == 'edit'
49
- add_breadcrumb t(:'spotlight.pages.index.about_pages.header'), exhibit_about_pages_path(@exhibit)
49
+ add_breadcrumb(t(:'spotlight.pages.index.about_pages.header'), exhibit_about_pages_path(@exhibit))
50
50
  else
51
51
  add_breadcrumb(@exhibit.main_navigations.about.label_or_default, [spotlight, @exhibit, @exhibit.main_about_page])
52
52
  end
@@ -11,8 +11,8 @@ module Spotlight
11
11
  load_and_authorize_resource :site, class: 'Spotlight::Site'
12
12
 
13
13
  def index
14
- add_breadcrumb t(:'spotlight.sites.home'), root_url
15
- add_breadcrumb t(:'spotlight.admin_users.index.page_title')
14
+ add_breadcrumb(t(:'spotlight.sites.home'), root_url)
15
+ add_breadcrumb(t(:'spotlight.admin_users.index.page_title'))
16
16
  end
17
17
 
18
18
  def create
@@ -8,9 +8,9 @@ module Spotlight
8
8
  load_and_authorize_resource id_param: :exhibit_id, instance_name: 'exhibit', class: 'Spotlight::Exhibit', parent: false
9
9
 
10
10
  def edit
11
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
12
- add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
13
- add_breadcrumb t(:'spotlight.configuration.sidebar.appearance'), edit_exhibit_appearance_path(@exhibit)
11
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
12
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit))
13
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.appearance'), edit_exhibit_appearance_path(@exhibit))
14
14
  end
15
15
 
16
16
  def update
@@ -67,13 +67,13 @@ module Spotlight
67
67
  end
68
68
 
69
69
  def attach_breadcrumbs
70
- add_breadcrumb t(:'spotlight.curation.nav.home', title: @exhibit.title), @exhibit
70
+ add_breadcrumb(t(:'spotlight.curation.nav.home', title: @exhibit.title), @exhibit)
71
71
  add_breadcrumb(@exhibit.main_navigations.browse.label_or_default, exhibit_browse_index_path(@exhibit))
72
72
  add_breadcrumb(@group.title, exhibit_browse_groups_path(@exhibit, @group)) if @group.present?
73
73
  end
74
74
 
75
75
  def attach_search_breadcrumb
76
- add_breadcrumb @search.full_title, (@group.present? ? exhibit_browse_group_path(@exhibit, @group, @search) : exhibit_browse_path(@exhibit, @search))
76
+ add_breadcrumb(@search.full_title, (@group.present? ? exhibit_browse_group_path(@exhibit, @group, @search) : exhibit_browse_path(@exhibit, @search)))
77
77
  end
78
78
 
79
79
  def _prefixes
@@ -8,8 +8,13 @@ module Spotlight
8
8
  class BulkUpdatesController < Spotlight::ApplicationController
9
9
  before_action :authenticate_user!
10
10
  before_action :check_authorization
11
+ load_and_authorize_resource :exhibit, class: 'Spotlight::Exhibit'
11
12
 
12
- def edit; end
13
+ def edit
14
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
15
+ add_breadcrumb(t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit))
16
+ add_breadcrumb(t(:'spotlight.pages.index.bulk_updates.header'), edit_exhibit_bulk_updates_path(@exhibit))
17
+ end
13
18
 
14
19
  def download_template
15
20
  # Set Last-Modified as a work-around for https://github.com/rack/rack/issues/1619
@@ -8,6 +8,7 @@ module Spotlight
8
8
  # rubocop:disable Metrics/ClassLength
9
9
  class CatalogController < ::CatalogController
10
10
  include Spotlight::Concerns::ApplicationController
11
+
11
12
  load_and_authorize_resource :exhibit, class: Spotlight::Exhibit, prepend: true
12
13
  include Blacklight::Catalog
13
14
  include Spotlight::Catalog
@@ -85,8 +86,8 @@ module Spotlight
85
86
  end
86
87
 
87
88
  def admin
88
- add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
89
- add_breadcrumb t(:'spotlight.curation.sidebar.items'), admin_exhibit_catalog_path(@exhibit)
89
+ add_breadcrumb(t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit))
90
+ add_breadcrumb(t(:'spotlight.curation.sidebar.items'), admin_exhibit_catalog_path(@exhibit))
90
91
  (@response,) = search_service.search_results
91
92
  @filters = params[:f] || []
92
93
 
@@ -148,10 +149,10 @@ module Spotlight
148
149
 
149
150
  def attach_breadcrumbs
150
151
  if view_context.current_page?({ action: :admin })
151
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), exhibit_root_path(@exhibit)
152
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), exhibit_root_path(@exhibit))
152
153
  else
153
154
  # When not on the admin page, get the translated value for the "Home" breadcrumb
154
- add_breadcrumb t(:'spotlight.curation.nav.home', title: @exhibit.title), exhibit_root_path(@exhibit)
155
+ add_breadcrumb(t(:'spotlight.curation.nav.home', title: @exhibit.title), exhibit_root_path(@exhibit))
155
156
  end
156
157
  end
157
158
 
@@ -227,21 +228,21 @@ module Spotlight
227
228
  def add_breadcrumb_with_search_params
228
229
  return unless has_search_parameters?
229
230
 
230
- add_breadcrumb t(:'spotlight.catalog.breadcrumb.index'), spotlight.search_exhibit_catalog_path(params.to_unsafe_h), current: action_name == 'index'
231
+ add_breadcrumb(t(:'spotlight.catalog.breadcrumb.index'), spotlight.search_exhibit_catalog_path(params.to_unsafe_h), current: action_name == 'index')
231
232
  end
232
233
 
233
234
  # rubocop:disable Metrics/AbcSize
234
235
  def add_document_breadcrumbs(document)
235
236
  if current_browse_category
236
- add_breadcrumb current_browse_category.exhibit.main_navigations.browse.label_or_default, exhibit_browse_index_path(current_browse_category.exhibit)
237
- add_breadcrumb current_browse_category.title, exhibit_browse_path(current_browse_category.exhibit, current_browse_category)
237
+ add_breadcrumb(current_browse_category.exhibit.main_navigations.browse.label_or_default, exhibit_browse_index_path(current_browse_category.exhibit))
238
+ add_breadcrumb(current_browse_category.title, exhibit_browse_path(current_browse_category.exhibit, current_browse_category))
238
239
  elsif current_page_context&.title&.present? && !current_page_context.is_a?(Spotlight::HomePage)
239
- add_breadcrumb current_page_context.title, [current_page_context.exhibit, current_page_context]
240
+ add_breadcrumb(current_page_context.title, [current_page_context.exhibit, current_page_context])
240
241
  elsif current_search_session && !current_page_context&.is_a?(Spotlight::HomePage)
241
- add_breadcrumb t(:'spotlight.catalog.breadcrumb.index'), search_action_url(current_search_session.query_params)
242
+ add_breadcrumb(t(:'spotlight.catalog.breadcrumb.index'), search_action_url(current_search_session.query_params))
242
243
  end
243
244
 
244
- add_breadcrumb view_context.document_presenter(document).heading, polymorphic_path([current_exhibit, document])
245
+ add_breadcrumb(view_context.document_presenter(document).heading, polymorphic_path([current_exhibit, document]))
245
246
  end
246
247
  # rubocop:enable Metrics/AbcSize
247
248
 
@@ -11,11 +11,11 @@ module Spotlight
11
11
  before_action :attach_breadcrumbs
12
12
 
13
13
  def new
14
- add_breadcrumb t(:'helpers.action.spotlight/contact.create'), new_exhibit_contact_path(@exhibit)
14
+ add_breadcrumb(t(:'helpers.action.spotlight/contact.create'), new_exhibit_contact_path(@exhibit))
15
15
  end
16
16
 
17
17
  def edit
18
- add_breadcrumb @contact.name, edit_exhibit_contact_path(@contact.exhibit, @contact)
18
+ add_breadcrumb(@contact.name, edit_exhibit_contact_path(@contact.exhibit, @contact))
19
19
  end
20
20
 
21
21
  def create
@@ -42,9 +42,9 @@ module Spotlight
42
42
  protected
43
43
 
44
44
  def attach_breadcrumbs
45
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
46
- add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
47
- add_breadcrumb t(:'spotlight.pages.index.about_pages.header'), exhibit_about_pages_path(@exhibit)
45
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
46
+ add_breadcrumb(t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit))
47
+ add_breadcrumb(t(:'spotlight.pages.index.about_pages.header'), exhibit_about_pages_path(@exhibit))
48
48
  end
49
49
 
50
50
  def contact_params
@@ -12,11 +12,11 @@ module Spotlight
12
12
 
13
13
  def new
14
14
  @custom_field.field_type ||= 'text'
15
- add_breadcrumb t(:'helpers.action.spotlight/custom_field.create'), new_exhibit_custom_field_path(@exhibit)
15
+ add_breadcrumb(t(:'helpers.action.spotlight/custom_field.create'), new_exhibit_custom_field_path(@exhibit))
16
16
  end
17
17
 
18
18
  def edit
19
- add_breadcrumb @custom_field.label, edit_exhibit_custom_field_path(@custom_field.exhibit, @custom_field)
19
+ add_breadcrumb(@custom_field.label, edit_exhibit_custom_field_path(@custom_field.exhibit, @custom_field))
20
20
  end
21
21
 
22
22
  def create
@@ -50,9 +50,9 @@ module Spotlight
50
50
  protected
51
51
 
52
52
  def attach_breadcrumbs
53
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
54
- add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
55
- add_breadcrumb t(:'spotlight.metadata_configurations.edit.header'), edit_exhibit_metadata_configuration_path(@exhibit)
53
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
54
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit))
55
+ add_breadcrumb(t(:'spotlight.metadata_configurations.edit.header'), edit_exhibit_metadata_configuration_path(@exhibit))
56
56
  end
57
57
 
58
58
  def custom_field_params
@@ -11,12 +11,12 @@ module Spotlight
11
11
 
12
12
  # GET /custom_search_fields/new
13
13
  def new
14
- add_breadcrumb t(:'helpers.action.spotlight/custom_search_field.create'), new_exhibit_custom_search_field_path(@exhibit)
14
+ add_breadcrumb(t(:'helpers.action.spotlight/custom_search_field.create'), new_exhibit_custom_search_field_path(@exhibit))
15
15
  end
16
16
 
17
17
  # GET /custom_search_fields/1/edit
18
18
  def edit
19
- add_breadcrumb @custom_search_field.label, edit_exhibit_custom_search_field_path(@custom_search_field.exhibit, @custom_search_field)
19
+ add_breadcrumb(@custom_search_field.label, edit_exhibit_custom_search_field_path(@custom_search_field.exhibit, @custom_search_field))
20
20
  end
21
21
 
22
22
  # POST /custom_search_fields
@@ -52,9 +52,9 @@ module Spotlight
52
52
  private
53
53
 
54
54
  def attach_breadcrumbs
55
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
56
- add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
57
- add_breadcrumb t(:'spotlight.configuration.sidebar.search_configuration'), edit_exhibit_search_configuration_path(@exhibit)
55
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
56
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit))
57
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.search_configuration'), edit_exhibit_search_configuration_path(@exhibit))
58
58
  end
59
59
 
60
60
  # Only allow trusted parameters through.
@@ -46,13 +46,13 @@ module Spotlight
46
46
  protected
47
47
 
48
48
  def attach_analytics_breadcrumbs
49
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
50
- add_breadcrumb t(:'spotlight.curation.sidebar.analytics'), analytics_exhibit_dashboard_path(@exhibit)
49
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
50
+ add_breadcrumb(t(:'spotlight.curation.sidebar.analytics'), analytics_exhibit_dashboard_path(@exhibit))
51
51
  end
52
52
 
53
53
  def attach_dashboard_breadcrumbs
54
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
55
- add_breadcrumb t(:'spotlight.curation.sidebar.dashboard'), exhibit_dashboard_path(@exhibit)
54
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
55
+ add_breadcrumb(t(:'spotlight.curation.sidebar.dashboard'), exhibit_dashboard_path(@exhibit))
56
56
  end
57
57
 
58
58
  def load_recent_solr_documents(count)
@@ -34,8 +34,8 @@ module Spotlight
34
34
 
35
35
  def new
36
36
  build_initial_exhibit_contact_emails
37
- add_breadcrumb t(:'spotlight.sites.home'), root_url
38
- add_breadcrumb t(:'spotlight.exhibits.new.page_title')
37
+ add_breadcrumb(t(:'spotlight.sites.home'), root_url)
38
+ add_breadcrumb(t(:'spotlight.exhibits.new.page_title'))
39
39
  end
40
40
 
41
41
  def process_import
@@ -47,9 +47,9 @@ module Spotlight
47
47
  end
48
48
 
49
49
  def edit
50
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
51
- add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
52
- add_breadcrumb t(:'spotlight.configuration.sidebar.settings'), edit_exhibit_path(@exhibit)
50
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
51
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit))
52
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.settings'), edit_exhibit_path(@exhibit))
53
53
  build_initial_exhibit_contact_emails
54
54
  end
55
55
 
@@ -94,6 +94,7 @@ module Spotlight
94
94
  :description,
95
95
  :published,
96
96
  :tag_list,
97
+ tag_list: [],
97
98
  contact_emails_attributes: %i[id email],
98
99
  languages_attributes: %i[id public]
99
100
  )
@@ -26,15 +26,15 @@ module Spotlight
26
26
  end
27
27
 
28
28
  def attach_page_breadcrumbs
29
- add_breadcrumb t(:'spotlight.curation.sidebar.feature_pages'), exhibit_feature_pages_path(@exhibit) if action_name == 'edit'
29
+ add_breadcrumb(t(:'spotlight.curation.sidebar.feature_pages'), exhibit_feature_pages_path(@exhibit)) if action_name == 'edit'
30
30
 
31
- add_breadcrumb @page.parent_page.title, [spotlight, @page.exhibit, @page.parent_page] unless @page.top_level_page?
32
- add_breadcrumb @page.title, action_name == 'edit' ? [:edit, @page.exhibit, @page] : [spotlight, @page.exhibit, @page]
31
+ add_breadcrumb(@page.parent_page.title, [spotlight, @page.exhibit, @page.parent_page]) unless @page.top_level_page?
32
+ add_breadcrumb(@page.title, action_name == 'edit' ? [:edit, @page.exhibit, @page] : [spotlight, @page.exhibit, @page])
33
33
  end
34
34
 
35
35
  def attach_index_breadcrumbs
36
- add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
37
- add_breadcrumb t(:'spotlight.curation.sidebar.feature_pages'), exhibit_feature_pages_path(@exhibit)
36
+ add_breadcrumb(t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit))
37
+ add_breadcrumb(t(:'spotlight.curation.sidebar.feature_pages'), exhibit_feature_pages_path(@exhibit))
38
38
  end
39
39
 
40
40
  def update_all_page_params
@@ -27,8 +27,8 @@ module Spotlight
27
27
  end
28
28
 
29
29
  def edit
30
- add_breadcrumb t(:'spotlight.curation.sidebar.feature_pages'), exhibit_feature_pages_path(@exhibit)
31
- add_breadcrumb @page.title, [:edit, @exhibit, @page]
30
+ add_breadcrumb(t(:'spotlight.curation.sidebar.feature_pages'), exhibit_feature_pages_path(@exhibit))
31
+ add_breadcrumb(@page.title, [:edit, @exhibit, @page])
32
32
  super
33
33
  end
34
34
 
@@ -9,9 +9,9 @@ module Spotlight
9
9
 
10
10
  # GET /:exhibit_id/job_trackers/1
11
11
  def show
12
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
13
- add_breadcrumb t(:'spotlight.curation.sidebar.dashboard'), exhibit_dashboard_path(@exhibit)
14
- add_breadcrumb t(:'spotlight.configuration.sidebar.job_trackers'), [@job_tracker.on, @job_tracker]
12
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
13
+ add_breadcrumb(t(:'spotlight.curation.sidebar.dashboard'), exhibit_dashboard_path(@exhibit))
14
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.job_trackers'), [@job_tracker.on, @job_tracker])
15
15
  end
16
16
  end
17
17
  end
@@ -18,9 +18,9 @@ module Spotlight
18
18
  end
19
19
 
20
20
  def edit
21
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
22
- add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
23
- add_breadcrumb t(:'spotlight.configuration.sidebar.metadata'), edit_exhibit_metadata_configuration_path(@exhibit)
21
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
22
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit))
23
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.metadata'), edit_exhibit_metadata_configuration_path(@exhibit))
24
24
  end
25
25
 
26
26
  def update
@@ -162,7 +162,7 @@ module Spotlight
162
162
 
163
163
  def attach_breadcrumbs
164
164
  if view_context.current_page? '/'
165
- add_breadcrumb t(:'spotlight.curation.nav.home', title: current_exhibit.title), main_app.root_path
165
+ add_breadcrumb(t(:'spotlight.curation.nav.home', title: current_exhibit.title), main_app.root_path)
166
166
  elsif @page
167
167
  # Use curator-accessible i18n key for user-facing breadcrumb
168
168
  breadcrumb_to_exhibit_root(:'spotlight.curation.nav.home')
@@ -187,7 +187,7 @@ module Spotlight
187
187
  end
188
188
 
189
189
  def breadcrumb_to_exhibit_root(key)
190
- add_breadcrumb t(key, title: current_exhibit.title), spotlight.exhibit_root_path(current_exhibit)
190
+ add_breadcrumb(t(key, title: current_exhibit.title), spotlight.exhibit_root_path(current_exhibit))
191
191
  end
192
192
 
193
193
  # Only allow trusted parameters through.
@@ -15,10 +15,10 @@ module Spotlight
15
15
  helper_method :resource_class
16
16
 
17
17
  def new
18
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), exhibit_root_path(@exhibit)
19
- add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
20
- add_breadcrumb t(:'spotlight.curation.sidebar.items'), admin_exhibit_catalog_path(@exhibit)
21
- add_breadcrumb t(:'spotlight.resources.new.header'), new_exhibit_resource_path(@exhibit)
18
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), exhibit_root_path(@exhibit))
19
+ add_breadcrumb(t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit))
20
+ add_breadcrumb(t(:'spotlight.curation.sidebar.items'), admin_exhibit_catalog_path(@exhibit))
21
+ add_breadcrumb(t(:'spotlight.resources.new.header'), new_exhibit_resource_path(@exhibit))
22
22
 
23
23
  render
24
24
  end
@@ -13,9 +13,9 @@ module Spotlight
13
13
  role = @exhibit.roles.build
14
14
  authorize! :edit, role
15
15
 
16
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
17
- add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
18
- add_breadcrumb t(:'spotlight.configuration.sidebar.users'), exhibit_roles_path(@exhibit)
16
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
17
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit))
18
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.users'), exhibit_roles_path(@exhibit))
19
19
  end
20
20
 
21
21
  def update_all
@@ -19,9 +19,9 @@ module Spotlight
19
19
  end
20
20
 
21
21
  def edit
22
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
23
- add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
24
- add_breadcrumb t(:'spotlight.configuration.sidebar.search_configuration'), edit_exhibit_search_configuration_path(@exhibit)
22
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
23
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit))
24
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.search_configuration'), edit_exhibit_search_configuration_path(@exhibit))
25
25
 
26
26
  @field_metadata = Spotlight::FieldMetadata.new(current_exhibit, blacklight_config.repository, @blacklight_configuration.blacklight_config)
27
27
  end
@@ -30,7 +30,7 @@ module Spotlight
30
30
 
31
31
  def edit
32
32
  @groups = @exhibit.groups
33
- add_breadcrumb @search.full_title, edit_exhibit_search_path(@search.exhibit, @search)
33
+ add_breadcrumb(@search.full_title, edit_exhibit_search_path(@search.exhibit, @search))
34
34
  @exhibit = @search.exhibit
35
35
  end
36
36
 
@@ -94,9 +94,9 @@ module Spotlight
94
94
 
95
95
  def attach_breadcrumbs
96
96
  e = @exhibit || @search&.exhibit
97
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: e.title), e
98
- add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(e)
99
- add_breadcrumb t(:'spotlight.curation.sidebar.browse'), exhibit_searches_path(e)
97
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: e.title), e)
98
+ add_breadcrumb(t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(e))
99
+ add_breadcrumb(t(:'spotlight.curation.sidebar.browse'), exhibit_searches_path(e))
100
100
  end
101
101
 
102
102
  def batch_search_params
@@ -9,13 +9,13 @@ module Spotlight
9
9
  load_and_authorize_resource
10
10
 
11
11
  def edit
12
- add_breadcrumb t(:'spotlight.sites.home'), root_url
13
- add_breadcrumb t(:'spotlight.sites.edit.page_title')
12
+ add_breadcrumb(t(:'spotlight.sites.home'), root_url)
13
+ add_breadcrumb(t(:'spotlight.sites.edit.page_title'))
14
14
  end
15
15
 
16
16
  def edit_exhibits
17
- add_breadcrumb t(:'spotlight.sites.home'), root_url
18
- add_breadcrumb t(:'spotlight.sites.edit_exhibits.page_title')
17
+ add_breadcrumb(t(:'spotlight.sites.home'), root_url)
18
+ add_breadcrumb(t(:'spotlight.sites.edit_exhibits.page_title'))
19
19
  end
20
20
 
21
21
  def update
@@ -14,9 +14,9 @@ module Spotlight
14
14
 
15
15
  def index
16
16
  @tags = @exhibit.owned_tags
17
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
18
- add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
19
- add_breadcrumb t(:'spotlight.curation.sidebar.tags'), exhibit_tags_path(@exhibit)
17
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
18
+ add_breadcrumb(t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit))
19
+ add_breadcrumb(t(:'spotlight.curation.sidebar.tags'), exhibit_tags_path(@exhibit))
20
20
 
21
21
  respond_to do |format|
22
22
  format.html