blacklight-spotlight 5.0.0 → 5.1.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.
- checksums.yaml +4 -4
- data/app/components/spotlight/uneditable_non_default_language_component.html.erb +5 -0
- data/app/components/spotlight/uneditable_non_default_language_component.rb +25 -0
- data/app/controllers/concerns/spotlight/catalog.rb +1 -1
- data/app/controllers/concerns/spotlight/controller.rb +1 -1
- data/app/controllers/spotlight/browse_controller.rb +2 -2
- data/app/controllers/spotlight/catalog_controller.rb +1 -1
- data/app/controllers/spotlight/searches_controller.rb +2 -1
- data/app/models/sir_trevor_rails/blocks/displayable.rb +2 -1
- data/app/models/spotlight/lock.rb +1 -1
- data/app/models/spotlight/page.rb +7 -0
- data/app/views/spotlight/about_pages/_contact.html.erb +1 -1
- data/app/views/spotlight/accessibility/alt_text.html.erb +3 -0
- data/app/views/spotlight/appearances/edit.html.erb +14 -9
- data/app/views/spotlight/exhibits/_form.html.erb +2 -2
- data/app/views/spotlight/metadata_configurations/edit.html.erb +47 -44
- data/app/views/spotlight/pages/_order_pages.html.erb +34 -29
- data/app/views/spotlight/pages/_page.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_facets.html.erb +1 -1
- data/app/views/spotlight/search_configurations/edit.html.erb +40 -34
- data/app/views/spotlight/searches/_group.html.erb +1 -1
- data/app/views/spotlight/searches/_search.html.erb +1 -1
- data/app/views/spotlight/searches/index.html.erb +4 -2
- data/app/views/spotlight/tags/_tag.html.erb +1 -1
- data/app/views/spotlight/translations/_page.html.erb +1 -1
- data/config/locales/spotlight.en.yml +5 -0
- data/lib/spotlight/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08d617eac0c85933f2ac4c6f0e50c82f8e6880b7296edf8730b0978aa9d81d7f'
|
4
|
+
data.tar.gz: 31c89e414dfd108a7bb02c5a16c64f7d1f8bbfea9c8c88e5bde93a8748475e0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a229baf50bb0314fde2767c5200017e254a9325d83a9a8722f2177540b9c5bf3a9d567f07df7b18485dee9752de4fc613d3ace636445229d3257570105cade36
|
7
|
+
data.tar.gz: 338366a9da9b8321748c957a31fb5ef210b5d2c95fb2594be0fa01d51e2a8cba0adc22736d0e1665fa1d4e30a319a1987bdcb9b2f6b6070eb8b965549d12dbf3
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spotlight
|
4
|
+
# Displays a message that this exhibit information cannot be edited in the
|
5
|
+
# currently selected language and provides other options.
|
6
|
+
class UneditableNonDefaultLanguageComponent < ViewComponent::Base
|
7
|
+
def initialize(current_exhibit:, current_language:)
|
8
|
+
@current_exhibit = current_exhibit
|
9
|
+
@current_language = current_language
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
def edit_translations_button
|
14
|
+
link_to I18n.t('spotlight.exhibits.form.uneditable_non_default_language_form.translations'),
|
15
|
+
helpers.spotlight.edit_exhibit_translations_path(@current_exhibit, locale: @current_language),
|
16
|
+
class: 'btn btn-primary'
|
17
|
+
end
|
18
|
+
|
19
|
+
def switch_to_default_language_button
|
20
|
+
link_to I18n.t('spotlight.exhibits.form.uneditable_non_default_language_form.default_language'),
|
21
|
+
helpers.spotlight.edit_exhibit_path(@current_exhibit, locale: I18n.default_locale),
|
22
|
+
class: 'btn btn-primary'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -34,7 +34,7 @@ module Spotlight
|
|
34
34
|
# rubocop:enable Metrics/MethodLength
|
35
35
|
|
36
36
|
def render_curator_actions?
|
37
|
-
|
37
|
+
current_exhibit && can?(:curate, current_exhibit) &&
|
38
38
|
!(params[:controller] == 'spotlight/catalog' && params[:action] == 'admin')
|
39
39
|
end
|
40
40
|
end
|
@@ -73,7 +73,7 @@ module Spotlight
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def attach_search_breadcrumb
|
76
|
-
add_breadcrumb(@search.full_title,
|
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
|
@@ -89,7 +89,7 @@ module Spotlight
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def resource_masthead?
|
92
|
-
@search&.masthead
|
92
|
+
@search&.masthead&.display?
|
93
93
|
end
|
94
94
|
|
95
95
|
# This is overidden for the browse controller context from where it is defined in a helper
|
@@ -226,7 +226,7 @@ module Spotlight
|
|
226
226
|
redirect_to spotlight.exhibit_root_path(@exhibit) unless has_search_parameters?
|
227
227
|
end
|
228
228
|
|
229
|
-
def has_search_parameters? # rubocop:disable Naming/
|
229
|
+
def has_search_parameters? # rubocop:disable Naming/PredicatePrefix
|
230
230
|
super || params[:browse_category_id].present?
|
231
231
|
end
|
232
232
|
|
@@ -35,7 +35,8 @@ module Spotlight
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def create
|
38
|
-
|
38
|
+
params_to_exclude = :title unless @search.new_record?
|
39
|
+
@search.assign_attributes(search_params.except(params_to_exclude))
|
39
40
|
@search.query_params = query_params
|
40
41
|
|
41
42
|
if @search.save
|
@@ -52,6 +52,13 @@ module Spotlight
|
|
52
52
|
translated_page_for(I18n.locale)&.title || super
|
53
53
|
end
|
54
54
|
|
55
|
+
# Returns the title of the page in the default locale regardless of the current locale.
|
56
|
+
def default_locale_title
|
57
|
+
return self[:title] if I18n.locale == I18n.default_locale || default_locale_page.blank?
|
58
|
+
|
59
|
+
default_locale_page[:title]
|
60
|
+
end
|
61
|
+
|
55
62
|
def content_changed!
|
56
63
|
@content = nil
|
57
64
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: f.object.id.to_s, field: f, enabled_method: :show_in_sidebar, label_method: :name } do |_, section| %>
|
1
|
+
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: f.object.id.to_s, field: f, index: f.index, enabled_method: :show_in_sidebar, label_method: :name } do |_, section| %>
|
2
2
|
<% case section when nil %>
|
3
3
|
<div class="d-flex flex-grow-1">
|
4
4
|
<%= f.check_box :show_in_sidebar, hide_label: true, inline: true %>
|
@@ -43,6 +43,9 @@
|
|
43
43
|
</svg>
|
44
44
|
<% end %>
|
45
45
|
</span>
|
46
|
+
<% unless page.published? %>
|
47
|
+
<div class="badge bg-info unpublished align-baseline p-1"><%= t('.unpublished') %></div>
|
48
|
+
<% end %>
|
46
49
|
</h4>
|
47
50
|
<%= render Spotlight::EditViewLinksComponent.new(page:, classes:'page-links pt-0') %>
|
48
51
|
</td>
|
@@ -66,15 +66,20 @@
|
|
66
66
|
</div>
|
67
67
|
|
68
68
|
<div role="tabpanel" class="tab-pane" id="main-menu">
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
69
|
+
<%# These fields are translatable and should only be edited here in the default locale %>
|
70
|
+
<% if default_language? %>
|
71
|
+
<%= field_set_tag do %>
|
72
|
+
<p class="instructions"><%= t(:'.main_navigation.help') %></p>
|
73
|
+
<div class="card-group dd main_navigation_admin col-sm-7" id="nested-navigation" data-behavior="nestable" data-max-depth="1">
|
74
|
+
<ol class="dd-list">
|
75
|
+
<%= f.fields_for :main_navigations do |label| %>
|
76
|
+
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: label.object.nav_type, field: label, label: label.object.label_or_default, default_value: label.object.default_label, index: label.index, enabled_method: :display } do; end %>
|
77
|
+
<% end %>
|
78
|
+
</ol>
|
79
|
+
</div>
|
80
|
+
<% end %>
|
81
|
+
<% else %>
|
82
|
+
<%= render Spotlight::UneditableNonDefaultLanguageComponent.new(current_exhibit:, current_language: I18n.locale)%>
|
78
83
|
<% end %>
|
79
84
|
</div>
|
80
85
|
</div>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%= bootstrap_form_for @exhibit, url: ((spotlight.exhibit_path(@exhibit) if @exhibit.persisted?) || spotlight.exhibits_path), layout: :horizontal, label_col: 'col-md-2', control_col: 'col-md-10', html: {class: "row"} do |f| %>
|
2
2
|
<div class="col-md-12">
|
3
3
|
<%= f.text_field :title, disabled: !default_language?, help: !default_language? ? t('.uneditable_non_default_language') : '' %>
|
4
|
-
<%= f.text_field :subtitle %>
|
5
|
-
<%= f.text_area :description %>
|
4
|
+
<%= f.text_field :subtitle, disabled: !default_language?, help: !default_language? ? t('.uneditable_non_default_language') : '' %>
|
5
|
+
<%= f.text_area :description, disabled: !default_language?, help: !default_language? ? t('.uneditable_non_default_language') : '' %>
|
6
6
|
<%= render Spotlight::TagListFormComponent.new(form: f) %>
|
7
7
|
<%= f.form_group(:contact_emails, label: { text: nil, class: nil, for: 'exhibit_contact_email_0' }, class: 'form-group mb-3', help: nil) do %>
|
8
8
|
<%= f.fields_for :contact_emails do |contact| %>
|
@@ -3,59 +3,59 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<%= configuration_page_title %>
|
6
|
-
|
7
|
-
|
6
|
+
<%# These fields are translatable and should only be edited here in the default locale %>
|
7
|
+
<% if default_language? %>
|
8
|
+
<%= bootstrap_form_for @blacklight_configuration, url: spotlight.exhibit_metadata_configuration_path(@exhibit), layout: :horizontal, label_col: 'col-md-3 col-sm-3', control_col: 'col-md-5 col-sm-5' do |f| %>
|
9
|
+
<h2><%= t(:'.order_header') %></h2>
|
8
10
|
|
9
|
-
|
11
|
+
<p class="instructions"><%= t :'.instructions' %></p>
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<th class="text-center">
|
16
|
-
<div>
|
17
|
-
<%= t :'.view.show' %>
|
18
|
-
</div>
|
19
|
-
<div class="text-center">
|
20
|
-
<%= label_tag 'item_details', class: 'select-label' do %>
|
21
|
-
<%= select_deselect_action(t :'.view.select_id') %>
|
22
|
-
<%= t(:'.select_all') %>
|
23
|
-
<% end %>
|
24
|
-
</div>
|
25
|
-
</th>
|
26
|
-
<% available_view_fields.keys.each do |type| %>
|
13
|
+
<table id="nested-fields" class="metadata-configuration table table-striped dd-table">
|
14
|
+
<thead>
|
15
|
+
<tr>
|
16
|
+
<th class="w-50"><%= t :'.field.label' %></th>
|
27
17
|
<th class="text-center">
|
28
|
-
<div>
|
29
|
-
<%= t :
|
18
|
+
<div>
|
19
|
+
<%= t :'.view.show' %>
|
30
20
|
</div>
|
31
21
|
<div class="text-center">
|
32
|
-
<%= label_tag
|
33
|
-
|
34
|
-
|
35
|
-
|
22
|
+
<%= label_tag 'item_details', class: 'select-label' do %>
|
23
|
+
<%= select_deselect_action(t :'.view.select_id') %>
|
24
|
+
<%= t(:'.select_all') %>
|
25
|
+
<% end %>
|
36
26
|
</div>
|
37
27
|
</th>
|
28
|
+
<% available_view_fields.keys.each do |type| %>
|
29
|
+
<th class="text-center">
|
30
|
+
<div>
|
31
|
+
<%= t :".view.#{type}", default: t("blacklight.search.view.#{type}", default: type.to_s.humanize.titleize) %>
|
32
|
+
</div>
|
33
|
+
<div class="text-center">
|
34
|
+
<%= label_tag t(:'.deselect_all') + type.to_s, class: 'select-label' do %>
|
35
|
+
<%= select_deselect_action(t(:'.deselect_all') + type.to_s) %>
|
36
|
+
<%= t(:'.select_all') %>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
39
|
+
</th>
|
40
|
+
<% end %>
|
41
|
+
<th class="text-center"><%= t :'.type_label' %></th>
|
42
|
+
</tr>
|
43
|
+
</thead>
|
44
|
+
<tbody class="metadata_fields dd dd-list" data-behavior="nestable" data-max-depth="1" data-list-node-name="tbody" data-item-node-name="tr" data-expand-btn-HTML=" " data-collapse-btn-HTML=" ">
|
45
|
+
<%= f.fields_for :index_fields do |idxf| %>
|
46
|
+
<% @blacklight_configuration.blacklight_config.index_fields.select { |k, v| blacklight_configuration_context.evaluate_if_unless_configuration(v.original) }.each do |key, config| %>
|
47
|
+
<%= render partial: 'metadata_field', locals: { key: key, config: config, f: idxf } %>
|
48
|
+
<% end %>
|
38
49
|
<% end %>
|
39
|
-
|
40
|
-
|
41
|
-
</thead>
|
42
|
-
<tbody class="metadata_fields dd dd-list" data-behavior="nestable" data-max-depth="1" data-list-node-name="tbody" data-item-node-name="tr" data-expand-btn-HTML=" " data-collapse-btn-HTML=" ">
|
43
|
-
<%= f.fields_for :index_fields do |idxf| %>
|
44
|
-
<% @blacklight_configuration.blacklight_config.index_fields.select { |k, v| blacklight_configuration_context.evaluate_if_unless_configuration(v.original) }.each do |key, config| %>
|
45
|
-
<%= render partial: 'metadata_field', locals: { key: key, config: config, f: idxf } %>
|
46
|
-
<% end %>
|
47
|
-
<% end %>
|
48
|
-
</tbody>
|
49
|
-
</table>
|
50
|
+
</tbody>
|
51
|
+
</table>
|
50
52
|
|
51
|
-
|
52
|
-
|
53
|
-
|
53
|
+
<div class="form-actions">
|
54
|
+
<div class="primary-actions">
|
55
|
+
<%= f.submit nil, class: 'btn btn-primary' %>
|
56
|
+
</div>
|
54
57
|
</div>
|
55
|
-
|
56
|
-
<% end %>
|
57
|
-
|
58
|
-
|
58
|
+
<% end %>
|
59
59
|
<h2 class="mt-4"><%= t(:'.exhibit_specific.header') %></h2>
|
60
60
|
<p class="instructions"><%= t(:'.exhibit_specific.instructions') %></p>
|
61
61
|
|
@@ -80,4 +80,7 @@
|
|
80
80
|
</table>
|
81
81
|
|
82
82
|
|
83
|
-
<%= exhibit_create_link Spotlight::CustomField.new, class: 'btn btn-primary' %>
|
83
|
+
<%= exhibit_create_link Spotlight::CustomField.new, class: 'btn btn-primary' %>
|
84
|
+
<% else %>
|
85
|
+
<%= render Spotlight::UneditableNonDefaultLanguageComponent.new(current_exhibit:, current_language: I18n.locale) %>
|
86
|
+
<% end %>
|
@@ -1,33 +1,38 @@
|
|
1
1
|
<%= curation_page_title t(:"spotlight.pages.index.#{page_collection_name}.header") %>
|
2
|
-
|
2
|
+
<%# These fields are translatable and should only be edited here in the default locale %>
|
3
|
+
<% if default_language? %>
|
4
|
+
<%= bootstrap_form_for @exhibit, url: polymorphic_path([:update_all, @exhibit, page_collection_name.to_sym]), layout: :horizontal, control_col: 'col-sm-10', html: {:'data-form-observer' => true} do |f| %>
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
6
|
+
<%= render partial: 'header', locals: {f: f} %>
|
7
|
+
<h2 class="mt-4"><%= t :'.pages_header' %></h2>
|
8
|
+
<p class="instructions"><%= t :'.instructions' %></p>
|
9
|
+
<div class="panel-group dd <%= page_collection_name %>_admin" id="nested-pages" data-behavior="nestable" <%= nestable_data_attributes(page_collection_name).html_safe %> >
|
10
|
+
<ol class="dd-list">
|
11
|
+
<%= f.fields_for page_collection_name do |p| %>
|
12
|
+
<%- if p.object.about_page? || p.object.top_level_page? -%>
|
13
|
+
<%= render partial: 'page', locals: {f: p, parent_form: f} %>
|
14
|
+
<%- end -%>
|
15
|
+
<% end %>
|
16
|
+
</ol>
|
17
|
+
</div>
|
18
|
+
<div class="form-actions float-end">
|
19
|
+
<div class="primary-actions">
|
20
|
+
<%= button_tag action_label(page_collection_name, :update_all), class: "btn btn-primary", disabled: disable_save_pages_button? %>
|
21
|
+
</div>
|
19
22
|
</div>
|
20
|
-
</div>
|
21
|
-
<%- end -%>
|
22
|
-
<div>
|
23
|
-
<%= form_for @page, url: spotlight.polymorphic_path([@exhibit, page_collection_name.to_sym]), html: {class: "expanded-add-button"} do |f|%>
|
24
|
-
<a href='#add-new' class="btn btn-primary" data-turbo="false" data-turbolinks="false" data-expanded-add-button="true" data-field-target="[data-title-field]">
|
25
|
-
<%= t(:'.new_page') %> <%= blacklight_icon('chevron_right') %>
|
26
|
-
<span data-title-field="true" class="input-field">
|
27
|
-
<%= f.text_field(:title) %>
|
28
|
-
<%= f.submit t(:'.save'), data: {behavior: "save"} %>
|
29
|
-
<%= f.submit t(:'.cancel'), data: {behavior: "cancel"} %>
|
30
|
-
</span>
|
31
|
-
</a>
|
32
23
|
<%- end -%>
|
33
|
-
|
24
|
+
<div>
|
25
|
+
<%= form_for @page, url: spotlight.polymorphic_path([@exhibit, page_collection_name.to_sym]), html: {class: "expanded-add-button"} do |f|%>
|
26
|
+
<a href='#add-new' class="btn btn-primary" data-turbo="false" data-turbolinks="false" data-expanded-add-button="true" data-field-target="[data-title-field]">
|
27
|
+
<%= t(:'.new_page') %> <%= blacklight_icon('chevron_right') %>
|
28
|
+
<span data-title-field="true" class="input-field">
|
29
|
+
<%= f.text_field(:title) %>
|
30
|
+
<%= f.submit t(:'.save'), data: {behavior: "save"} %>
|
31
|
+
<%= f.submit t(:'.cancel'), data: {behavior: "cancel"} %>
|
32
|
+
</span>
|
33
|
+
</a>
|
34
|
+
<%- end -%>
|
35
|
+
</div>
|
36
|
+
<% else %>
|
37
|
+
<%= render Spotlight::UneditableNonDefaultLanguageComponent.new(current_exhibit:, current_language: I18n.locale)%>
|
38
|
+
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% page = f.object %>
|
2
|
-
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: page.id.to_s, field: f, label: page.title, label_method: :title, enabled_method: :published } do |_, section| %>
|
2
|
+
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: page.id.to_s, index: f.index, field: f, label: page.title, label_method: :title, enabled_method: :published } do |_, section| %>
|
3
3
|
<% case section when :additional_options %>
|
4
4
|
<%= render Spotlight::EditViewLinksComponent.new(page:, delete_link: true) %>
|
5
5
|
<%- if page.feature_page? -%>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<% metadata = @field_metadata.field(key) %>
|
7
7
|
<% next unless metadata[:document_count] > 0 || config.custom_field %>
|
8
8
|
<%= idxf.fields_for key, config do |facet| %>
|
9
|
-
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: key, field: facet, dd3_content_classes: "facet-config-#{key.parameterize} page" , enabled_method: :show, label_method: :label, label: facet_field_label(key) } do |_, section| %>
|
9
|
+
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: key, field: facet, index: facet.index, dd3_content_classes: "facet-config-#{key.parameterize} page" , enabled_method: :show, label_method: :label, label: facet_field_label(key) } do |_, section| %>
|
10
10
|
<% case section when :additional_content %>
|
11
11
|
<div class="mt-2">
|
12
12
|
<%= facet.form_group :terms, label_col: 'col-md-2 offset-md-1', label: { text: t(:'spotlight.search_configurations.facets.sort_by.label') } do %>
|
@@ -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
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
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
|
-
|
42
|
-
|
43
|
-
|
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 %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% group = f.object %>
|
2
|
-
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: group.id.to_s, field: f, dd3_content_classes: "group" , enabled_method: :published, label_method: :title, label: group.title } do |_, section| %>
|
2
|
+
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: group.id.to_s, index: f.index, field: f, dd3_content_classes: "group" , enabled_method: :published, label_method: :title, label: group.title } do |_, section| %>
|
3
3
|
<% case section when nil %>
|
4
4
|
<div class="d-flex flex-grow-1">
|
5
5
|
<div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% search = f.object %>
|
2
|
-
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: search.id.to_s, field: f, dd3_content_classes: "search" , enabled_method: :published, label_method: :title, label: search.title } do |_, section| %>
|
2
|
+
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: search.id.to_s, field: f, index: f.index, dd3_content_classes: "search" , enabled_method: :published, label_method: :title, label: search.title } do |_, section| %>
|
3
3
|
<% case section when nil %>
|
4
4
|
<div class="d-flex flex-grow-1">
|
5
5
|
<div>
|
@@ -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
|
-
<%
|
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,6 +1,6 @@
|
|
1
1
|
<% tag = f.object %>
|
2
2
|
|
3
|
-
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: tag.id.to_s, field: f, dd3_content_classes: "tag" , enabled_method: :present?, label_method: :name, label: tag.name } do |_, section| %>
|
3
|
+
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: tag.id.to_s, field: f, index: f.index, dd3_content_classes: "tag" , enabled_method: :present?, label_method: :name, label: tag.name } do |_, section| %>
|
4
4
|
<% case section when nil %>
|
5
5
|
<div class="d-flex flex-grow-1">
|
6
6
|
<div class="flex-grow-1 mx-2 main">
|
@@ -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.
|
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>
|
@@ -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:
|
@@ -575,6 +576,10 @@ en:
|
|
575
576
|
published:
|
576
577
|
help_block: ''
|
577
578
|
uneditable_non_default_language: This field is not editable in the current language. Switch to the default language to edit it.
|
579
|
+
uneditable_non_default_language_form:
|
580
|
+
default_language: Switch to default language
|
581
|
+
instructions: Please use the translations editor or switch to the default language to make configuration changes.
|
582
|
+
translations: Edit translations
|
578
583
|
groups:
|
579
584
|
all: All
|
580
585
|
import:
|
data/lib/spotlight/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight-spotlight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2025-
|
14
|
+
date: 2025-06-09 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activejob-status
|
@@ -897,6 +897,8 @@ files:
|
|
897
897
|
- app/components/spotlight/title_component.rb
|
898
898
|
- app/components/spotlight/translations/subheading_component.html.erb
|
899
899
|
- app/components/spotlight/translations/subheading_component.rb
|
900
|
+
- app/components/spotlight/uneditable_non_default_language_component.html.erb
|
901
|
+
- app/components/spotlight/uneditable_non_default_language_component.rb
|
900
902
|
- app/controllers/concerns/spotlight/base.rb
|
901
903
|
- app/controllers/concerns/spotlight/catalog.rb
|
902
904
|
- app/controllers/concerns/spotlight/config.rb
|