blacklight-spotlight 4.4.0 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/spotlight/blocks/sir-trevor-icons.svg +1 -1
- data/app/assets/javascripts/spotlight/spotlight.esm.js +19 -22
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +19 -22
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +5 -4
- data/app/assets/stylesheets/spotlight/_browse.scss +3 -11
- data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +4 -2
- data/app/components/spotlight/bulk_action_component.html.erb +8 -0
- data/app/components/spotlight/bulk_action_component.rb +20 -0
- data/app/components/spotlight/header_navigation_link_component.html.erb +1 -0
- data/app/components/spotlight/header_navigation_link_component.rb +14 -0
- data/app/components/spotlight/save_search_component.html.erb +25 -0
- data/app/components/spotlight/save_search_component.rb +25 -0
- data/app/components/spotlight/translations/subheading_component.html.erb +3 -0
- data/app/components/spotlight/translations/subheading_component.rb +17 -0
- data/app/controllers/spotlight/accessibility_controller.rb +3 -8
- data/app/helpers/spotlight/application_helper.rb +6 -7
- data/app/helpers/spotlight/main_app_helpers.rb +1 -1
- data/app/javascript/spotlight/admin/blacklight_configuration.js +18 -21
- data/app/javascript/spotlight/admin/blocks/uploaded_items_block.js +2 -2
- data/app/models/spotlight/blacklight_configuration.rb +2 -1
- data/app/models/spotlight/page_configurations.rb +2 -1
- data/app/views/catalog/_bulk_actions.html.erb +1 -10
- data/app/views/catalog/_save_search.html.erb +1 -25
- data/app/views/layouts/spotlight/base.html.erb +1 -1
- data/app/views/shared/_about_navbar.html.erb +1 -1
- data/app/views/shared/_browse_navbar.html.erb +1 -1
- data/app/views/shared/_curated_features_navbar.html.erb +4 -1
- data/app/views/shared/_masthead.html.erb +1 -1
- data/app/views/spotlight/accessibility/alt_text.html.erb +1 -7
- data/app/views/spotlight/admin_users/index.html.erb +2 -2
- data/app/views/spotlight/bulk_updates/_upload.html.erb +1 -1
- data/app/views/spotlight/custom_fields/form_group/_text.html.erb +1 -1
- data/app/views/spotlight/custom_fields/form_group/_vocab.html.erb +1 -1
- data/app/views/spotlight/feature_pages/_header.html.erb +2 -2
- data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +7 -0
- data/app/views/spotlight/metadata_configurations/edit.html.erb +13 -2
- data/app/views/spotlight/shared/_honeypot_field.html.erb +2 -2
- data/app/views/spotlight/sir_trevor/blocks/_browse_block.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/_featured_pages_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb +1 -1
- data/app/views/spotlight/translations/_general.html.erb +2 -6
- data/app/views/spotlight/translations/_import.html.erb +1 -1
- data/app/views/spotlight/translations/_metadata.html.erb +1 -3
- data/app/views/spotlight/translations/_pages.html.erb +4 -9
- data/app/views/spotlight/translations/_search_fields.html.erb +3 -9
- data/config/locales/spotlight.en.yml +5 -1
- data/lib/generators/spotlight/templates/spotlight.scss +0 -1
- data/lib/spotlight/engine.rb +7 -0
- data/lib/spotlight/version.rb +1 -1
- metadata +10 -3
- data/app/assets/stylesheets/spotlight/_variables_bootstrap.scss +0 -7
@@ -3,7 +3,7 @@
|
|
3
3
|
<% featured_pages_block.pages.each_with_index do |page, index| %>
|
4
4
|
<div class="box category-<%= (index + 1) %>">
|
5
5
|
<%= link_to [spotlight, current_exhibit, page] do %>
|
6
|
-
<div class="browse-category" style='background-image:
|
6
|
+
<div class="browse-category" style='background-image: <%= "url(\"#{page.thumbnail_image_url}\")" if page.thumbnail_image_url %>'>
|
7
7
|
<div class="category-caption">
|
8
8
|
<p class="category-title">
|
9
9
|
<%= page.title %>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<% link_to_search_block.searches.each_with_index do |search, index| %>
|
6
6
|
<div class="box category-<%= (index + 1) %>">
|
7
7
|
<%= link_to spotlight.search_exhibit_catalog_path(search.exhibit, search.query_params || {}) do %>
|
8
|
-
<div class="browse-category" style='background-image:
|
8
|
+
<div class="browse-category" style='background-image: url("<%= search.thumbnail.iiif_url if search.thumbnail %>")'>
|
9
9
|
<div class="category-caption">
|
10
10
|
<p class="category-title">
|
11
11
|
<%= search.title %>
|
@@ -4,9 +4,7 @@
|
|
4
4
|
<%= hidden_field_tag :language, @language %>
|
5
5
|
|
6
6
|
<div class='translation-basic-settings'>
|
7
|
-
|
8
|
-
<%= t('.basic_settings.label') %>
|
9
|
-
</h2>
|
7
|
+
<%= render Spotlight::Translations::SubheadingComponent.new(key: 'general.basic_settings.label') %>
|
10
8
|
|
11
9
|
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "#{current_exhibit.slug}.title", locale: @language) %>
|
12
10
|
<%= f.fields_for :translations, translation do |translation_fields| %>
|
@@ -73,9 +71,7 @@
|
|
73
71
|
<% end %>
|
74
72
|
</div>
|
75
73
|
<div class='translation-main-menu'>
|
76
|
-
|
77
|
-
<%= t('.main_menu.label') %>
|
78
|
-
</h2>
|
74
|
+
<%= render Spotlight::Translations::SubheadingComponent.new(key: 'general.main_menu.label') %>
|
79
75
|
|
80
76
|
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "spotlight.curation.nav.home", locale: @language) %>
|
81
77
|
<%= f.fields_for :translations, translation do |translation_fields| %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%= file_field_tag :file, class: 'form-control' %>
|
15
15
|
<%= hidden_field_tag :tab, 'import', id: nil %>
|
16
16
|
<div class="input-group-append">
|
17
|
-
<%= f.submit t(:'.import_submit'), class: 'btn btn-primary' %>
|
17
|
+
<%= f.submit t(:'.import_submit'), class: 'btn btn-primary rounded-0 rounded-end' %>
|
18
18
|
</div>
|
19
19
|
</div>
|
20
20
|
</div>
|
@@ -31,9 +31,7 @@
|
|
31
31
|
|
32
32
|
<% if current_exhibit.custom_fields.any? %>
|
33
33
|
<div class='translation-exhibit-specific-fields'>
|
34
|
-
|
35
|
-
<%= t('.exhibit_specific_fields.label') %>
|
36
|
-
</h2>
|
34
|
+
<%= render Spotlight::Translations::SubheadingComponent.new(key: 'metadata.exhibit_specific_fields.label') %>
|
37
35
|
|
38
36
|
<% current_exhibit.custom_fields.each do |custom_field| %>
|
39
37
|
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "blacklight.search.fields.#{custom_field.field}", locale: @language) %>
|
@@ -3,17 +3,14 @@
|
|
3
3
|
|
4
4
|
<%= bootstrap_form_for @exhibit, url: polymorphic_path([:update_all, @exhibit, :pages]), layout: :horizontal, control_col: 'col-sm-10', html: {:'data-form-observer' => true} do |f| %>
|
5
5
|
<div class="translation-home-page-settings">
|
6
|
-
|
7
|
-
|
8
|
-
</h2>
|
6
|
+
<%= render Spotlight::Translations::SubheadingComponent.new(key: 'pages.home_page.label') %>
|
7
|
+
|
9
8
|
<%= render 'pages_table', pages: [current_exhibit.home_page], f: f %>
|
10
9
|
</div>
|
11
10
|
|
12
11
|
<% if current_exhibit.feature_pages.any? %>
|
13
12
|
<div class="translation-feature-page-settings">
|
14
|
-
|
15
|
-
<%= t('.feature_pages.label') %>
|
16
|
-
</h2>
|
13
|
+
<%= render Spotlight::Translations::SubheadingComponent.new(key: 'pages.feature_pages.label') %>
|
17
14
|
|
18
15
|
<%= render 'pages_table', pages: current_exhibit.feature_pages.for_default_locale, f: f %>
|
19
16
|
</div>
|
@@ -21,9 +18,7 @@
|
|
21
18
|
|
22
19
|
<% if current_exhibit.about_pages.any? %>
|
23
20
|
<div class="translation-about-page-settings">
|
24
|
-
|
25
|
-
<%= t('.about_pages.label') %>
|
26
|
-
</h2>
|
21
|
+
<%= render Spotlight::Translations::SubheadingComponent.new(key: 'pages.about_pages.label') %>
|
27
22
|
|
28
23
|
<%= render 'pages_table', pages: current_exhibit.about_pages.for_default_locale, f: f %>
|
29
24
|
</div>
|
@@ -5,9 +5,7 @@
|
|
5
5
|
<%= hidden_field_tag :tab, 'search_fields', id: nil %>
|
6
6
|
|
7
7
|
<div class='translation-field-based-search-fields'>
|
8
|
-
|
9
|
-
<%= t('.field_based_search_fields.label') %>
|
10
|
-
</h2>
|
8
|
+
<%= render Spotlight::Translations::SubheadingComponent.new(key: 'search_fields.field_based_search_fields.label') %>
|
11
9
|
|
12
10
|
<% current_exhibit.blacklight_config.search_fields.select { |_, config| config.if }.each do |key, search_config| %>
|
13
11
|
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "blacklight.search.fields.search.#{key}", locale: @language) %>
|
@@ -35,9 +33,7 @@
|
|
35
33
|
</div>
|
36
34
|
|
37
35
|
<div class='translation-facet-fields'>
|
38
|
-
|
39
|
-
<%= t('.facet_fields.label') %>
|
40
|
-
</h2>
|
36
|
+
<%= render Spotlight::Translations::SubheadingComponent.new(key: 'search_fields.facet_fields.label') %>
|
41
37
|
|
42
38
|
<% current_exhibit.blacklight_config.facet_fields.each do |key, facet_config| %>
|
43
39
|
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "blacklight.search.fields.facet.#{key}", locale: @language) %>
|
@@ -65,9 +61,7 @@
|
|
65
61
|
</div>
|
66
62
|
|
67
63
|
<div class='translation-sort-fields'>
|
68
|
-
|
69
|
-
<%= t('.sort_fields.label') %>
|
70
|
-
</h2>
|
64
|
+
<%= render Spotlight::Translations::SubheadingComponent.new(key: 'search_fields.sort_fields.label') %>
|
71
65
|
|
72
66
|
<% current_exhibit.blacklight_config.sort_fields.each do |key, sort_config| %>
|
73
67
|
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "blacklight.search.fields.sort.#{key}", locale: @language) %>
|
@@ -720,11 +720,15 @@ en:
|
|
720
720
|
header: Metadata
|
721
721
|
instructions: Select metadata fields to display on each type of page. Select a field name to edit its display label. Drag and drop fields to specify the order in which they are displayed.
|
722
722
|
order_header: Display and order metadata fields
|
723
|
-
select_all:
|
723
|
+
select_all: All
|
724
|
+
type_label: Type
|
724
725
|
view:
|
725
726
|
show: Item details
|
726
727
|
metadata_field:
|
727
728
|
restore_default: Restore default
|
729
|
+
types:
|
730
|
+
custom-field: Exhibit-specific
|
731
|
+
uploaded: Upload
|
728
732
|
pages:
|
729
733
|
edit:
|
730
734
|
header: Edit page
|
data/lib/spotlight/engine.rb
CHANGED
@@ -188,6 +188,13 @@ module Spotlight
|
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|
191
|
+
initializer 'components.initialize' do
|
192
|
+
ActiveSupport::Reloader.to_prepare do
|
193
|
+
Spotlight::Engine.config.spotlight = OpenStruct.new
|
194
|
+
Spotlight::Engine.config.spotlight.header_navigation_link_component = Spotlight::HeaderNavigationLinkComponent
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
191
198
|
# After creating a property for your site on Google Analytics, you need to:
|
192
199
|
# a) Enable Google Analytics API in https://console.cloud.google.com/
|
193
200
|
# b) generate and download the JSON key and make it accessible to your application
|
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: 4.
|
4
|
+
version: 4.6.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: 2024-
|
14
|
+
date: 2024-12-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activejob-status
|
@@ -897,7 +897,6 @@ files:
|
|
897
897
|
- app/assets/stylesheets/spotlight/_uploaded_items_block.scss
|
898
898
|
- app/assets/stylesheets/spotlight/_utilities.scss
|
899
899
|
- app/assets/stylesheets/spotlight/_variables.scss
|
900
|
-
- app/assets/stylesheets/spotlight/_variables_bootstrap.scss
|
901
900
|
- app/assets/stylesheets/spotlight/_view_larger.scss
|
902
901
|
- app/assets/stylesheets/spotlight/browse_group_categories_block.scss
|
903
902
|
- app/assets/stylesheets/spotlight/typeahead.scss
|
@@ -922,6 +921,8 @@ files:
|
|
922
921
|
- app/components/spotlight/analytics/dashboard_component.rb
|
923
922
|
- app/components/spotlight/breadcrumbs_component.html.erb
|
924
923
|
- app/components/spotlight/breadcrumbs_component.rb
|
924
|
+
- app/components/spotlight/bulk_action_component.html.erb
|
925
|
+
- app/components/spotlight/bulk_action_component.rb
|
925
926
|
- app/components/spotlight/document_admin_table_component.html.erb
|
926
927
|
- app/components/spotlight/document_admin_table_component.rb
|
927
928
|
- app/components/spotlight/document_component.rb
|
@@ -931,11 +932,17 @@ files:
|
|
931
932
|
- app/components/spotlight/exhibit_navbar_component.rb
|
932
933
|
- app/components/spotlight/header_component.html.erb
|
933
934
|
- app/components/spotlight/header_component.rb
|
935
|
+
- app/components/spotlight/header_navigation_link_component.html.erb
|
936
|
+
- app/components/spotlight/header_navigation_link_component.rb
|
934
937
|
- app/components/spotlight/icon_component.rb
|
938
|
+
- app/components/spotlight/save_search_component.html.erb
|
939
|
+
- app/components/spotlight/save_search_component.rb
|
935
940
|
- app/components/spotlight/solr_document_legacy_embed_component.html.erb
|
936
941
|
- app/components/spotlight/solr_document_legacy_embed_component.rb
|
937
942
|
- app/components/spotlight/tag_list_form_component.html.erb
|
938
943
|
- app/components/spotlight/tag_list_form_component.rb
|
944
|
+
- app/components/spotlight/translations/subheading_component.html.erb
|
945
|
+
- app/components/spotlight/translations/subheading_component.rb
|
939
946
|
- app/controllers/concerns/spotlight/base.rb
|
940
947
|
- app/controllers/concerns/spotlight/catalog.rb
|
941
948
|
- app/controllers/concerns/spotlight/config.rb
|
@@ -1,7 +0,0 @@
|
|
1
|
-
// $font-size-base: 14px;
|
2
|
-
// $h1-font-size: floor(($font-size-base * 2.15)) !default; // ~30px
|
3
|
-
// $h2-font-size: floor(($font-size-base * 1.7)) !default; // ~24px
|
4
|
-
// $h3-font-size: ceil(($font-size-base * 1.53)) !default; // ~201px
|
5
|
-
// $h4-font-size: ceil(($font-size-base * 1.21)) !default; // ~17px
|
6
|
-
// $h5-font-size: $font-size-base !default;
|
7
|
-
// $h6-font-size: ceil(($font-size-base * 0.85)) !default; // ~12px
|