blacklight-spotlight 4.4.0 → 4.5.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/stylesheets/spotlight/_browse.scss +3 -11
- data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +4 -2
- data/app/controllers/spotlight/accessibility_controller.rb +2 -5
- data/app/models/spotlight/blacklight_configuration.rb +2 -1
- data/app/views/layouts/spotlight/base.html.erb +1 -1
- data/app/views/shared/_masthead.html.erb +1 -1
- 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 +1 -0
- 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/_import.html.erb +1 -1
- data/config/locales/spotlight.en.yml +4 -0
- data/lib/spotlight/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e81518a3e626b78dc9b2c1e12f76deffb597018f8346e646068ae5533a9088fd
|
4
|
+
data.tar.gz: 713b5118b8d18e0a611927af250597c855a18607224851b21fd69b4620d259dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c28398ba6f1b73939288ea0e3320259581ae0ff06903499d1120c9518c0506e2274f4d7c15d9c0e9d9ed0cf3c6fdd1f8ed31dd3cc93e2401324940215be3235b
|
7
|
+
data.tar.gz: 1017fd63630a575d362cd6b675df840477d5eb3fefc706372283b1499c77952632a48582379162dde287eb360aff5c84c4ffeaaf95ec7fd545b659dbfdfcf61a
|
@@ -48,12 +48,6 @@ $image-overlay-max-height: 300px;
|
|
48
48
|
|
49
49
|
.browse-landing {
|
50
50
|
text-align: center;
|
51
|
-
// Placeholder for vertically alignment - might already be available from use in another feature
|
52
|
-
%vertical-align {
|
53
|
-
position: relative;
|
54
|
-
top: 50%;
|
55
|
-
transform: translateY(-50%);
|
56
|
-
}
|
57
51
|
|
58
52
|
.category {
|
59
53
|
margin-bottom: $spacer;
|
@@ -77,18 +71,16 @@ $image-overlay-max-height: 300px;
|
|
77
71
|
bottom: 0;
|
78
72
|
left: 0;
|
79
73
|
width: 100%;
|
80
|
-
|
81
|
-
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .2), rgba(0, 0, 0, .4));
|
74
|
+
background: linear-gradient(0deg, rgba(46, 45, 41, 0.7) 70%, rgba(46, 45, 41, 0) 100%);
|
82
75
|
color: $white;
|
83
|
-
padding:
|
76
|
+
padding: 50px 20px 20px 20px;
|
84
77
|
text-align: center;
|
85
|
-
|
78
|
+
|
86
79
|
// prevents potential blur caused by the vertical-align technique
|
87
80
|
transform-style: preserve-3d;
|
88
81
|
|
89
82
|
.browse-category-title {
|
90
83
|
font-size: $h3-font-size;
|
91
|
-
@extend %vertical-align;
|
92
84
|
|
93
85
|
.category-subtitle {
|
94
86
|
display: block;
|
@@ -61,12 +61,14 @@ $xl-sidebar-five-tile-width: ($container-xl-sidebar * 0.2) - $tile-margin;
|
|
61
61
|
position: relative;
|
62
62
|
|
63
63
|
.category-caption {
|
64
|
-
bottom:
|
64
|
+
bottom: 0px;
|
65
65
|
color: $featured-browse-category-caption-color;
|
66
66
|
position: absolute;
|
67
67
|
text-align: center;
|
68
|
-
text-shadow: 0 1px 0 $black;
|
69
68
|
width: 100%;
|
69
|
+
padding: 35px 15px 15px;
|
70
|
+
background: linear-gradient(0deg, rgba(46, 45, 41, 0.7) 70%, rgba(46, 45, 41, 0) 100%);
|
71
|
+
border-radius: $border-radius-lg;
|
70
72
|
}
|
71
73
|
|
72
74
|
.category-title {
|
@@ -7,12 +7,7 @@ module Spotlight
|
|
7
7
|
before_action :authenticate_user!
|
8
8
|
load_and_authorize_resource :exhibit, class: Spotlight::Exhibit
|
9
9
|
|
10
|
-
include Spotlight::Base
|
11
|
-
include Spotlight::SearchHelper
|
12
|
-
|
13
10
|
def alt_text
|
14
|
-
authorize! :curate, @exhibit
|
15
|
-
|
16
11
|
@limit = 5
|
17
12
|
# Sort by newest except for the homepage, which is always first
|
18
13
|
pages_with_alt = @exhibit.pages.order(Arel.sql('id = 1 DESC, created_at DESC')).select { |elem| elem.content.any?(&:alt_text?) }
|
@@ -30,6 +25,8 @@ module Spotlight
|
|
30
25
|
can_have_alt_text = 0
|
31
26
|
has_alt_text = 0
|
32
27
|
page.content.each do |content|
|
28
|
+
next unless content.alt_text?
|
29
|
+
|
33
30
|
content.item&.each_value do |item|
|
34
31
|
can_have_alt_text += 1
|
35
32
|
has_alt_text += 1 if item['alt_text'].present? || item['decorative'].present?
|
@@ -253,7 +253,7 @@ module Spotlight
|
|
253
253
|
original_config = blacklight_config.index_fields[custom_field.field] || {}
|
254
254
|
field = Blacklight::Configuration::IndexField.new original_config.merge(
|
255
255
|
custom_field.configuration.merge(
|
256
|
-
key: custom_field.field, field: custom_field.solr_field, custom_field: true
|
256
|
+
key: custom_field.field, field: custom_field.solr_field, custom_field: true, type: 'custom-field'
|
257
257
|
)
|
258
258
|
)
|
259
259
|
[custom_field.field, field]
|
@@ -358,6 +358,7 @@ module Spotlight
|
|
358
358
|
|
359
359
|
options = f.blacklight_options || {}
|
360
360
|
options[:label] = f.label if f.label
|
361
|
+
options[:type] = 'uploaded'
|
361
362
|
|
362
363
|
config.add_index_field key, options
|
363
364
|
end
|
@@ -36,7 +36,7 @@
|
|
36
36
|
<%= render partial: 'shared/masthead' %>
|
37
37
|
<%= content_for?(:header_content) ? yield(:header_content) : "" %>
|
38
38
|
|
39
|
-
<main id="main-container" class="<%= container_classes %>"
|
39
|
+
<main id="main-container" class="<%= container_classes %>" aria-label="<%= t('blacklight.main.aria.main_container') %>">
|
40
40
|
<%= content_for(:container_header) %>
|
41
41
|
|
42
42
|
<%= render partial: 'shared/flash_msg', layout: 'shared/flash_messages' %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<% end %>
|
15
15
|
<% end %>
|
16
16
|
|
17
|
-
<header class="masthead <%= 'image-masthead' if current_masthead %> <%= 'resource-masthead' if resource_masthead? %>"
|
17
|
+
<header class="masthead <%= 'image-masthead' if current_masthead %> <%= 'resource-masthead' if resource_masthead? %>">
|
18
18
|
<% if current_masthead %>
|
19
19
|
<span class='background-container' style="background-image: url('<%= current_masthead.iiif_url %>')"></span>
|
20
20
|
<span class='background-container-gradient'></span>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<div class="input-group">
|
10
10
|
<%= file_field_tag :file, class: 'form-control', accept: '.csv,text/csv', 'aria-described-by': 'bulk-update-form-help' %>
|
11
11
|
<div class="input-group-append">
|
12
|
-
<%= f.submit t('.submit'), class: 'btn btn-primary' %>
|
12
|
+
<%= f.submit t('.submit'), class: 'btn btn-primary rounded-0 rounded-end' %>
|
13
13
|
</div>
|
14
14
|
</div>
|
15
15
|
</div>
|
@@ -18,6 +18,6 @@
|
|
18
18
|
<%= f.text_area_without_bootstrap field.slug, multiple: field.is_multiple?, value: nil, class: "form-control field-#{field.slug}" %>
|
19
19
|
</div>
|
20
20
|
<% end %>
|
21
|
-
<%= content_tag :button, t('helpers.action.add_another'), class: 'btn btn-info btn-sm h-100', data: { action: 'add-another', template_id: "spotlight-field-template-#{field.slug}" } %>
|
21
|
+
<%= content_tag :button, t('helpers.action.add_another'), class: 'btn btn-info btn-sm col-auto h-100', data: { action: 'add-another', template_id: "spotlight-field-template-#{field.slug}" } %>
|
22
22
|
<% end %>
|
23
23
|
</div>
|
@@ -18,6 +18,6 @@
|
|
18
18
|
<%= f.text_field_without_bootstrap field.slug, multiple: field.is_multiple?, value: nil, class: "form-control field-#{field.slug}" %>
|
19
19
|
</div>
|
20
20
|
<% end %>
|
21
|
-
<%= content_tag :button, t('helpers.action.add_another'), class: 'btn btn-info btn-sm h-100', data: { action: 'add-another', template_id: "spotlight-field-template-#{field.slug}" } %>
|
21
|
+
<%= content_tag :button, t('helpers.action.add_another'), class: 'btn btn-info btn-sm col-auto h-100', data: { action: 'add-another', template_id: "spotlight-field-template-#{field.slug}" } %>
|
22
22
|
<% end %>
|
23
23
|
</div>
|
@@ -2,8 +2,8 @@
|
|
2
2
|
<% page = p.object %>
|
3
3
|
<div class="home_page">
|
4
4
|
<h2><%= t('spotlight.pages.index.feature_pages.home_pages_header') %></h2>
|
5
|
-
<div class="card d-flex">
|
6
|
-
<div class="card-body d-flex
|
5
|
+
<div class="card d-flex bg-light">
|
6
|
+
<div class="card-body d-flex page main">
|
7
7
|
<div class="flex-grow-1 align-self-center">
|
8
8
|
<%= p.hidden_field :id, value: page.id , class: 'form-control form-control-sm' %>
|
9
9
|
<h3 class="h6 card-title" data-in-place-edit-target=".edit-in-place" data-in-place-edit-field-target="[data-edit-field-target='true']">
|
@@ -27,5 +27,12 @@
|
|
27
27
|
<%= field.check_box_without_bootstrap type, checked: config.send(type), disabled: !config.immutable.send(type).nil?, hide_label: true %>
|
28
28
|
</td>
|
29
29
|
<% end %>
|
30
|
+
<td class="text-center">
|
31
|
+
<% if config.type %>
|
32
|
+
<%= t(:".types.#{config.type}") %>
|
33
|
+
<% end %>
|
34
|
+
</td>
|
35
|
+
|
36
|
+
|
30
37
|
<% end %>
|
31
38
|
</tr>
|
@@ -26,6 +26,7 @@
|
|
26
26
|
<%= select_deselect_button %>
|
27
27
|
</th>
|
28
28
|
<% end %>
|
29
|
+
<th class="text-center"><%= t :'.type_label' %></th>
|
29
30
|
</tr>
|
30
31
|
</thead>
|
31
32
|
<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=" ">
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<
|
1
|
+
<div style="display:none;visibility:hidden;">
|
2
2
|
<% honeypot_field_name = Spotlight::Engine.config.spambot_honeypot_email_field %>
|
3
3
|
<%= f.email_field honeypot_field_name, label: t(:'spotlight.shared.report_a_problem.honeypot_field_explanation') %>
|
4
|
-
</
|
4
|
+
</div>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<% browse_block.searches.each_with_index do |search, index| %>
|
6
6
|
<div class="box category-<%= (index + 1) %>">
|
7
7
|
<%= link_to spotlight.exhibit_browse_path(search.exhibit, search) 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 %>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<% group.searches.published.each_with_index do |search, index| %>
|
24
24
|
<div class="box category-1 justify-content-center justify-content-md-space-around">
|
25
25
|
<%= link_to spotlight.exhibit_browse_group_path(current_exhibit, group, search), class: 'justify-content-center' do %>
|
26
|
-
<div class="browse-category" style='background-image:
|
26
|
+
<div class="browse-category" style='background-image: url("<%= search.thumbnail.iiif_url if search.thumbnail %>")'>
|
27
27
|
<div class="category-caption">
|
28
28
|
<p class="category-title">
|
29
29
|
<%= search.title %>
|
@@ -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 %>
|
@@ -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>
|
@@ -721,10 +721,14 @@ en:
|
|
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
723
|
select_all: Select 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/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.5.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-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activejob-status
|