blacklight-spotlight 5.2.2 → 5.2.3
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/Rakefile +1 -1
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/assets/stylesheets/spotlight/_browse.scss +1 -1
- data/app/assets/stylesheets/spotlight/_collapse_toggle.scss +2 -2
- data/app/assets/stylesheets/spotlight/_curation.scss +3 -25
- data/app/assets/stylesheets/spotlight/_header.scss +0 -4
- data/app/assets/stylesheets/spotlight/_nestable.scss +0 -3
- data/app/assets/stylesheets/spotlight/_report_a_problem.scss +1 -1
- data/app/assets/stylesheets/spotlight/_sir-trevor_overrides.scss +4 -0
- data/app/assets/stylesheets/spotlight/_slideshow_block.scss +1 -1
- data/app/controllers/spotlight/metadata_configurations_controller.rb +1 -1
- data/app/controllers/spotlight/resources_controller.rb +1 -1
- data/app/helpers/spotlight/application_helper.rb +1 -13
- data/app/helpers/spotlight/exhibit_theme_helper.rb +20 -0
- data/app/helpers/spotlight/main_app_helpers.rb +1 -13
- data/app/models/spotlight/featured_image.rb +0 -7
- data/app/models/spotlight/resource.rb +7 -5
- data/app/models/spotlight/resources/iiif_manifest_v3.rb +2 -2
- data/config/importmap.rb +4 -4
- data/lib/spotlight/version.rb +1 -1
- data/spec/support/views/test_view_helpers.rb +1 -0
- metadata +5 -5
- data/app/javascript/spotlight/controllers/clipboard_controller.js~ +0 -6
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
.btn.collapse-toggle {
|
|
4
4
|
& + .collapse-chevron {
|
|
5
5
|
display: inline-block;
|
|
6
|
-
text-align:
|
|
6
|
+
text-align: end;
|
|
7
7
|
transform: rotate(90deg);
|
|
8
8
|
width: 16px;
|
|
9
9
|
}
|
|
10
10
|
&.collapsed + .collapse-chevron {
|
|
11
|
-
text-align:
|
|
11
|
+
text-align: start;
|
|
12
12
|
transform: none;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
display: none;
|
|
28
28
|
}
|
|
29
29
|
[data-expanded-add-button] {
|
|
30
|
-
text-align:
|
|
30
|
+
text-align: start;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -80,28 +80,6 @@
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
.card.page-admin {
|
|
85
|
-
&:hover {
|
|
86
|
-
@include panel-hover-highlighting;
|
|
87
|
-
}
|
|
88
|
-
.card-title {
|
|
89
|
-
@extend .mb-0;
|
|
90
|
-
@extend .py-2;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.page-links, .contact-links {
|
|
94
|
-
text-align: right;
|
|
95
|
-
a {
|
|
96
|
-
padding: 0 2px;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
.main {
|
|
100
|
-
width: 99%;
|
|
101
|
-
vertical-align: text-top;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
83
|
.contacts_admin .card-header.page .main {
|
|
106
84
|
width: 95%;
|
|
107
85
|
}
|
|
@@ -180,7 +158,7 @@ h1,h2,h3,h4,h5,h6 {
|
|
|
180
158
|
.facet-metadata {
|
|
181
159
|
@extend .text-muted;
|
|
182
160
|
font-size: $font-size-base;
|
|
183
|
-
text-align:
|
|
161
|
+
text-align: end;
|
|
184
162
|
}
|
|
185
163
|
|
|
186
164
|
table#exhibit-specific-fields {
|
|
@@ -210,7 +188,7 @@ table.users {
|
|
|
210
188
|
|
|
211
189
|
table.tags {
|
|
212
190
|
td:nth-child(2), th:nth-child(2) {
|
|
213
|
-
text-align:
|
|
191
|
+
text-align: end;
|
|
214
192
|
}
|
|
215
193
|
td:nth-child(3), th:nth-child(3) {
|
|
216
194
|
text-align: center;
|
|
@@ -44,7 +44,7 @@ module Spotlight
|
|
|
44
44
|
views = @blacklight_configuration.default_blacklight_config.view.keys | [:show]
|
|
45
45
|
|
|
46
46
|
@blacklight_configuration.blacklight_config.index_fields.keys.index_with do |_element|
|
|
47
|
-
|
|
47
|
+
%i[enabled label weight] | views
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
end
|
|
@@ -55,7 +55,7 @@ module Spotlight
|
|
|
55
55
|
|
|
56
56
|
def resource_params
|
|
57
57
|
params.require(:resource).tap { |x| x['type'] ||= resource_class.name }
|
|
58
|
-
|
|
58
|
+
.permit(:url, :type, *resource_class.stored_attributes[:data], data: params[:resource][:data].try(:keys))
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
end
|
|
@@ -5,6 +5,7 @@ module Spotlight
|
|
|
5
5
|
# General spotlight application helpers
|
|
6
6
|
module ApplicationHelper
|
|
7
7
|
include CrudLinkHelpers
|
|
8
|
+
include ExhibitThemeHelper
|
|
8
9
|
include TitleHelper
|
|
9
10
|
include MetaHelper
|
|
10
11
|
include CropHelper
|
|
@@ -151,19 +152,6 @@ module Spotlight
|
|
|
151
152
|
current_exhibit.blacklight_configuration.default_blacklight_config.view.to_h.reject { |_k, v| v.if == false }
|
|
152
153
|
end
|
|
153
154
|
|
|
154
|
-
def exhibit_stylesheet_link_tag(tag)
|
|
155
|
-
if current_exhibit_theme && current_exhibit.theme != 'default'
|
|
156
|
-
stylesheet_link_tag "#{tag}_#{current_exhibit_theme}"
|
|
157
|
-
else
|
|
158
|
-
Rails.logger.warn "Exhibit theme '#{current_exhibit_theme}' not in the list of available themes: #{current_exhibit.themes}"
|
|
159
|
-
stylesheet_link_tag(tag)
|
|
160
|
-
end
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
def current_exhibit_theme
|
|
164
|
-
current_exhibit.theme if current_exhibit && current_exhibit.theme.present? && current_exhibit.themes.include?(current_exhibit.theme)
|
|
165
|
-
end
|
|
166
|
-
|
|
167
155
|
def render_search_bar
|
|
168
156
|
return super if defined?(super)
|
|
169
157
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Spotlight
|
|
4
|
+
##
|
|
5
|
+
# Exhibit theme/stylesheet helper
|
|
6
|
+
module ExhibitThemeHelper
|
|
7
|
+
def exhibit_stylesheet_link_tag(tag)
|
|
8
|
+
if current_exhibit_theme && current_exhibit&.theme != 'default'
|
|
9
|
+
stylesheet_link_tag "#{tag}_#{current_exhibit_theme}"
|
|
10
|
+
else
|
|
11
|
+
Rails.logger.debug { "Exhibit theme '#{current_exhibit_theme}' not in the list of available themes: #{current_exhibit&.themes}" }
|
|
12
|
+
stylesheet_link_tag(tag)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def current_exhibit_theme
|
|
17
|
+
current_exhibit.theme if current_exhibit && current_exhibit.theme.present? && current_exhibit.themes.include?(current_exhibit.theme)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -5,6 +5,7 @@ module Spotlight
|
|
|
5
5
|
# Helpers that are injected into the main application (because they used in layouts)
|
|
6
6
|
module MainAppHelpers
|
|
7
7
|
include Blacklight::DocumentHelperBehavior
|
|
8
|
+
include Spotlight::ExhibitThemeHelper
|
|
8
9
|
include Spotlight::NavbarHelper
|
|
9
10
|
include Spotlight::MastheadHelper
|
|
10
11
|
|
|
@@ -37,18 +38,5 @@ module Spotlight
|
|
|
37
38
|
blacklight_config.view_config(action_name: :show).document_presenter_class
|
|
38
39
|
end
|
|
39
40
|
end
|
|
40
|
-
|
|
41
|
-
def exhibit_stylesheet_link_tag(tag)
|
|
42
|
-
if current_exhibit_theme && current_exhibit&.theme != 'default'
|
|
43
|
-
stylesheet_link_tag "#{tag}_#{current_exhibit_theme}"
|
|
44
|
-
else
|
|
45
|
-
Rails.logger.debug { "Exhibit theme '#{current_exhibit_theme}' not in the list of available themes: #{current_exhibit&.themes}" }
|
|
46
|
-
stylesheet_link_tag(tag)
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def current_exhibit_theme
|
|
51
|
-
current_exhibit.theme if current_exhibit && current_exhibit.theme.present? && current_exhibit.themes.include?(current_exhibit.theme)
|
|
52
|
-
end
|
|
53
41
|
end
|
|
54
42
|
end
|
|
@@ -24,13 +24,6 @@ module Spotlight
|
|
|
24
24
|
Spotlight::TemporaryImage.find(upload_id).delete if upload_id.present?
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
after_save do
|
|
28
|
-
if image.present?
|
|
29
|
-
image.cache! unless image.cached?
|
|
30
|
-
image.store!
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
27
|
after_save :bust_containing_resource_caches
|
|
35
28
|
|
|
36
29
|
attr_accessor :upload_id
|
|
@@ -7,11 +7,13 @@ module Spotlight
|
|
|
7
7
|
class_attribute :indexing_pipeline, default: (Spotlight::Etl::Pipeline.new do |pipeline|
|
|
8
8
|
pipeline.sources = [Spotlight::Etl::Sources::IdentitySource]
|
|
9
9
|
pipeline.transforms = [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
{
|
|
11
|
+
reject_blank: Spotlight::Etl::Transforms::RejectBlank,
|
|
12
|
+
reject_missing: Spotlight::Etl::Transforms::RejectMissingUniqueId,
|
|
13
|
+
apply_exhibit_metadata: Spotlight::Etl::Transforms::ApplyExhibitMetadata,
|
|
14
|
+
apply_application_metadata: Spotlight::Etl::Transforms::ApplyApplicationMetadata,
|
|
15
|
+
apply_pipeline_metadata: Spotlight::Etl::Transforms::ApplyPipelineMetadata
|
|
16
|
+
}
|
|
15
17
|
]
|
|
16
18
|
pipeline.loaders = [Spotlight::Etl::SolrLoader]
|
|
17
19
|
end)
|
|
@@ -28,8 +28,8 @@ module Spotlight
|
|
|
28
28
|
@resources ||=
|
|
29
29
|
canvases
|
|
30
30
|
.flat_map(&:items).select { |item| item.type == 'AnnotationPage' }
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
.flat_map(&:items).select { |item| item.motivation == 'painting' }
|
|
32
|
+
.flat_map(&:body)
|
|
33
33
|
.flat_map(&:service)
|
|
34
34
|
end
|
|
35
35
|
|
data/config/importmap.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
pin_all_from File.expand_path('../app/javascript/spotlight', __dir__), under: 'spotlight'
|
|
4
4
|
pin_all_from File.expand_path('../vendor/assets/javascripts', __dir__)
|
|
5
5
|
|
|
6
|
-
pin 'clipboard', to: 'https://cdn.
|
|
7
|
-
pin 'sir-trevor', to: 'https://cdn.
|
|
8
|
-
pin 'sortablejs', to: 'https://cdn.
|
|
9
|
-
pin '@github/auto-complete-element', to: 'https://cdn.
|
|
6
|
+
pin 'clipboard', to: 'https://cdn.jsdelivr.net/npm/clipboard@2.0.11/+esm'
|
|
7
|
+
pin 'sir-trevor', to: 'https://cdn.jsdelivr.net/npm/sir-trevor@0.8.2/+esm'
|
|
8
|
+
pin 'sortablejs', to: 'https://cdn.jsdelivr.net/npm/sortablejs@^1.15.3/+esm'
|
|
9
|
+
pin '@github/auto-complete-element', to: 'https://cdn.jsdelivr.net/npm/@github/auto-complete-element@3.8.0/+esm'
|
data/lib/spotlight/version.rb
CHANGED
|
@@ -12,6 +12,7 @@ module Spotlight
|
|
|
12
12
|
view.send(:extend, Spotlight::TitleHelper)
|
|
13
13
|
view.send(:extend, Spotlight::NavbarHelper)
|
|
14
14
|
view.send(:extend, Spotlight::CropHelper)
|
|
15
|
+
view.send(:extend, Spotlight::ExhibitThemeHelper)
|
|
15
16
|
view.send(:extend, Spotlight::PagesHelper)
|
|
16
17
|
view.send(:extend, Blacklight::ComponentHelperBehavior)
|
|
17
18
|
end
|
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.2.
|
|
4
|
+
version: 5.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Beer
|
|
@@ -129,7 +129,7 @@ dependencies:
|
|
|
129
129
|
version: 2.2.1
|
|
130
130
|
- - "<"
|
|
131
131
|
- !ruby/object:Gem::Version
|
|
132
|
-
version: '
|
|
132
|
+
version: '4'
|
|
133
133
|
type: :runtime
|
|
134
134
|
prerelease: false
|
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -139,7 +139,7 @@ dependencies:
|
|
|
139
139
|
version: 2.2.1
|
|
140
140
|
- - "<"
|
|
141
141
|
- !ruby/object:Gem::Version
|
|
142
|
-
version: '
|
|
142
|
+
version: '4'
|
|
143
143
|
- !ruby/object:Gem::Dependency
|
|
144
144
|
name: csv
|
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -960,6 +960,7 @@ files:
|
|
|
960
960
|
- app/helpers/spotlight/browse_helper.rb
|
|
961
961
|
- app/helpers/spotlight/crop_helper.rb
|
|
962
962
|
- app/helpers/spotlight/crud_link_helpers.rb
|
|
963
|
+
- app/helpers/spotlight/exhibit_theme_helper.rb
|
|
963
964
|
- app/helpers/spotlight/job_trackers_helper.rb
|
|
964
965
|
- app/helpers/spotlight/languages_helper.rb
|
|
965
966
|
- app/helpers/spotlight/main_app_helpers.rb
|
|
@@ -1021,7 +1022,6 @@ files:
|
|
|
1021
1022
|
- app/javascript/spotlight/admin/translation_progress.js
|
|
1022
1023
|
- app/javascript/spotlight/admin/users.js
|
|
1023
1024
|
- app/javascript/spotlight/admin/visibility_toggle.js
|
|
1024
|
-
- app/javascript/spotlight/controllers/clipboard_controller.js~
|
|
1025
1025
|
- app/javascript/spotlight/controllers/index.js
|
|
1026
1026
|
- app/javascript/spotlight/controllers/tag_selector_controller.js
|
|
1027
1027
|
- app/javascript/spotlight/core.js
|
|
@@ -1561,7 +1561,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1561
1561
|
- !ruby/object:Gem::Version
|
|
1562
1562
|
version: '0'
|
|
1563
1563
|
requirements: []
|
|
1564
|
-
rubygems_version: 3.6.
|
|
1564
|
+
rubygems_version: 3.6.9
|
|
1565
1565
|
specification_version: 4
|
|
1566
1566
|
summary: Enable librarians, curators, and others who are responsible for digital collections
|
|
1567
1567
|
to create attractive, feature-rich websites that feature these collections.
|