blacklight-spotlight 4.7.1 → 5.0.0.pre.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -12
- data/Rakefile +8 -1
- data/app/assets/javascripts/spotlight/application.js +0 -1
- data/app/assets/javascripts/spotlight/spotlight.esm.js +3620 -3847
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +3620 -3852
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/assets/stylesheets/spotlight/_accessibility.scss +0 -9
- data/app/assets/stylesheets/spotlight/_autocomplete.scss +49 -0
- data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +0 -1
- data/app/assets/stylesheets/spotlight/_blacklight_overrides.scss +1 -6
- data/app/assets/stylesheets/spotlight/_browse.scss +2 -2
- data/app/assets/stylesheets/spotlight/_catalog.scss +40 -41
- data/app/assets/stylesheets/spotlight/_curation.scss +1 -1
- data/app/assets/stylesheets/spotlight/_exhibit_admin.scss +7 -0
- data/app/assets/stylesheets/spotlight/_exhibits_index.scss +8 -5
- data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +3 -3
- data/app/assets/stylesheets/spotlight/_header.scss +13 -0
- data/app/assets/stylesheets/spotlight/_mixins.scss +3 -4
- data/app/assets/stylesheets/spotlight/_nestable.scss +2 -12
- data/app/assets/stylesheets/spotlight/_pages.scss +11 -9
- data/app/assets/stylesheets/spotlight/_report_a_problem.scss +1 -3
- data/app/assets/stylesheets/spotlight/_sir-trevor_overrides.scss +2 -2
- data/app/assets/stylesheets/spotlight/_spotlight.scss +2 -1
- data/app/assets/stylesheets/spotlight/_tag_selector.scss +34 -0
- data/app/assets/stylesheets/spotlight/_variables.scss +0 -8
- data/app/components/spotlight/analytics/dashboard_component.html.erb +3 -3
- data/app/components/spotlight/breadcrumbs_component.html.erb +13 -19
- data/app/components/spotlight/bulk_action_component.rb +1 -1
- data/app/components/spotlight/document_component.rb +1 -1
- data/app/components/spotlight/save_search_component.rb +1 -1
- data/app/components/spotlight/select_image_component.html.erb +17 -0
- data/app/components/spotlight/select_image_component.rb +24 -0
- data/app/components/spotlight/skip_link_component.rb +16 -0
- data/app/components/spotlight/tag_selector_component.html.erb +40 -0
- data/app/components/spotlight/tag_selector_component.rb +41 -0
- data/app/components/spotlight/tag_selector_component.yml +6 -0
- data/app/components/spotlight/title_component.html.erb +8 -0
- data/app/components/spotlight/title_component.rb +22 -0
- data/app/controllers/spotlight/accessibility_controller.rb +2 -2
- data/app/controllers/spotlight/catalog_controller.rb +7 -2
- data/app/controllers/spotlight/contact_email_controller.rb +8 -2
- data/app/controllers/spotlight/languages_controller.rb +9 -4
- data/app/helpers/spotlight/application_helper.rb +7 -0
- data/app/helpers/spotlight/crop_helper.rb +4 -0
- data/app/helpers/spotlight/meta_helper.rb +59 -36
- data/app/javascript/spotlight/admin/blacklight_configuration.js +1 -1
- data/app/javascript/spotlight/admin/block_mixins/autocompleteable.js +70 -34
- data/app/javascript/spotlight/admin/blocks/block.js +1 -0
- data/app/javascript/spotlight/admin/blocks/browse_block.js +8 -12
- data/app/javascript/spotlight/admin/blocks/browse_group_categories_block.js +14 -18
- data/app/javascript/spotlight/admin/blocks/pages_block.js +6 -10
- data/app/javascript/spotlight/admin/blocks/resources_block.js +33 -15
- data/app/javascript/spotlight/admin/blocks/solr_documents_base_block.js +11 -6
- data/app/javascript/spotlight/admin/blocks/solr_documents_embed_block.js +1 -0
- data/app/javascript/spotlight/admin/blocks/uploaded_items_block.js +4 -3
- data/app/javascript/spotlight/admin/copy_email_addresses.js +2 -0
- data/app/javascript/spotlight/admin/crop.js +45 -17
- data/app/javascript/spotlight/admin/croppable.js +8 -1
- data/app/javascript/spotlight/admin/croppable_modal.js +68 -0
- data/app/javascript/spotlight/admin/exhibits.js +15 -10
- data/app/javascript/spotlight/admin/form_observer.js +1 -1
- data/app/javascript/spotlight/admin/index.js +0 -10
- data/app/javascript/spotlight/admin/locks.js +15 -5
- data/app/javascript/spotlight/admin/pages.js +1 -1
- data/app/javascript/spotlight/admin/search_typeahead.js +62 -55
- data/app/javascript/spotlight/admin/spotlight_nestable.js +173 -50
- data/app/javascript/spotlight/admin/visibility_toggle.js +1 -11
- data/app/javascript/spotlight/controllers/index.js +8 -0
- data/app/javascript/spotlight/controllers/tag_selector_controller.js +203 -0
- data/app/javascript/spotlight/core.js +4 -6
- data/app/javascript/spotlight/index.js +2 -0
- data/app/javascript/spotlight/user/browse_group_categories.js +2 -0
- data/app/javascript/spotlight/user/carousel.js +3 -1
- data/app/javascript/spotlight/user/index.js +0 -2
- data/app/models/sir_trevor_rails/block.rb +5 -4
- data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +1 -1
- data/app/models/sir_trevor_rails/blocks/solr_documents_embed_block.rb +1 -1
- data/app/models/sir_trevor_rails/blocks/uploaded_items_block.rb +1 -1
- data/app/models/spotlight/page_configurations.rb +1 -1
- data/app/views/catalog/_add_tags.html.erb +2 -2
- data/app/views/catalog/_change_visibility.html.erb +1 -1
- data/app/views/catalog/_remove_tags.html.erb +2 -2
- data/app/views/layouts/spotlight/base.html.erb +24 -13
- data/app/views/layouts/spotlight/spotlight.html.erb +6 -6
- data/app/views/shared/_masthead.html.erb +4 -31
- data/app/views/shared/_site_sidebar.html.erb +1 -1
- data/app/views/shared/_user_util_links.html.erb +3 -1
- data/app/views/spotlight/accessibility/alt_text.html.erb +2 -2
- data/app/views/spotlight/admin_users/index.html.erb +3 -3
- data/app/views/spotlight/appearances/edit.html.erb +1 -1
- data/app/views/spotlight/browse/_search_box.html.erb +8 -8
- data/app/views/spotlight/browse/show.html.erb +1 -1
- data/app/views/spotlight/bulk_updates/_download.html.erb +1 -1
- data/app/views/spotlight/bulk_updates/_upload.html.erb +1 -1
- data/app/views/spotlight/catalog/_admin_header.html.erb +1 -1
- data/app/views/spotlight/catalog/_edit_default.html.erb +2 -1
- data/app/views/spotlight/catalog/select_image.html.erb +1 -0
- data/app/views/spotlight/contacts/_form.html.erb +1 -1
- data/app/views/spotlight/exhibits/_contact.html.erb +5 -6
- data/app/views/spotlight/exhibits/_delete.html.erb +1 -1
- data/app/views/spotlight/exhibits/_languages.html.erb +3 -2
- data/app/views/spotlight/featured_images/_form.html.erb +6 -2
- data/app/views/spotlight/featured_images/_upload_form.html.erb +1 -1
- data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +1 -1
- data/app/views/spotlight/metadata_configurations/edit.html.erb +6 -6
- data/app/views/spotlight/pages/show.html.erb +1 -1
- data/app/views/spotlight/resources/csv_upload/_form.html.erb +1 -1
- data/app/views/spotlight/resources/upload/_form.html.erb +1 -1
- data/app/views/spotlight/roles/index.html.erb +1 -1
- data/app/views/spotlight/searches/_form.html.erb +1 -1
- data/app/views/spotlight/shared/_dd3_item.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +1 -1
- data/app/views/spotlight/tags/index.html.erb +2 -3
- data/app/views/spotlight/translations/_import.html.erb +2 -2
- data/config/importmap.rb +5 -0
- data/config/locales/spotlight.en.yml +2 -0
- data/config/routes.rb +5 -3
- data/lib/generators/spotlight/assets/generator_common_utilities.rb +36 -0
- data/lib/generators/spotlight/assets/importmap_generator.rb +87 -0
- data/lib/generators/spotlight/assets/propshaft_generator.rb +96 -0
- data/lib/generators/spotlight/assets_generator.rb +22 -0
- data/lib/generators/spotlight/install_generator.rb +8 -36
- data/lib/generators/spotlight/scaffold_resource_generator.rb +1 -1
- data/lib/generators/spotlight/templates/assets/spotlight.scss +6 -0
- data/lib/generators/spotlight/templates/javascript/jquery-shim.js +1 -0
- data/lib/spotlight/engine.rb +7 -6
- data/lib/spotlight/version.rb +1 -1
- data/spec/support/features/capybara_wait_metadata_helper.rb +13 -0
- data/spec/support/features/test_features_helpers.rb +16 -30
- data/vendor/assets/javascripts/tiny-slider.js +3 -0
- metadata +35 -87
- data/app/assets/stylesheets/spotlight/#_accessibility.scss# +0 -12
- data/app/javascript/spotlight/admin/checkbox_submit.js +0 -75
- data/app/javascript/spotlight/admin/exhibit_tag_autocomplete.js +0 -39
- data/app/javascript/spotlight/user/report_a_problem.js +0 -30
- data/app/views/spotlight/browse/_tophat.html.erb +0 -1
- data/app/views/spotlight/catalog/_tophat_default.html.erb +0 -1
- data/app/views/spotlight/home_pages/_tophat.html.erb +0 -2
- data/app/views/spotlight/pages/_tophat.html.erb +0 -1
- data/lib/generators/spotlight/templates/spotlight.js +0 -1
- data/lib/generators/spotlight/templates/spotlight.scss +0 -5
- data/spec/support/features/capybara_default_max_wait_metadata_helper.rb +0 -20
- data/vendor/assets/javascripts/bootstrap-tagsinput.js +0 -530
- data/vendor/assets/javascripts/jquery.serializejson.js +0 -234
- data/vendor/assets/javascripts/nestable.js +0 -645
- data/vendor/assets/javascripts/sir-trevor.js +0 -23508
- data/vendor/assets/javascripts/typeahead.bundle.min.js +0 -7
- data/vendor/assets/stylesheets/bootstrap-tagsinput.css +0 -46
@@ -1,7 +1,6 @@
|
|
1
1
|
import BrowseGroupCateogries from 'spotlight/user/browse_group_categories'
|
2
2
|
import Carousel from 'spotlight/user/carousel'
|
3
3
|
import ClearFormButton from 'spotlight/user/clear_form_button'
|
4
|
-
import ReportProblem from 'spotlight/user/report_a_problem'
|
5
4
|
import ZprLinks from 'spotlight/user/zpr_links'
|
6
5
|
|
7
6
|
export default class {
|
@@ -9,7 +8,6 @@ export default class {
|
|
9
8
|
new BrowseGroupCateogries().connect()
|
10
9
|
new Carousel().connect()
|
11
10
|
new ClearFormButton().connect()
|
12
|
-
new ReportProblem().connect()
|
13
11
|
new ZprLinks().connect()
|
14
12
|
}
|
15
13
|
}
|
@@ -18,11 +18,12 @@ module SirTrevorRails
|
|
18
18
|
send(:[], :format).present? ? send(:[], :format).to_sym : DEFAULT_FORMAT
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
22
|
-
self.class.
|
21
|
+
def supports_alt_text?
|
22
|
+
self.class.supports_alt_text?
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
# By default we don't support alt text, but some subclasses do
|
26
|
+
def self.supports_alt_text?
|
26
27
|
false
|
27
28
|
end
|
28
29
|
|
@@ -33,7 +34,7 @@ module SirTrevorRails
|
|
33
34
|
end
|
34
35
|
|
35
36
|
def self.custom_block_type_alt_text_settings
|
36
|
-
custom_block_types.index_with { |block_type| SirTrevorRails::Block.block_class(block_type).
|
37
|
+
custom_block_types.index_with { |block_type| SirTrevorRails::Block.block_class(block_type).supports_alt_text? }
|
37
38
|
end
|
38
39
|
|
39
40
|
def initialize(hash, parent)
|
@@ -70,7 +70,7 @@ module Spotlight
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def exhibit_autocomplete_endpoint
|
73
|
-
spotlight.autocomplete_exhibit_catalog_path(current_exhibit,
|
73
|
+
spotlight.autocomplete_exhibit_catalog_path(current_exhibit, format: 'json')
|
74
74
|
end
|
75
75
|
|
76
76
|
def page_autocomplete_endpoint
|
@@ -14,12 +14,12 @@
|
|
14
14
|
</p>
|
15
15
|
<div class="form-group mb-3">
|
16
16
|
<%= label_tag :tags, t(:'spotlight.bulk_actions.add_tags.label') %>
|
17
|
-
<%=
|
17
|
+
<%= render Spotlight::TagSelectorComponent.new(field_name: :tags, all_tags: current_exhibit.owned_tags) %>
|
18
18
|
</div>
|
19
19
|
<%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search) %>
|
20
20
|
</div>
|
21
21
|
<div class="modal-footer d-flex flex-row-reverse justify-content-start">
|
22
|
-
<%= f.submit t(:'spotlight.bulk_actions.add'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm') } %>
|
22
|
+
<%= f.submit t(:'spotlight.bulk_actions.add'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm'), turbo_confirm: t(:'spotlight.bulk_actions.confirm') } %>
|
23
23
|
<button type="button" class="btn btn-link" data-dismiss="modal" data-bs-dismiss="modal"><%= t :cancel %></button>
|
24
24
|
</div>
|
25
25
|
</div>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search) %>
|
27
27
|
</div>
|
28
28
|
<div class="modal-footer d-flex flex-row-reverse justify-content-start">
|
29
|
-
<%= f.submit t(:'spotlight.bulk_actions.change'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm') } %>
|
29
|
+
<%= f.submit t(:'spotlight.bulk_actions.change'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm'), turbo_confirm: t(:'spotlight.bulk_actions.confirm') } %>
|
30
30
|
<button type="button" class="btn btn-link" data-dismiss="modal" data-bs-dismiss="modal"><%= t :cancel %></button>
|
31
31
|
</div>
|
32
32
|
</div>
|
@@ -23,12 +23,12 @@
|
|
23
23
|
|
24
24
|
<div class="form-group mb-3 mt-4">
|
25
25
|
<%= label_tag :tags, t(:'spotlight.bulk_actions.remove_tags.label') %>
|
26
|
-
<%=
|
26
|
+
<%= render Spotlight::TagSelectorComponent.new(field_name: :tags, all_tags: current_exhibit.owned_tags) %>
|
27
27
|
</div>
|
28
28
|
<%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search) %>
|
29
29
|
</div>
|
30
30
|
<div class="modal-footer d-flex flex-row-reverse justify-content-start">
|
31
|
-
<%= f.submit t(:'spotlight.bulk_actions.remove'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm') } %>
|
31
|
+
<%= f.submit t(:'spotlight.bulk_actions.remove'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm'), turbo_confirm: t(:'spotlight.bulk_actions.confirm') } %>
|
32
32
|
<button type="button" class="btn btn-link" data-dismiss="modal" data-bs-dismiss="modal"><%= t :cancel %></button>
|
33
33
|
</div>
|
34
34
|
</div>
|
@@ -13,25 +13,36 @@
|
|
13
13
|
<% else %>
|
14
14
|
<%= stylesheet_link_tag "application" %>
|
15
15
|
<% end %>
|
16
|
-
<%=
|
16
|
+
<%= javascript_tag "window.sirTrevorIcon = '#{asset_path('spotlight/blocks/sir-trevor-icons.svg')}'" %>
|
17
|
+
|
18
|
+
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
19
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.serializeJSON/3.2.1/jquery.serializejson.min.js"></script>
|
20
|
+
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
|
21
|
+
<%= javascript_tag 'L.Icon.Default.prototype.options.imagePath = "https://unpkg.com/leaflet@1.9.4/dist/images/"' %>
|
22
|
+
<%= javascript_include_tag 'leaflet-iiif', "data-turbo-track": "reload", defer: true %>
|
23
|
+
<%= javascript_include_tag 'Leaflet.Editable', "data-turbo-track": "reload", defer: true %>
|
24
|
+
<%= javascript_include_tag 'Path.Drag', "data-turbo-track": "reload", defer: true %>
|
25
|
+
<% if defined? Importmap %>
|
26
|
+
<%= javascript_importmap_tags %>
|
27
|
+
<% else %>
|
28
|
+
<%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
|
29
|
+
<% end %>
|
17
30
|
<%= csrf_meta_tags %>
|
18
31
|
<%= content_for(:head) %>
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
32
|
+
<% if @document %>
|
33
|
+
<% add_document_meta_content(@document) %>
|
34
|
+
<% elsif current_exhibit %>
|
35
|
+
<% description(current_exhibit.description) if current_exhibit %>
|
36
|
+
<% add_exhibit_meta_content %>
|
37
|
+
<% end %>
|
38
|
+
<%= yield(:meta) %>
|
39
|
+
<%= javascript_tag "window.addEventListener('load', () => $.fx.off = true)" if Rails.env.test? %>
|
24
40
|
</head>
|
25
41
|
<body class="<%= render_body_class %>">
|
26
42
|
<%= render partial: 'shared/body_preamble' %>
|
27
|
-
|
28
|
-
<% if should_render_spotlight_search_bar? %>
|
29
|
-
<%= link_to t('blacklight.skip_links.search_field'), '#search_field', class: 'btn btn-link bg-light sr-only sr-only-focusable visually-hidden-focusable' %>
|
30
|
-
<% end %>
|
31
|
-
<%= link_to t('blacklight.skip_links.main_content'), '#main-container', class: 'btn btn-link bg-light sr-only sr-only-focusable visually-hidden-focusable' %>
|
43
|
+
<%= render blacklight_config.skip_link_component.new(render_search_link: should_render_spotlight_search_bar?) do %>
|
32
44
|
<%= content_for(:skip_links) %>
|
33
|
-
|
34
|
-
|
45
|
+
<% end %>
|
35
46
|
<%= render partial: 'shared/header_navbar' %>
|
36
47
|
<%= render partial: 'shared/masthead' %>
|
37
48
|
<%= content_for?(:header_content) ? yield(:header_content) : "" %>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<% content_for(:content) do %>
|
2
|
-
<% if
|
3
|
-
<
|
4
|
-
<%= yield %>
|
5
|
-
</section>
|
6
|
-
|
7
|
-
<aside id="sidebar" class="<%= sidebar_classes %> <%= content_for(:sidebar_position) || 'order-first' %>" aria-label="<%= t('blacklight.search.documents.aria.limit_search') %>">
|
2
|
+
<% if content? :sidebar %>
|
3
|
+
<aside id="sidebar" class="<%= sidebar_classes %> <%= content_for(:sidebar_position) %>" aria-label="<%= t('blacklight.search.documents.aria.limit_search') %>">
|
8
4
|
<%= content_for(:sidebar) %>
|
9
5
|
</aside>
|
6
|
+
|
7
|
+
<section id="content" class="<%= main_content_classes %> <%= content_for(:content_position) %>" aria-label="<%= t('blacklight.search.search_results') %>">
|
8
|
+
<%= yield %>
|
9
|
+
</section>
|
10
10
|
<% else %>
|
11
11
|
<section id="content" class="col-md-12">
|
12
12
|
<%= yield %>
|
@@ -1,45 +1,18 @@
|
|
1
1
|
<% if show_contact_form? && (current_exhibit.nil? || !current_page?(spotlight.new_exhibit_contact_form_path(current_exhibit))) %>
|
2
|
-
<div id="report-problem-form">
|
2
|
+
<div id="report-problem-form" class="collapse">
|
3
3
|
<%= render 'spotlight/shared/report_a_problem' %>
|
4
4
|
</div>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<%- masthead_navbar = capture do %>
|
8
|
-
<% if content_for? :masthead_navbar %>
|
9
|
-
<%= content_for :masthead_navbar %>
|
10
|
-
<% elsif current_exhibit %>
|
11
|
-
<%= render 'shared/exhibit_navbar' %>
|
12
|
-
<% else %>
|
13
|
-
<%= render 'shared/site_navbar' %>
|
14
|
-
<% end %>
|
15
|
-
<% end %>
|
16
|
-
|
17
7
|
<header class="masthead <%= 'image-masthead' if current_masthead %> <%= 'resource-masthead' if resource_masthead? %>">
|
18
8
|
<% if current_masthead %>
|
19
9
|
<span class='background-container' style="background-image: url('<%= current_masthead.iiif_url %>')"></span>
|
20
10
|
<span class='background-container-gradient'></span>
|
21
11
|
<% end %>
|
22
12
|
|
23
|
-
<%=
|
24
|
-
|
25
|
-
|
26
|
-
<div class="site-title-wrapper">
|
27
|
-
<% if content_for? :masthead %>
|
28
|
-
<h1 class="site-title h2">
|
29
|
-
<%= content_for :masthead %>
|
30
|
-
</h1>
|
31
|
-
<% else %>
|
32
|
-
<h1 class="site-title h2">
|
33
|
-
<%= masthead_heading_content %>
|
34
|
-
</h1>
|
35
|
-
<% if masthead_subheading_content %>
|
36
|
-
<small class="d-none d-md-block py-2 fs-4"><%= masthead_subheading_content %></small>
|
37
|
-
<% end %>
|
38
|
-
<% end %>
|
39
|
-
</div>
|
40
|
-
</div>
|
41
|
-
|
42
|
-
<%= masthead_navbar unless resource_masthead? %>
|
13
|
+
<%= render current_exhibit ? 'shared/exhibit_navbar' : 'shared/site_navbar' if resource_masthead? %>
|
14
|
+
<%= render Spotlight::Engine.config.spotlight.title_component.new(title: content_for(:masthead) || masthead_heading_content, subtitle: masthead_subheading_content) %>
|
15
|
+
<%= render current_exhibit ? 'shared/exhibit_navbar' : 'shared/site_navbar' unless resource_masthead? %>
|
43
16
|
</header>
|
44
17
|
|
45
18
|
<%= render Spotlight::BreadcrumbsComponent.new(breadcrumbs:) %>
|
@@ -14,6 +14,6 @@
|
|
14
14
|
</ul>
|
15
15
|
|
16
16
|
<ul class="nav sidenav nav-pills nav-stacked">
|
17
|
-
<li class="nav-item"><%= link_to t(:'spotlight.exhibits.new.page_title'), spotlight.new_exhibit_path, class: 'btn btn-
|
17
|
+
<li class="nav-item"><%= link_to t(:'spotlight.exhibits.new.page_title'), spotlight.new_exhibit_path, class: 'btn btn-primary btn-nav', role: 'button' if can? :create, Spotlight::Exhibit %></li>
|
18
18
|
</ul>
|
19
19
|
<% end %>
|
@@ -47,7 +47,9 @@
|
|
47
47
|
<% end %>
|
48
48
|
<% if current_exhibit and show_contact_form? %>
|
49
49
|
<li class="nav-item">
|
50
|
-
<%= link_to t('spotlight.header_links.contact'), spotlight.new_exhibit_contact_form_path(current_exhibit),
|
50
|
+
<%= link_to t('spotlight.header_links.contact'), spotlight.new_exhibit_contact_form_path(current_exhibit),
|
51
|
+
data: { bs_toggle: 'collapse', bs_target: '#report-problem-form' },
|
52
|
+
class: 'nav-link' %>
|
51
53
|
</li>
|
52
54
|
<% end %>
|
53
55
|
</ul>
|
@@ -34,11 +34,11 @@
|
|
34
34
|
<%= page.title %>
|
35
35
|
<span class="alt-text-status">
|
36
36
|
<% if page_dict[:complete] %>
|
37
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" class="bi bi-check-circle-fill">
|
37
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" fill="var(--bs-success)" class="bi bi-check-circle-fill">
|
38
38
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
|
39
39
|
</svg>
|
40
40
|
<% else %>
|
41
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" class="bi bi-exclamation-triangle-fill">
|
41
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" fill="var(--bs-warning)" class="bi bi-exclamation-triangle-fill">
|
42
42
|
<path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5m.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2"/>
|
43
43
|
</svg>
|
44
44
|
<% end %>
|
@@ -45,7 +45,7 @@
|
|
45
45
|
|
46
46
|
<div class="form-actions">
|
47
47
|
<div class="primary-actions">
|
48
|
-
<%= link_to(t('.create'), 'javascript:;', class: 'btn btn-
|
48
|
+
<%= link_to(t('.create'), 'javascript:;', class: 'btn btn-primary', data: { behavior: 'new-user' }) %>
|
49
49
|
</div>
|
50
50
|
</div>
|
51
51
|
</div>
|
@@ -54,7 +54,7 @@
|
|
54
54
|
<h3 class="instructions"><%= t :'.admins_curators' %></h3>
|
55
55
|
<div id="admins_curators" class="card card-body bg-light">
|
56
56
|
<div class='btn-toolbar float-right align-self-end'>
|
57
|
-
<button class="btn btn-sm btn-
|
57
|
+
<button class="btn btn-sm btn-primary copy-email-addresses" data-clipboard-target="#admins_curators">
|
58
58
|
<%= t('.copy') %>
|
59
59
|
</button>
|
60
60
|
</div>
|
@@ -89,7 +89,7 @@
|
|
89
89
|
<% else %>
|
90
90
|
<%= link_to(t('.update'), admin_user_path(user),
|
91
91
|
data: { method: :patch, turbo_method: :patch },
|
92
|
-
class: 'btn btn-sm btn-
|
92
|
+
class: 'btn btn-sm btn-primary') %>
|
93
93
|
<% end %>
|
94
94
|
</td>
|
95
95
|
</tr>
|
@@ -71,7 +71,7 @@
|
|
71
71
|
<div class="card-group dd main_navigation_admin col-sm-7" id="nested-navigation" data-behavior="nestable" data-max-depth="1">
|
72
72
|
<ol class="dd-list">
|
73
73
|
<%= f.fields_for :main_navigations do |label| %>
|
74
|
-
<%= 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, enabled_method: :display } do; end %>
|
74
|
+
<%= 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 %>
|
75
75
|
<% end %>
|
76
76
|
</ol>
|
77
77
|
</div>
|
@@ -6,14 +6,14 @@
|
|
6
6
|
<div class="col-sm-6">
|
7
7
|
<div class="input-group">
|
8
8
|
<%= text_field_tag :q, params[:q], placeholder: t(:'.placeholder'), class: "form-control", id: "browse_q" %>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
9
|
+
<button class="btn btn-reset btn-sm" type="reset">
|
10
|
+
<span class="sr-only visually-hidden"><%= t(:'.reset') %></span>
|
11
|
+
<%= blacklight_icon('highlight_off') %>
|
12
|
+
</button>
|
13
|
+
<button type="submit" class="btn btn-primary search-btn" id="browse-search">
|
14
|
+
<span class="submit-search-text sr-only visually-hidden"><%= t(:'.submit') %></span>
|
15
|
+
<%= blacklight_icon('search', aria_hidden: true) %>
|
16
|
+
</button>
|
17
17
|
</div>
|
18
18
|
</div>
|
19
19
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<p class="instructions"><%= t('.instructions_html') %></p>
|
2
2
|
|
3
|
-
<%= bootstrap_form_with(url: download_template_exhibit_bulk_updates_path, local: true,
|
3
|
+
<%= bootstrap_form_with(url: download_template_exhibit_bulk_updates_path, local: true, data: { turbo: false }) do |f| %>
|
4
4
|
<div class="row">
|
5
5
|
<div class="col col-sm-3">
|
6
6
|
<%= f.form_group(:reference_fields, label: { text: t('.reference_fields.heading'), class: 'font-weight-bold fw-bold mb-3' }) do %>
|
@@ -17,6 +17,6 @@
|
|
17
17
|
<% end %>
|
18
18
|
<div class="row">
|
19
19
|
<div class="col-12 col-md-9 offset-md-3">
|
20
|
-
<p id="bulk-update-form-help" class="form-text text-muted
|
20
|
+
<p id="bulk-update-form-help" class="form-text text-muted ms-3"><%= t('.form_help') %></p>
|
21
21
|
</div>
|
22
22
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<div class="float-right float-end">
|
7
7
|
<%= link_to t('.reindex'), reindex_all_exhibit_resources_path(current_exhibit),
|
8
8
|
data: { method: :post, turbo_method: :post },
|
9
|
-
class: 'btn btn-
|
9
|
+
class: 'btn btn-outline-primary' %>
|
10
10
|
<% if Spotlight::Engine.config.resource_partials.any? %>
|
11
11
|
<%= link_to t('.new_resource'), new_exhibit_resource_path(current_exhibit), class: 'btn btn-primary' %>
|
12
12
|
<% end %>
|
@@ -13,7 +13,8 @@
|
|
13
13
|
|
14
14
|
<% if can? :tag, current_exhibit %>
|
15
15
|
<div class="edit-tags">
|
16
|
-
<%=
|
16
|
+
<%= render Spotlight::TagSelectorComponent.new(form: f, field_name: :exhibit_tag_list, selected_tags_value: f.object.sidecar(current_exhibit).tags_from(current_exhibit).to_s,
|
17
|
+
all_tags: current_exhibit.owned_tags) %>
|
17
18
|
</div>
|
18
19
|
<% end %>
|
19
20
|
<div class="form-actions">
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render Spotlight::SelectImageComponent.new(@index_id, @block_item_id) %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<%= f.fields_for :avatar, (@contact.avatar || @contact.build_avatar) do |af| %>
|
10
|
-
<div data-cropper="<%= af.object.model_name.singular_route_key %>" data-
|
10
|
+
<div data-cropper="<%= af.object.model_name.singular_route_key %>" data-input-prefix="<%= input_prefix(af) %>">
|
11
11
|
<%= field_set_tag(t(:'.avatar.header')) do %>
|
12
12
|
<p class="instructions"><%= t(:'featured_images.form.crop_area.help_html', scope: [:spotlight], thing: 'contact photo') %></p>
|
13
13
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
<%= turbo_frame_tag dom_id(contact.object) do %>
|
1
2
|
<div class="row contact">
|
2
3
|
<%= contact.hidden_field :id %>
|
3
4
|
<div class="col-md-8<%= ' has-error' if contact.object.errors[:email].present? %>">
|
@@ -6,17 +7,14 @@
|
|
6
7
|
<div class="form-text text-muted mb-3"><%=contact.object.errors[:email].join(", ".html_safe) %></div>
|
7
8
|
<% end %>
|
8
9
|
<p>
|
9
|
-
<span class="contact-email-delete-error text-danger
|
10
|
+
<span class="contact-email-delete-error text-danger" style="display: none;"><%= t('.email_delete_error') %> <span class="error-msg"></span></span>
|
10
11
|
</p>
|
11
12
|
</div>
|
12
13
|
<div class="col-md-4">
|
13
14
|
<% if contact.object.id %>
|
14
15
|
<span class="contact-email-delete-wrapper">
|
15
|
-
<%= link_to exhibit_contact_email_path(exhibit_id: exhibit.id, id: contact.object.id), class: 'contact-email-delete btn btn-sm btn-danger',
|
16
|
-
data: {
|
17
|
-
confirm: t('.email_delete_confirmation'),
|
18
|
-
turbo_confirm: t('.email_delete_confirmation'),
|
19
|
-
remote: true } do %>
|
16
|
+
<%= link_to exhibit_contact_email_path(exhibit_id: exhibit.id, id: contact.object.id), class: 'contact-email-delete btn btn-sm btn-danger',
|
17
|
+
data: { turbo_method: :delete, turbo_confirm: t('.email_delete_confirmation') } do %>
|
20
18
|
<%= t('.email_delete_button') %>
|
21
19
|
<% end %>
|
22
20
|
</span>
|
@@ -24,3 +22,4 @@
|
|
24
22
|
<%= render partial: 'confirmation_status', locals: {contact_email: contact.object} unless contact.object.new_record? %>
|
25
23
|
</div>
|
26
24
|
</div>
|
25
|
+
<% end %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="row">
|
5
5
|
<p class='col-9'><%= t(:".warning_html", export_link: link_to(t(:'spotlight.exhibits.export.download'), spotlight.edit_exhibit_path(current_exhibit, anchor: 'export'))) %></p>
|
6
6
|
<div class='col-3'>
|
7
|
-
<%= delete_link current_exhibit, class: 'btn btn-
|
7
|
+
<%= delete_link current_exhibit, class: 'btn btn-primary' %>
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
</div>
|
@@ -30,7 +30,8 @@
|
|
30
30
|
<tbody>
|
31
31
|
<% current_exhibit.languages.each do |language| %>
|
32
32
|
<%= f.fields_for :languages, language do |languages| %>
|
33
|
-
<tr>
|
33
|
+
<tr id="<%= dom_id(language) %>">
|
34
|
+
<%= languages.hidden_field :id %>
|
34
35
|
<td><%= t("locales.#{language.locale}") %></td>
|
35
36
|
<td class='text-center'>
|
36
37
|
<div class='checkbox'>
|
@@ -38,7 +39,7 @@
|
|
38
39
|
<%= languages.check_box_without_bootstrap :public %>
|
39
40
|
</div>
|
40
41
|
</td>
|
41
|
-
<td class='text-center'><%= link_to t('.remove'), exhibit_language_path(current_exhibit, language),
|
42
|
+
<td class='text-center'><%= link_to t('.remove'), spotlight.exhibit_language_path(current_exhibit, language), data: { turbo_method: :delete, turbo_confirm: t('.modal.confirm')}, class: 'btn btn-sm btn-danger' %></td>
|
42
43
|
</tr>
|
43
44
|
<% end %>
|
44
45
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div data-cropper="<%= f.object.model_name.singular_route_key %>" data-
|
1
|
+
<div data-cropper="<%= f.object.model_name.singular_route_key %>" data-input-prefix="<%= input_prefix(f) %>">
|
2
2
|
<%= field_set_tag do %>
|
3
3
|
<%= f.check_box(:display, layout: :vertical) %>
|
4
4
|
<% end if f.object.is_a? Spotlight::Masthead %>
|
@@ -11,7 +11,11 @@
|
|
11
11
|
<%= blacklight_icon('warning') %>
|
12
12
|
<%= t(:'.non_iiif_alert_html') %>
|
13
13
|
</div>
|
14
|
-
<%=
|
14
|
+
<auto-complete id="<%= form_prefix(f) %>-auto-complete" for="<%= form_prefix(f) %>-auto-complete-popup" fetch-on-empty>
|
15
|
+
<%= text_field_tag(:document_title, (document_presenter(f.object.document).heading if f.object.document), class: "form-control", data: { input_select_target: "##{form_prefix(f)}_source_exhibit", 'behavior': 'autocomplete', featured_image_typeahead: true, target_panel: "##{form_prefix(f)}-target-panel", :'id-field' => "##{form_prefix(f)}_document_global_id" }) %>
|
16
|
+
<ul id="<%= form_prefix(f) %>-auto-complete-popup"></ul>
|
17
|
+
<div id="<%= form_prefix(f) %>-auto-complete-feedback" class="sr-only visually-hidden"></div>
|
18
|
+
</auto-complete>
|
15
19
|
<div id="<%= form_prefix(f) %>-target-panel" style="display:none">
|
16
20
|
<div class="card-header">
|
17
21
|
<div data-item-title="true"></div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div data-cropper="<%= f.object.model_name.singular_route_key %>" data-
|
1
|
+
<div data-cropper="<%= f.object.model_name.singular_route_key %>" data-input-prefix="<%= input_prefix(f) %>">
|
2
2
|
<%= field_set_tag do %>
|
3
3
|
<%= f.check_box(:display, layout: :vertical) %>
|
4
4
|
<% end if f.object.is_a? Spotlight::Masthead %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
</div>
|
15
15
|
<% if default_field_label %>
|
16
16
|
<div class="restore-default">
|
17
|
-
<%= button_tag t(:'.restore_default'), data: {:"restore-default" => true}, class: "btn btn-
|
17
|
+
<%= button_tag t(:'.restore_default'), data: {:"restore-default" => true}, class: "btn btn-primary btn-sm #{'d-none' if config.display_label == default_field_label}" %>
|
18
18
|
</div>
|
19
19
|
<% end %>
|
20
20
|
</div>
|
@@ -17,15 +17,15 @@
|
|
17
17
|
<%= t :'.view.show' %>
|
18
18
|
</div>
|
19
19
|
<div class="text-center">
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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
25
|
</th>
|
26
26
|
<% available_view_fields.keys.each do |type| %>
|
27
27
|
<th class="text-center">
|
28
|
-
<div>
|
28
|
+
<div>
|
29
29
|
<%= t :".view.#{type}", default: t("blacklight.search.view.#{type}", default: type.to_s.humanize.titleize) %>
|
30
30
|
</div>
|
31
31
|
<div class="text-center">
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= 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
|
-
<%= f.url_field :url, type: "file", help: t('.help_html', link: link_to(t('.template'), template_exhibit_resources_csv_uploads_path)), label: t('.file_label') %>
|
2
|
+
<%= 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
3
|
<div class="form-actions">
|
4
4
|
<div class="primary-actions">
|
5
5
|
<%= cancel_link @resource, :back, class: 'btn btn-link', role: 'button' %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<div class="primary-actions">
|
14
14
|
<%= hidden_field_tag :tab, 'upload', id: nil %>
|
15
15
|
<%= cancel_link @resource, :back, class: 'btn btn-link', role: 'button' %>
|
16
|
-
<%= f.submit t('.add_item_and_continue'), name: 'add-and-continue', class: 'btn btn-
|
16
|
+
<%= f.submit t('.add_item_and_continue'), name: 'add-and-continue', class: 'btn btn-outline-primary' %>
|
17
17
|
<%= f.submit t('.add_item'), class: 'btn btn-primary' %>
|
18
18
|
</div>
|
19
19
|
</div>
|
@@ -55,7 +55,7 @@
|
|
55
55
|
|
56
56
|
<div class="form-actions">
|
57
57
|
<div class="primary-actions">
|
58
|
-
<%= exhibit_create_link Spotlight::Role.new, '#', class: 'btn btn-
|
58
|
+
<%= exhibit_create_link Spotlight::Role.new, '#', class: 'btn btn-primary', data: {behavior: 'new-user'} %>
|
59
59
|
</div>
|
60
60
|
</div>
|
61
61
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= bootstrap_form_for [@search.exhibit, @search], layout: :horizontal, label_col: 'col-md-2 col-sm-2', control_col: 'col-md-7 col-sm-7', data: {form_observer: 'true', autocomplete_exhibit_catalog_path: spotlight.autocomplete_exhibit_search_path(@search.exhibit, @search, q: "%QUERY", format: "json")}, html: {id: 'edit-search'} do |f| %>
|
1
|
+
<%= bootstrap_form_for [@search.exhibit, @search], layout: :horizontal, label_col: 'col-md-2 col-sm-2', control_col: 'col-md-7 col-sm-7', data: {form_observer: 'true', autocomplete_exhibit_catalog_path: spotlight.autocomplete_exhibit_search_path(@search.exhibit, @search, q: "%QUERY", format: "json"), turbo: 'false'}, html: {id: 'edit-search'} do |f| %>
|
2
2
|
<% if @search.errors.any? %>
|
3
3
|
<div id="error_explanation">
|
4
4
|
<h2><%= pluralize(@search.errors.count, "error") %> prohibited this page from being saved:</h2>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
|
34
34
|
<% if default_value %>
|
35
35
|
<div class="">
|
36
|
-
<%= button_tag t(:'.restore_default'), data: {:"restore-default" => true}, class: "btn restore-default btn-
|
36
|
+
<%= button_tag t(:'.restore_default'), data: {:"restore-default" => true}, class: "btn restore-default btn-primary btn-sm #{'d-none' if label.blank? || label == default_value}" %>
|
37
37
|
</div>
|
38
38
|
<% end %>
|
39
39
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
</div>
|
10
10
|
</div>
|
11
11
|
<% if group.searches.count > 1 %>
|
12
|
-
<ul class="browse-group-categories-controls p-0 pt-2 pt-md-0
|
12
|
+
<ul class="browse-group-categories-controls p-0 pt-2 pt-md-0 ms-md-auto mb-0 d-flex justify-content-center align-items-end">
|
13
13
|
<li class="prev px-1 overflow-hidden">
|
14
14
|
<%= blacklight_icon 'arrow_alt_circle_left' %>
|
15
15
|
</li>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
</div>
|
27
27
|
<% end %>
|
28
28
|
<% if solr_documents_block.zpr_link? && block_options[:iiif_tilesource].present? %>
|
29
|
-
<button class="btn btn-
|
29
|
+
<button class="btn btn-primary zpr-link" data-iiif-tilesource="<%= block_options[:iiif_tilesource] %>"><%= t('.zpr_link_html', title: doc_presenter.heading) %></button>
|
30
30
|
<% end %>
|
31
31
|
</div>
|
32
32
|
</div>
|