blacklight-spotlight 3.6.0.beta5 → 3.6.0.beta6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/spotlight/document_component.rb +19 -0
- data/app/controllers/spotlight/catalog_controller.rb +2 -2
- data/app/controllers/spotlight/exhibits_controller.rb +1 -1
- data/app/helpers/spotlight/application_helper.rb +1 -1
- data/app/helpers/spotlight/main_app_helpers.rb +0 -4
- data/app/jobs/spotlight/add_uploads_from_csv.rb +1 -1
- data/app/models/spotlight/blacklight_configuration.rb +2 -1
- data/app/models/spotlight/featured_image.rb +1 -1
- data/app/models/spotlight/page.rb +1 -1
- data/app/models/spotlight/resources/iiif_manifest.rb +2 -2
- data/app/models/spotlight/resources/iiif_service.rb +1 -1
- data/lib/generators/spotlight/templates/spotlight.scss +1 -3
- data/lib/migration/iiif.rb +1 -1
- data/lib/spotlight/engine.rb +1 -0
- data/lib/spotlight/version.rb +1 -1
- data/spec/support/features/test_features_helpers.rb +1 -1
- metadata +4 -6
- data/app/views/spotlight/catalog/_curation_mode_toggle_default.html.erb +0 -1
- data/app/views/spotlight/catalog/_tophat_default.html.erb +0 -1
- data/vendor/assets/stylesheets/leaflet-areaselect.css +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2ad914a77051069115c87db6d24e42773a464a38bbe59855105e1ba7c323615
|
4
|
+
data.tar.gz: 01a29be86b0b4877e5d7847c3fd11b3cf900bdec4a932a049e97cc2d035cb8eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ebf452f6eaaba05fe6bfdaafb5b9bd22de0e0900ba4f28b06ce07d9da386f219db5d4d2e2ead6a657ddf0cf5a028ee2bee467e2555fcfcad07e12fd73e2f4a9
|
7
|
+
data.tar.gz: 9a76eeed30ca40bcba0cc0bd1ae8c9aebf9f54830a3613e60fdf4783eb571aea92b69dace93003dd3ee07f2c74a0ee75feb9f5401dd1aa682e6839b13d342ab7
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spotlight
|
4
|
+
# Displays the document
|
5
|
+
# This overrides the title method to provide an edit link.
|
6
|
+
class DocumentComponent < Blacklight::DocumentComponent
|
7
|
+
def title
|
8
|
+
safe_join([exhibit_edit_link, super, add_document_meta_content(@document)])
|
9
|
+
end
|
10
|
+
|
11
|
+
attr_reader :document
|
12
|
+
|
13
|
+
delegate :current_exhibit, :can?, :add_document_meta_content, to: :helpers
|
14
|
+
|
15
|
+
def exhibit_edit_link
|
16
|
+
helpers.exhibit_edit_link document, [:edit, current_exhibit, document], class: 'float-right btn btn-primary' if can?(:curate, current_exhibit)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -23,8 +23,7 @@ module Spotlight
|
|
23
23
|
before_action :load_document, only: %i[edit update make_private make_public manifest]
|
24
24
|
|
25
25
|
before_action only: :show do
|
26
|
-
blacklight_config.show.
|
27
|
-
blacklight_config.show.partials.unshift 'curation_mode_toggle'
|
26
|
+
blacklight_config.show.document_component = Spotlight::DocumentComponent
|
28
27
|
end
|
29
28
|
|
30
29
|
before_action only: :admin do
|
@@ -246,4 +245,5 @@ module Spotlight
|
|
246
245
|
Rails.logger.info "Failed to commit document updates: #{e}"
|
247
246
|
end
|
248
247
|
end
|
248
|
+
# rubocop:enable Metrics/ClassLength
|
249
249
|
end
|
@@ -97,7 +97,7 @@ module Spotlight
|
|
97
97
|
# Return a copy of the blacklight configuration
|
98
98
|
# that only includes views conifgured by our block
|
99
99
|
def blacklight_view_config_for_search_block(block)
|
100
|
-
return {}
|
100
|
+
return {} if block.view.blank?
|
101
101
|
|
102
102
|
# Reject any views that aren't configured to display for this block
|
103
103
|
blacklight_config.view.select do |view, _|
|
@@ -7,10 +7,6 @@ module Spotlight
|
|
7
7
|
include Spotlight::NavbarHelper
|
8
8
|
include Spotlight::MastheadHelper
|
9
9
|
|
10
|
-
def cache_key_for_spotlight_exhibits
|
11
|
-
"#{Spotlight::Exhibit.count}/#{Spotlight::Exhibit.maximum(:updated_at).try(:utc)}"
|
12
|
-
end
|
13
|
-
|
14
10
|
def on_browse_page?
|
15
11
|
params[:controller] == 'spotlight/browse'
|
16
12
|
end
|
@@ -227,7 +227,7 @@ module Spotlight
|
|
227
227
|
config
|
228
228
|
end
|
229
229
|
end
|
230
|
-
# rubocop:enable Metrics/MethodLength, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
|
230
|
+
# rubocop:enable Metrics/MethodLength, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity, Metrics/AbcSize
|
231
231
|
|
232
232
|
def custom_index_fields(blacklight_config)
|
233
233
|
Hash[exhibit.custom_fields.reject(&:new_record?).map do |custom_field|
|
@@ -406,4 +406,5 @@ module Spotlight
|
|
406
406
|
ActiveModel::Type::Boolean.new.cast v
|
407
407
|
end
|
408
408
|
end
|
409
|
+
# rubocop:enable Metrics/ClassLength
|
409
410
|
end
|
@@ -89,7 +89,7 @@ module Spotlight
|
|
89
89
|
|
90
90
|
def manifest_metadata
|
91
91
|
metadata = metadata_class.new(manifest).to_solr
|
92
|
-
return {}
|
92
|
+
return {} if metadata.blank?
|
93
93
|
|
94
94
|
create_sidecars_for(*metadata.keys)
|
95
95
|
|
@@ -203,7 +203,7 @@ module Spotlight
|
|
203
203
|
end
|
204
204
|
|
205
205
|
def metadata_hash
|
206
|
-
return {}
|
206
|
+
return {} if metadata.blank?
|
207
207
|
return {} unless metadata.is_a?(Array)
|
208
208
|
|
209
209
|
metadata.each_with_object({}) do |md, hash|
|
data/lib/migration/iiif.rb
CHANGED
data/lib/spotlight/engine.rb
CHANGED
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: 3.6.0.
|
4
|
+
version: 3.6.0.beta6
|
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: 2023-03-
|
14
|
+
date: 2023-03-15 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activejob-status
|
@@ -911,6 +911,7 @@ files:
|
|
911
911
|
- app/assets/stylesheets/spotlight/browse_group_categories_block.scss
|
912
912
|
- app/assets/stylesheets/spotlight/typeahead.scss
|
913
913
|
- app/builders/spotlight/bootstrap_breadcrumbs_builder.rb
|
914
|
+
- app/components/spotlight/document_component.rb
|
914
915
|
- app/controllers/concerns/spotlight/base.rb
|
915
916
|
- app/controllers/concerns/spotlight/catalog.rb
|
916
917
|
- app/controllers/concerns/spotlight/config.rb
|
@@ -1204,7 +1205,6 @@ files:
|
|
1204
1205
|
- app/views/spotlight/catalog/_admin_header.html.erb
|
1205
1206
|
- app/views/spotlight/catalog/_admin_index_header_default.html.erb
|
1206
1207
|
- app/views/spotlight/catalog/_admin_thumbnail_default.html.erb
|
1207
|
-
- app/views/spotlight/catalog/_curation_mode_toggle_default.html.erb
|
1208
1208
|
- app/views/spotlight/catalog/_document.html.erb
|
1209
1209
|
- app/views/spotlight/catalog/_document_admin_table.html.erb
|
1210
1210
|
- app/views/spotlight/catalog/_document_row.html.erb
|
@@ -1213,7 +1213,6 @@ files:
|
|
1213
1213
|
- app/views/spotlight/catalog/_edit_sidecar.html.erb
|
1214
1214
|
- app/views/spotlight/catalog/_index_compact_default.html.erb
|
1215
1215
|
- app/views/spotlight/catalog/_reindex_progress_panel.html.erb
|
1216
|
-
- app/views/spotlight/catalog/_tophat_default.html.erb
|
1217
1216
|
- app/views/spotlight/catalog/admin.html.erb
|
1218
1217
|
- app/views/spotlight/catalog/edit.html.erb
|
1219
1218
|
- app/views/spotlight/catalog/index.iiif_json.jbuilder
|
@@ -1529,7 +1528,6 @@ files:
|
|
1529
1528
|
- vendor/assets/javascripts/tiny-slider.js
|
1530
1529
|
- vendor/assets/javascripts/typeahead.bundle.min.js
|
1531
1530
|
- vendor/assets/stylesheets/bootstrap-tagsinput.css
|
1532
|
-
- vendor/assets/stylesheets/leaflet-areaselect.css
|
1533
1531
|
- vendor/assets/stylesheets/sir-trevor/_icons.scss
|
1534
1532
|
- vendor/assets/stylesheets/sir-trevor/_variables.scss
|
1535
1533
|
- vendor/assets/stylesheets/sir-trevor/base.scss
|
@@ -1566,7 +1564,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1566
1564
|
- !ruby/object:Gem::Version
|
1567
1565
|
version: 1.3.1
|
1568
1566
|
requirements: []
|
1569
|
-
rubygems_version: 3.
|
1567
|
+
rubygems_version: 3.2.32
|
1570
1568
|
signing_key:
|
1571
1569
|
specification_version: 4
|
1572
1570
|
summary: Enable librarians, curators, and others who are responsible for digital collections
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= exhibit_edit_link document, [:edit, current_exhibit, document], class: 'float-right btn btn-primary' if can?(:curate, current_exhibit) and !current_page? [:edit, current_exhibit, document] %>
|
@@ -1 +0,0 @@
|
|
1
|
-
<% add_document_meta_content(@document) %>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
.leaflet-areaselect-shade {
|
2
|
-
position: absolute;
|
3
|
-
background: rgba(0,0,0, 0.4);
|
4
|
-
}
|
5
|
-
.leaflet-areaselect-handle {
|
6
|
-
position: absolute;
|
7
|
-
background: #fff;
|
8
|
-
border: 1px solid #666;
|
9
|
-
-moz-box-shadow: 1px 1px rgba(0,0,0, 0.2);
|
10
|
-
-webkit-box-shadow: 1px 1px rgba(0,0,0, 0.2);
|
11
|
-
box-shadow: 1px 1px rgba(0,0,0, 0.2);
|
12
|
-
width: 14px;
|
13
|
-
height: 14px;
|
14
|
-
cursor: move;
|
15
|
-
}
|