blacklight-spotlight 4.3.6 → 4.4.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/javascripts/spotlight/spotlight.esm.js +20 -11
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +20 -11
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/assets/stylesheets/spotlight/_accessibility.scss +9 -0
- data/app/assets/stylesheets/spotlight/_browse.scss +1 -0
- data/app/assets/stylesheets/spotlight/_mixins.scss +1 -0
- data/app/components/spotlight/edit_view_links_component.html.erb +13 -0
- data/app/components/spotlight/edit_view_links_component.rb +16 -0
- data/app/components/spotlight/solr_document_legacy_embed_component.rb +1 -1
- data/app/components/spotlight/tag_list_form_component.html.erb +1 -1
- data/app/controllers/spotlight/accessibility_controller.rb +48 -0
- data/app/helpers/spotlight/main_app_helpers.rb +1 -1
- data/app/helpers/spotlight/title_helper.rb +4 -0
- data/app/javascript/spotlight/admin/blocks/resources_block.js +16 -7
- data/app/javascript/spotlight/admin/blocks/solr_documents_embed_block.js +0 -1
- data/app/javascript/spotlight/admin/pages.js +1 -0
- data/app/javascript/spotlight/admin/visibility_toggle.js +1 -1
- data/app/javascript/spotlight/user/clear_form_button.js +2 -2
- data/app/models/sir_trevor_rails/block.rb +12 -0
- data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +4 -0
- data/app/models/sir_trevor_rails/blocks/solr_documents_embed_block.rb +3 -0
- data/app/models/sir_trevor_rails/blocks/uploaded_items_block.rb +4 -0
- data/app/models/spotlight/custom_field.rb +1 -1
- data/app/services/spotlight/exhibit_import_export_service.rb +1 -0
- data/app/views/spotlight/accessibility/alt_text.html.erb +64 -0
- data/app/views/spotlight/browse/_search_box.html.erb +9 -11
- data/app/views/spotlight/dashboards/_page.html.erb +1 -9
- data/app/views/spotlight/exhibits/_form.html.erb +2 -2
- data/app/views/spotlight/feature_pages/_header.html.erb +1 -4
- data/app/views/spotlight/pages/_form.html.erb +1 -1
- data/app/views/spotlight/pages/_page.html.erb +1 -5
- data/app/views/spotlight/searches/_form.html.erb +3 -3
- data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +1 -0
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +2 -2
- data/config/locales/spotlight.en.yml +11 -2
- data/config/routes.rb +2 -0
- data/lib/spotlight/version.rb +1 -1
- metadata +6 -2
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="<%= classes %>">
|
2
|
+
<% if page.is_a?(Spotlight::HomePage) %>
|
3
|
+
<%= helpers.exhibit_view_link page, helpers.exhibit_root_path(page.exhibit) %> ·
|
4
|
+
<%= helpers.exhibit_edit_link page, helpers.edit_exhibit_home_page_path(page.exhibit), data: { turbolinks: false,
|
5
|
+
turbo: false } %>
|
6
|
+
<% else %>
|
7
|
+
<%= helpers.exhibit_view_link page %> ·
|
8
|
+
<%= helpers.exhibit_edit_link page, data: { turbolinks: false, turbo: false } %>
|
9
|
+
<% end %>
|
10
|
+
<% if delete_link %>
|
11
|
+
· <%= helpers.exhibit_delete_link page %>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spotlight
|
4
|
+
# Allows component addition to exhibit navbar
|
5
|
+
class EditViewLinksComponent < ViewComponent::Base
|
6
|
+
attr_reader :page, :classes, :delete_link
|
7
|
+
|
8
|
+
def initialize(page:, classes: 'page-links', delete_link: false)
|
9
|
+
super
|
10
|
+
|
11
|
+
@page = page
|
12
|
+
@classes = classes
|
13
|
+
@delete_link = delete_link
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if Spotlight::Engine.config.site_tags %>
|
2
|
-
<div class="form-group row">
|
2
|
+
<div class="form-group mb-3 row">
|
3
3
|
<label class="col-form-label col-md-2" for="tag_list">Tag list</label>
|
4
4
|
<div class="col-md-10">
|
5
5
|
<div class="overflow-scroll rounded border px-3 py-2 h-25" style="overflow: scroll; height: 25vh!important;">
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spotlight
|
4
|
+
##
|
5
|
+
# Exhibit dashboard controller
|
6
|
+
class AccessibilityController < Spotlight::ApplicationController
|
7
|
+
before_action :authenticate_user!
|
8
|
+
load_and_authorize_resource :exhibit, class: Spotlight::Exhibit
|
9
|
+
|
10
|
+
include Spotlight::Base
|
11
|
+
include Spotlight::SearchHelper
|
12
|
+
|
13
|
+
def alt_text
|
14
|
+
authorize! :curate, @exhibit
|
15
|
+
|
16
|
+
@limit = 5
|
17
|
+
# Sort by newest except for the homepage, which is always first
|
18
|
+
pages_with_alt = @exhibit.pages.order(Arel.sql('id = 1 DESC, created_at DESC')).select { |elem| elem.content.any?(&:alt_text?) }
|
19
|
+
pages = params[:show_all] ? pages_with_alt : pages_with_alt.first(@limit)
|
20
|
+
@pages = pages.map { |page| get_alt_info(page) }
|
21
|
+
@has_alt_text = @pages.sum { |page| page[:has_alt_text] }
|
22
|
+
@total_alt_items = @pages.sum { |page| page[:can_have_alt_text] }
|
23
|
+
|
24
|
+
attach_alt_text_breadcrumbs
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def get_alt_info(page)
|
30
|
+
can_have_alt_text = 0
|
31
|
+
has_alt_text = 0
|
32
|
+
page.content.each do |content|
|
33
|
+
content.item&.each_value do |item|
|
34
|
+
can_have_alt_text += 1
|
35
|
+
has_alt_text += 1 if item['alt_text'].present? || item['decorative'].present?
|
36
|
+
end
|
37
|
+
end
|
38
|
+
complete = can_have_alt_text.zero? || has_alt_text / can_have_alt_text == 1
|
39
|
+
{ can_have_alt_text:, has_alt_text:, page:, status: has_alt_text, complete: }
|
40
|
+
end
|
41
|
+
|
42
|
+
def attach_alt_text_breadcrumbs
|
43
|
+
add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
|
44
|
+
add_breadcrumb(t(:'spotlight.accessibility.header'), exhibit_dashboard_path(@exhibit))
|
45
|
+
add_breadcrumb(t(:'spotlight.accessibility.alt_text.header'), exhibit_alt_text_path(@exhibit))
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -31,7 +31,7 @@ module Spotlight
|
|
31
31
|
|
32
32
|
# Expecting to upstream this override in https://github.com/projectblacklight/blacklight/pull/3343/files
|
33
33
|
def document_presenter(document, view_config: nil, **kwargs)
|
34
|
-
(view_config&.document_presenter_class || document_presenter_class(document)).new(document, self, view_config
|
34
|
+
(view_config&.document_presenter_class || document_presenter_class(document)).new(document, self, view_config:, **kwargs)
|
35
35
|
end
|
36
36
|
|
37
37
|
def document_presenter_class(_document)
|
@@ -8,6 +8,10 @@ module Spotlight
|
|
8
8
|
page_title t(:'spotlight.curation.header'), title
|
9
9
|
end
|
10
10
|
|
11
|
+
def accessibility_page_title(title = nil)
|
12
|
+
page_title t(:'spotlight.accessibility.header'), title
|
13
|
+
end
|
14
|
+
|
11
15
|
def configuration_page_title(title = nil)
|
12
16
|
page_title t(:'spotlight.configuration.header'), title
|
13
17
|
end
|
@@ -8,18 +8,16 @@ Core.Block.Resources = (function(){
|
|
8
8
|
formable: true,
|
9
9
|
autocompleteable: true,
|
10
10
|
show_heading: true,
|
11
|
-
show_alt_text: true,
|
12
|
-
|
13
11
|
title: function() { return i18n.t("blocks:" + this.type + ":title"); },
|
14
12
|
description: function() { return i18n.t("blocks:" + this.type + ":description"); },
|
15
|
-
alt_text_guidelines: function() {
|
16
|
-
if (this.
|
13
|
+
alt_text_guidelines: function() {
|
14
|
+
if (this.showAltText()) {
|
17
15
|
return i18n.t("blocks:alt_text_guidelines:intro");
|
18
16
|
}
|
19
17
|
return "";
|
20
18
|
},
|
21
19
|
alt_text_guidelines_link: function() {
|
22
|
-
if (this.
|
20
|
+
if (this.showAltText()) {
|
23
21
|
var link_url = i18n.t("blocks:alt_text_guidelines:link_url");
|
24
22
|
var link_label = i18n.t("blocks:alt_text_guidelines:link_label");
|
25
23
|
return '<a target="_blank" href="' + link_url + '">' + link_label + '</a>';
|
@@ -45,12 +43,23 @@ Core.Block.Resources = (function(){
|
|
45
43
|
},
|
46
44
|
|
47
45
|
_altTextFieldsHTML: function(index, data) {
|
48
|
-
if (this.
|
46
|
+
if (this.showAltText()) {
|
49
47
|
return this.altTextHTML(index, data);
|
50
48
|
}
|
51
49
|
return "";
|
52
50
|
},
|
53
51
|
|
52
|
+
showAltText: function() {
|
53
|
+
return this.editorOptions.altTextSettings[this._typeAsCamelCase()]
|
54
|
+
},
|
55
|
+
|
56
|
+
_typeAsCamelCase: function() {
|
57
|
+
return this.type
|
58
|
+
.split('_')
|
59
|
+
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
60
|
+
.join('');
|
61
|
+
},
|
62
|
+
|
54
63
|
_itemPanel: function(data) {
|
55
64
|
var index = "item_" + this.globalIndex++;
|
56
65
|
var checked;
|
@@ -188,7 +197,7 @@ Core.Block.Resources = (function(){
|
|
188
197
|
},
|
189
198
|
|
190
199
|
attachAltTextHandlers: function(panel) {
|
191
|
-
if (this.
|
200
|
+
if (this.showAltText()) {
|
192
201
|
const decorativeCheckbox = $('input[name$="[decorative]"]', panel);
|
193
202
|
const altTextInput = $('textarea[name$="[alt_text]"]', panel);
|
194
203
|
const altTextBackupInput = $('input[name$="[alt_text_backup]"]', panel);
|
@@ -7,7 +7,7 @@ const VisibilityToggle = (e) => {
|
|
7
7
|
if (e.target.matches('[data-checkboxsubmit-target="checkbox"]')) {
|
8
8
|
const form = e.target.closest('form')
|
9
9
|
if (form) {
|
10
|
-
new CheckboxSubmit(form).clicked(e)
|
10
|
+
if (!Blacklight.BookmarkToggle) new CheckboxSubmit(form).clicked(e)
|
11
11
|
|
12
12
|
// Add/remove the "private" label to the document row when visibility is toggled
|
13
13
|
const docRow = form.closest('tr')
|
@@ -1,10 +1,10 @@
|
|
1
1
|
export default class {
|
2
2
|
connect() {
|
3
3
|
var $clearBtn = $('.btn-reset');
|
4
|
-
var $input = $clearBtn.
|
4
|
+
var $input = $clearBtn.prev('#browse_q');
|
5
5
|
var btnCheck = function(){
|
6
6
|
if ($input.val() !== '') {
|
7
|
-
$clearBtn.css('display', '
|
7
|
+
$clearBtn.css('display', 'block');
|
8
8
|
} else {
|
9
9
|
$clearBtn.css('display', 'none');
|
10
10
|
}
|
@@ -18,12 +18,24 @@ module SirTrevorRails
|
|
18
18
|
send(:[], :format).present? ? send(:[], :format).to_sym : DEFAULT_FORMAT
|
19
19
|
end
|
20
20
|
|
21
|
+
def alt_text?
|
22
|
+
self.class.alt_text?
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.alt_text?
|
26
|
+
false
|
27
|
+
end
|
28
|
+
|
21
29
|
# Sets a list of custom block types to speed up lookup at runtime.
|
22
30
|
def self.custom_block_types
|
23
31
|
# You can define your custom block types directly here or in your engine config.
|
24
32
|
Spotlight::Engine.config.sir_trevor_widgets
|
25
33
|
end
|
26
34
|
|
35
|
+
def self.custom_block_type_alt_text_settings
|
36
|
+
custom_block_types.index_with { |block_type| SirTrevorRails::Block.block_class(block_type).alt_text? }
|
37
|
+
end
|
38
|
+
|
27
39
|
def initialize(hash, parent)
|
28
40
|
@raw_data = hash
|
29
41
|
@parent = parent
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<% content_for(:sidebar) do %>
|
2
|
+
<%= render 'spotlight/shared/exhibit_sidebar' %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<%= accessibility_page_title t(:".header") %>
|
6
|
+
|
7
|
+
<p>
|
8
|
+
<%= t(:'.total_items', has_alt_text: @has_alt_text, total_alt_items: @total_alt_items).html_safe %>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<p>
|
12
|
+
<%= t(:'.note') %>
|
13
|
+
</p>
|
14
|
+
<table class="table table-striped">
|
15
|
+
<thead>
|
16
|
+
<tr class="d-flex">
|
17
|
+
<th class="col-6">
|
18
|
+
<%= t :'.table.page_title' %>
|
19
|
+
</th>
|
20
|
+
<th class="col-3">
|
21
|
+
<%= t :'.table.has_alt_text' %>
|
22
|
+
</th>
|
23
|
+
<th class="col-3">
|
24
|
+
<%= t :'.table.can_have_alt_text' %>
|
25
|
+
</th>
|
26
|
+
</tr>
|
27
|
+
</thead>
|
28
|
+
<tbody>
|
29
|
+
<% @pages.each do | page_dict | %>
|
30
|
+
<% page = page_dict[:page] %>
|
31
|
+
<tr class="d-flex">
|
32
|
+
<td class="col-6">
|
33
|
+
<h4 class="h5 mb-0">
|
34
|
+
<%= page.title %>
|
35
|
+
<span class="alt-text-status">
|
36
|
+
<% if page_dict[:complete] %>
|
37
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" class="bi bi-check-circle-fill">
|
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
|
+
</svg>
|
40
|
+
<% else %>
|
41
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" class="bi bi-exclamation-triangle-fill">
|
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
|
+
</svg>
|
44
|
+
<% end %>
|
45
|
+
</span>
|
46
|
+
</h4>
|
47
|
+
<%= render Spotlight::EditViewLinksComponent.new(page:, classes:'page-links pt-0') %>
|
48
|
+
</td>
|
49
|
+
<td class="col-3">
|
50
|
+
<%= page_dict[:has_alt_text] %>
|
51
|
+
</td>
|
52
|
+
<td class="col-3">
|
53
|
+
<%= page_dict[:can_have_alt_text] %>
|
54
|
+
</td>
|
55
|
+
</tr>
|
56
|
+
<% end %>
|
57
|
+
</tbody>
|
58
|
+
</table>
|
59
|
+
|
60
|
+
<% unless params[:show_all] || @pages.length < @limit %>
|
61
|
+
<%= link_to '?show_all=true', class: 'ml-3' do %>
|
62
|
+
Show all<%= blacklight_icon('chevron_right') %>
|
63
|
+
<% end %>
|
64
|
+
<% end %>
|
@@ -1,21 +1,19 @@
|
|
1
1
|
<div class="search-box-container">
|
2
2
|
<%= form_tag exhibit_browse_path(current_exhibit, search), method: :get, class: 'browse-search-form search-query-form form-horizontal', role: 'search', 'aria-labelledby' => 'browse-search-form' do %>
|
3
3
|
<%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search.except(:q, :search_field, :exhibit_id, :qt, :page)) %>
|
4
|
-
<div class="form-group mb-
|
4
|
+
<div class="form-group mb-5 row">
|
5
5
|
<label id="browse-search-form" class="col-sm-4 col-form-label h6" for="browse_q"><%= t(:'.label') %></label>
|
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
|
-
|
17
|
-
</button>
|
18
|
-
</span>
|
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"><%= t(:'.submit') %></span>
|
15
|
+
<%= blacklight_icon('search', aria_hidden: true) %>
|
16
|
+
</button>
|
19
17
|
</div>
|
20
18
|
</div>
|
21
19
|
</div>
|
@@ -1,15 +1,7 @@
|
|
1
1
|
<tr class="d-flex">
|
2
2
|
<td class="col-6">
|
3
3
|
<h4 class="h5 mb-0"><%= page.title %></h4>
|
4
|
-
|
5
|
-
<% if page.is_a?(Spotlight::HomePage) %>
|
6
|
-
<%= link_to action_default_value(page, :view), current_exhibit %> ·
|
7
|
-
<%= exhibit_edit_link page, edit_exhibit_home_page_path(page.exhibit), data: { turbolinks: false, turbo: false } %>
|
8
|
-
<% else %>
|
9
|
-
<%= exhibit_view_link page %> ·
|
10
|
-
<%= exhibit_edit_link page, data: { turbolinks: false, turbo: false } %>
|
11
|
-
<% end %>
|
12
|
-
</div>
|
4
|
+
<%= render Spotlight::EditViewLinksComponent.new(page:, classes: 'page-links pt-0') %>
|
13
5
|
</td>
|
14
6
|
<td class="col-4"><%= page.last_edited_by.to_s if page.last_edited_by %></td>
|
15
7
|
<td class="col-2"><%= l page.updated_at, format: :long %></td>
|
@@ -11,8 +11,8 @@
|
|
11
11
|
<button id='another-email' class="btn btn-sm btn-info"><%= t('.add_contact_email_button') %></button>
|
12
12
|
<div class="form-text text-muted mb-3"><%= t(:'.fields.contact_emails.help_block') %></div>
|
13
13
|
<% end %>
|
14
|
-
<%= f.form_group :published, label: {
|
15
|
-
<%= f.
|
14
|
+
<%= f.form_group :published, label: { class: 'pt-0 col-md-2 col-form-label' }, help: nil do %>
|
15
|
+
<%= f.check_box_without_bootstrap :published %>
|
16
16
|
<div class="form-text text-muted mb-3"><%= t(:'.fields.published.help_block') %></div>
|
17
17
|
<% end %>
|
18
18
|
|
@@ -11,10 +11,7 @@
|
|
11
11
|
<%= p.hidden_field :title, value: page.title , class: 'form-control form-control-sm title-field', data: {:"edit-field-target" => 'true'} %>
|
12
12
|
</h3>
|
13
13
|
</div>
|
14
|
-
|
15
|
-
<%= exhibit_view_link page, exhibit_root_path(page.exhibit) %> ·
|
16
|
-
<%= exhibit_edit_link page, edit_exhibit_home_page_path(page.exhibit), data: { turbolinks: false } %>
|
17
|
-
</div>
|
14
|
+
<%= render Spotlight::EditViewLinksComponent.new(page:) %>
|
18
15
|
</div>
|
19
16
|
</div>
|
20
17
|
</div>
|
@@ -40,7 +40,7 @@
|
|
40
40
|
</div>
|
41
41
|
<div class="form-group mb-3">
|
42
42
|
<%= f.label :content, class: 'sr-only visually-hidden' %>
|
43
|
-
<%= f.text_area_without_bootstrap :content, value: { data: f.object.content.as_json }.to_json, class: content_editor_class(f.object), data: { 'block-types': SirTrevorRails::Block.custom_block_types } %>
|
43
|
+
<%= f.text_area_without_bootstrap :content, value: { data: f.object.content.as_json }.to_json, class: content_editor_class(f.object), data: { 'block-types': SirTrevorRails::Block.custom_block_types, 'alt-text-settings': SirTrevorRails::Block.custom_block_type_alt_text_settings } %>
|
44
44
|
</div>
|
45
45
|
</div>
|
46
46
|
|
@@ -1,11 +1,7 @@
|
|
1
1
|
<% page = f.object %>
|
2
2
|
<%= render layout: 'spotlight/shared/dd3_item', locals: { id: page.id.to_s, field: f, label: page.title, label_method: :title, enabled_method: :published } do |_, section| %>
|
3
3
|
<% case section when :additional_options %>
|
4
|
-
|
5
|
-
<%= exhibit_view_link page %> ·
|
6
|
-
<%= exhibit_edit_link page, data: { turbolinks: false, turbo: false } %> ·
|
7
|
-
<%= exhibit_delete_link page %>
|
8
|
-
</div>
|
4
|
+
<%= render Spotlight::EditViewLinksComponent.new(page:, delete_link: true) %>
|
9
5
|
<%- if page.feature_page? -%>
|
10
6
|
<%= f.hidden_field :parent_page_id, data: {property: "parent_page"} %>
|
11
7
|
<% end %>
|
@@ -35,10 +35,10 @@
|
|
35
35
|
<%= f.text_field :title, control_col: "col-sm-5" %>
|
36
36
|
<%= f.text_field :subtitle, control_col: "col-sm-5" %>
|
37
37
|
<%= f.text_area :long_description, rows: 5 %>
|
38
|
-
<%= f.form_group :search_box, label: { text: t(:'.search_box.label'), class: 'pt-0' }, help: t(:'.search_box.help_block') do %>
|
39
|
-
<%= f.
|
38
|
+
<%= f.form_group :search_box, label: { text: t(:'.search_box.label'), class: 'pt-0 col-md-2 col-sm-2 col-form-label' }, help: t(:'.search_box.help_block') do %>
|
39
|
+
<%= f.check_box_without_bootstrap :search_box %>
|
40
40
|
<% end %>
|
41
|
-
<%= f.form_group label: { text: t(:".default_index_view_type")
|
41
|
+
<%= f.form_group label: { text: t(:".default_index_view_type") } do %>
|
42
42
|
<% available_document_index_views.each do |key, view| %>
|
43
43
|
<%= f.radio_button :default_index_view_type, key, label: view.display_label %>
|
44
44
|
<% end %>
|
@@ -4,6 +4,7 @@
|
|
4
4
|
<% if current_exhibit.analytics_provider&.enabled? %>
|
5
5
|
<%= nav_link t(:'spotlight.curation.sidebar.analytics'), spotlight.analytics_exhibit_dashboard_path(current_exhibit) %>
|
6
6
|
<% end %>
|
7
|
+
<%= nav_link t(:'spotlight.accessibility.header'), spotlight.exhibit_alt_text_path(current_exhibit) %>
|
7
8
|
</ul>
|
8
9
|
<%= render 'spotlight/shared/configuration_sidebar' if can? :update, current_exhibit %>
|
9
10
|
<%= render 'spotlight/shared/curation_sidebar' %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="content-block item-text row d-block clearfix">
|
2
|
-
<div class="items-col spotlight-flexbox <%=
|
2
|
+
<div class="items-col spotlight-flexbox <%= uploaded_items_block.text? ? "col-md-6" : "col-md-12" %> <%= uploaded_items_block.content_align == 'right' ? 'float-right float-end' : 'float-left float-start' %> uploaded-items-block">
|
3
3
|
<% if uploaded_items_block.files.present? %>
|
4
4
|
<% uploaded_items_block.files.each do |file| %>
|
5
5
|
<div class="box" data-id="<%= file[:id] %>">
|
@@ -28,7 +28,7 @@
|
|
28
28
|
</div>
|
29
29
|
|
30
30
|
<% if uploaded_items_block.text? %>
|
31
|
-
<div class="text-col col-md-6 mw-100">
|
31
|
+
<div class="text-col col-md-6 mw-100 w-auto">
|
32
32
|
<%= content_tag(:h3, uploaded_items_block.title) if uploaded_items_block.title.present? %>
|
33
33
|
<%= sir_trevor_markdown uploaded_items_block.text %>
|
34
34
|
</div>
|
@@ -191,6 +191,16 @@ en:
|
|
191
191
|
instructions: Enter details for each librarian, curator or other contact person for this exhibit. Select the contacts you want to be show in the sidebar of the about pages. Drag and drop contacts to specify the order in which they are shown in the sidebar.
|
192
192
|
page_options:
|
193
193
|
published: Publish
|
194
|
+
accessibility:
|
195
|
+
alt_text:
|
196
|
+
header: Alternative text
|
197
|
+
note: Items displayed via Item Embed are excluded from these totals, as it not currently possible to add alt text using this widget.
|
198
|
+
table:
|
199
|
+
can_have_alt_text: Total items on page
|
200
|
+
has_alt_text: Items with alt text
|
201
|
+
page_title: Page title
|
202
|
+
total_items: Of the items displayed via widgets, <b>%{has_alt_text} of %{total_alt_items}</b> have entered alt text (or a checked decorative box).
|
203
|
+
header: Accessibility
|
194
204
|
admin_users:
|
195
205
|
create:
|
196
206
|
error: There was a problem adding the user as an exhibits adminstrator
|
@@ -899,9 +909,8 @@ en:
|
|
899
909
|
help_secondary: To create a browse category-specific masthead, you should use an image that is at least 120 pixels tall and 1200 pixels wide. For best results use an image at least 1800 pixels wide. You can crop larger images using the cropping tool below.
|
900
910
|
query_params: Search parameters
|
901
911
|
search_box:
|
902
|
-
checkbox_label: Display
|
903
912
|
help_block: Displays a search box that enables users to search within the browse category results
|
904
|
-
label:
|
913
|
+
label: Display search box
|
905
914
|
search_description: Description
|
906
915
|
search_group: Group
|
907
916
|
search_masthead: Masthead
|
data/config/routes.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: 4.
|
4
|
+
version: 4.4.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-11-
|
14
|
+
date: 2024-11-26 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activejob-status
|
@@ -925,6 +925,8 @@ files:
|
|
925
925
|
- app/components/spotlight/document_admin_table_component.html.erb
|
926
926
|
- app/components/spotlight/document_admin_table_component.rb
|
927
927
|
- app/components/spotlight/document_component.rb
|
928
|
+
- app/components/spotlight/edit_view_links_component.html.erb
|
929
|
+
- app/components/spotlight/edit_view_links_component.rb
|
928
930
|
- app/components/spotlight/exhibit_navbar_component.html.erb
|
929
931
|
- app/components/spotlight/exhibit_navbar_component.rb
|
930
932
|
- app/components/spotlight/header_component.html.erb
|
@@ -940,6 +942,7 @@ files:
|
|
940
942
|
- app/controllers/concerns/spotlight/controller.rb
|
941
943
|
- app/controllers/concerns/spotlight/search_helper.rb
|
942
944
|
- app/controllers/spotlight/about_pages_controller.rb
|
945
|
+
- app/controllers/spotlight/accessibility_controller.rb
|
943
946
|
- app/controllers/spotlight/admin_users_controller.rb
|
944
947
|
- app/controllers/spotlight/appearances_controller.rb
|
945
948
|
- app/controllers/spotlight/application_controller.rb
|
@@ -1209,6 +1212,7 @@ files:
|
|
1209
1212
|
- app/views/spotlight/about_pages/_page_options.html.erb
|
1210
1213
|
- app/views/spotlight/about_pages/_sidebar.html.erb
|
1211
1214
|
- app/views/spotlight/about_pages/index.html.erb
|
1215
|
+
- app/views/spotlight/accessibility/alt_text.html.erb
|
1212
1216
|
- app/views/spotlight/admin_users/index.html.erb
|
1213
1217
|
- app/views/spotlight/appearances/edit.html.erb
|
1214
1218
|
- app/views/spotlight/browse/_search.html.erb
|