blacklight-spotlight 5.0.0.pre.alpha1 → 5.0.0.pre.alpha3
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/app/assets/javascripts/spotlight/spotlight.esm.js +29 -29
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +32 -33
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/components/spotlight/analytics/dashboard_component.html.erb +4 -4
- data/app/components/spotlight/bulk_action_component.html.erb +1 -1
- data/app/components/spotlight/bulk_action_component.rb +1 -1
- data/app/components/spotlight/document_component.rb +1 -1
- data/app/components/spotlight/exhibit_navbar_component.html.erb +1 -1
- data/app/components/spotlight/save_search_component.html.erb +2 -4
- data/app/components/spotlight/save_search_component.rb +1 -1
- data/app/javascript/spotlight/admin/block_mixins/autocompleteable.js +1 -1
- data/app/javascript/spotlight/admin/blocks/browse_block.js +2 -2
- data/app/javascript/spotlight/admin/blocks/browse_group_categories_block.js +2 -2
- data/app/javascript/spotlight/admin/blocks/resources_block.js +3 -3
- data/app/javascript/spotlight/admin/blocks/solr_documents_carousel_block.js +4 -4
- data/app/javascript/spotlight/admin/blocks/solr_documents_features_block.js +3 -4
- data/app/javascript/spotlight/admin/blocks/uploaded_items_block.js +6 -6
- data/app/javascript/spotlight/admin/users.js +2 -2
- data/app/javascript/spotlight/controllers/tag_selector_controller.js +2 -2
- data/app/javascript/spotlight/user/zpr_links.js +5 -3
- data/app/models/sir_trevor_rails/block.rb +1 -3
- data/app/services/spotlight/exhibit_import_export_service.rb +2 -2
- data/app/views/catalog/_add_tags.html.erb +2 -4
- data/app/views/catalog/_change_visibility.html.erb +2 -4
- data/app/views/catalog/_remove_tags.html.erb +3 -5
- data/app/views/shared/_curated_features_navbar.html.erb +1 -1
- data/app/views/shared/_user_util_links.html.erb +2 -2
- data/app/views/spotlight/admin_users/index.html.erb +5 -5
- data/app/views/spotlight/appearances/edit.html.erb +4 -4
- data/app/views/spotlight/browse/_search_box.html.erb +2 -2
- data/app/views/spotlight/browse/index.html.erb +1 -1
- data/app/views/spotlight/browse/show.html.erb +1 -1
- data/app/views/spotlight/bulk_updates/_download.html.erb +2 -2
- data/app/views/spotlight/bulk_updates/_upload.html.erb +1 -1
- data/app/views/spotlight/bulk_updates/edit.html.erb +3 -3
- data/app/views/spotlight/catalog/_admin_header.html.erb +1 -1
- data/app/views/spotlight/catalog/_curation_mode_toggle_default.html.erb +1 -1
- data/app/views/spotlight/catalog/_document_visibility_control.html.erb +1 -1
- data/app/views/spotlight/catalog/admin.html.erb +1 -1
- data/app/views/spotlight/custom_fields/form_group/_text.html.erb +2 -2
- data/app/views/spotlight/custom_fields/form_group/_vocab.html.erb +2 -2
- data/app/views/spotlight/exhibits/_exhibit_card.html.erb +1 -1
- data/app/views/spotlight/exhibits/_languages.html.erb +1 -1
- data/app/views/spotlight/exhibits/edit.html.erb +6 -6
- data/app/views/spotlight/exhibits/index.html.erb +3 -3
- data/app/views/spotlight/featured_images/_form.html.erb +1 -1
- data/app/views/spotlight/home_pages/_edit_page_link.html.erb +1 -1
- data/app/views/spotlight/locks/_lock.html.erb +1 -1
- data/app/views/spotlight/pages/_edit_page_link.html.erb +1 -1
- data/app/views/spotlight/pages/_form.html.erb +5 -5
- data/app/views/spotlight/pages/_order_pages.html.erb +1 -1
- data/app/views/spotlight/pages/_view_type_group.html.erb +1 -1
- data/app/views/spotlight/resources/_external_resources_form.html.erb +0 -1
- data/app/views/spotlight/resources/new.html.erb +0 -1
- data/app/views/spotlight/roles/index.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_default_per_page.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_document_index_view_types.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_facets.html.erb +1 -1
- data/app/views/spotlight/search_configurations/edit.html.erb +3 -3
- data/app/views/spotlight/searches/_form.html.erb +4 -4
- data/app/views/spotlight/searches/index.html.erb +4 -4
- data/app/views/spotlight/shared/_dd3_item.html.erb +2 -2
- data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +1 -1
- data/app/views/spotlight/shared/_locale_picker.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/_oembed_block.html.erb +2 -2
- data/app/views/spotlight/sir_trevor/blocks/_search_results_block.html.erb +2 -2
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +2 -2
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +1 -1
- data/app/views/spotlight/sites/_exhibit.html.erb +4 -4
- data/app/views/spotlight/sites/edit.html.erb +2 -2
- data/app/views/spotlight/sites/edit_exhibits.html.erb +4 -4
- data/app/views/spotlight/tags/index.html.erb +1 -1
- data/app/views/spotlight/translations/_browse_categories.html.erb +3 -3
- data/app/views/spotlight/translations/_import.html.erb +3 -3
- data/app/views/spotlight/translations/_page.html.erb +1 -1
- data/app/views/spotlight/translations/edit.html.erb +6 -6
- data/config/locales/spotlight.en.yml +2 -2
- data/lib/spotlight/version.rb +1 -1
- data/vendor/assets/stylesheets/sir-trevor/block-controls.scss +0 -4
- metadata +5 -5
@@ -29,13 +29,13 @@
|
|
29
29
|
<thead>
|
30
30
|
<tr>
|
31
31
|
<th><%= I18n.t("spotlight.dashboards.analytics.pagetitle") %></th>
|
32
|
-
<th class="text-
|
32
|
+
<th class="text-end"><%= I18n.t("spotlight.dashboards.analytics.pageviews") %></th>
|
33
33
|
</tr>
|
34
34
|
</thead>
|
35
35
|
<% page_analytics.rows.each do |p| %>
|
36
36
|
<tr>
|
37
37
|
<td><%= link_to p.pageTitle, p.pagePath %></td>
|
38
|
-
<td class="text-
|
38
|
+
<td class="text-end"><%= p.screenPageViews %></td>
|
39
39
|
</tr>
|
40
40
|
<% end %>
|
41
41
|
</table>
|
@@ -47,14 +47,14 @@
|
|
47
47
|
<thead>
|
48
48
|
<tr>
|
49
49
|
<th><%= I18n.t("spotlight.dashboards.analytics.searches.term") %></th>
|
50
|
-
<th class="text-
|
50
|
+
<th class="text-end"><%= I18n.t("spotlight.dashboards.analytics.searches.views") %></th>
|
51
51
|
</tr>
|
52
52
|
</thead>
|
53
53
|
<% search_analytics.rows.each do |p| %>
|
54
54
|
<% if p.searchTerm.present? %>
|
55
55
|
<tr>
|
56
56
|
<td><%= p.searchTerm %></td>
|
57
|
-
<td class="text-
|
57
|
+
<td class="text-end"><%= p.eventCount %></td>
|
58
58
|
</tr>
|
59
59
|
<% end %>
|
60
60
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= button %>
|
3
3
|
<div class="dropdown-menu" aria-labelledby="bulk-actions-button">
|
4
4
|
<% bulk_actions.each do |key, _config| %>
|
5
|
-
<%= link_to t("spotlight.bulk_actions.#{key}.heading"), '#', class: 'dropdown-item', data: {
|
5
|
+
<%= link_to t("spotlight.bulk_actions.#{key}.heading"), '#', class: 'dropdown-item', data: { "bs-toggle": "modal", "bs-target": "##{key.to_s.dasherize}-modal" } %>
|
6
6
|
<% end %>
|
7
7
|
</div>
|
8
8
|
</div>
|
@@ -13,7 +13,7 @@ module Spotlight
|
|
13
13
|
|
14
14
|
def button
|
15
15
|
button_tag t(:'spotlight.bulk_actions.label'), id: 'bulk-actions-button', class: button_classes,
|
16
|
-
data: {
|
16
|
+
data: { 'bs-toggle': 'dropdown' },
|
17
17
|
aria: { haspopup: true, expanded: false }
|
18
18
|
end
|
19
19
|
end
|
@@ -15,7 +15,7 @@ module Spotlight
|
|
15
15
|
delegate :current_exhibit, :can?, :add_document_meta_content, to: :helpers
|
16
16
|
|
17
17
|
def exhibit_edit_link
|
18
|
-
helpers.exhibit_edit_link document, [:edit, current_exhibit, document], class: 'float-
|
18
|
+
helpers.exhibit_edit_link document, [:edit, current_exhibit, document], class: 'float-end btn btn-primary' if can?(:curate, current_exhibit)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= link_to(helpers.current_exhibit.title, helpers.spotlight.exhibit_path(helpers.current_exhibit), class: 'navbar-brand') %>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<ul class="navbar-nav <%= helpers.resource_masthead? ? 'justify-content-md-end' : '
|
7
|
+
<ul class="navbar-nav <%= helpers.resource_masthead? ? 'justify-content-md-end' : 'me-auto' %>">
|
8
8
|
<li class="nav-item <%= "active" if helpers.current_page?([helpers.spotlight, helpers.current_exhibit]) %>"><%= link_to t(:'spotlight.curation.nav.home'), [helpers.spotlight, helpers.current_exhibit], class: 'nav-link' %></li>
|
9
9
|
<% helpers.current_exhibit.main_navigations.displayable.each do |navigation| %>
|
10
10
|
<%= render partial: "shared/#{navigation.nav_type}_navbar", locals: { navigation: navigation } %>
|
@@ -5,9 +5,7 @@
|
|
5
5
|
<div class="modal-content">
|
6
6
|
<div class="modal-header">
|
7
7
|
<h4 class="modal-title" id="save-modal-label"><%= t(:'spotlight.saved_search.label') %></h4>
|
8
|
-
<button type="button" class="blacklight-modal-close close btn-close" data-
|
9
|
-
<span aria-hidden="true" class="visually-hidden">×</span>
|
10
|
-
</button>
|
8
|
+
<button type="button" class="blacklight-modal-close close btn-close" data-bs-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>"></button>
|
11
9
|
</div>
|
12
10
|
<div class="modal-body">
|
13
11
|
<%= f.text_field :title, label: t(:'spotlight.saved_search.title') %>
|
@@ -17,7 +15,7 @@
|
|
17
15
|
</div>
|
18
16
|
<div class="modal-footer d-flex flex-row-reverse justify-content-start">
|
19
17
|
<%= f.submit nil, class: 'btn btn-primary' %>
|
20
|
-
<button type="button" class="btn btn-link" data-
|
18
|
+
<button type="button" class="btn btn-link" data-bs-dismiss="modal"><%= t :cancel %></button>
|
21
19
|
</div>
|
22
20
|
</div>
|
23
21
|
<% end %>
|
@@ -15,7 +15,7 @@ module Spotlight
|
|
15
15
|
|
16
16
|
def button
|
17
17
|
button_tag t(:'spotlight.saved_search.label'), id: 'save-this-search', class: button_classes,
|
18
|
-
data: {
|
18
|
+
data: { 'bs-toggle': 'modal', 'bs-target': '#save-modal' }
|
19
19
|
end
|
20
20
|
|
21
21
|
def form_path
|
@@ -35,7 +35,7 @@ import { fetchAutocompleteJSON } from 'spotlight/admin/search_typeahead';
|
|
35
35
|
<auto-complete src="${this.autocomplete_url()}" for="${autocompleteID}-popup" fetch-on-empty>
|
36
36
|
<input type="text" name="${autocompleteID}" placeholder="${i18n.t("blocks:autocompleteable:placeholder")}" data-default-typeahead>
|
37
37
|
<ul id="${autocompleteID}-popup"></ul>
|
38
|
-
<div id="${autocompleteID}-popup-feedback" class="
|
38
|
+
<div id="${autocompleteID}-popup-feedback" class="visually-hidden"></div>
|
39
39
|
</auto-complete>
|
40
40
|
` };
|
41
41
|
}
|
@@ -43,7 +43,7 @@ SirTrevor.Blocks.Browse = (function(){
|
|
43
43
|
<div class="checkbox">
|
44
44
|
<input name="item[${index}][display]" type="hidden" value="false" />
|
45
45
|
<input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + data.id)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
|
46
|
-
<label class="
|
46
|
+
<label class="visually-hidden" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
|
47
47
|
</div>
|
48
48
|
<div class="pic">
|
49
49
|
<img class="img-thumbnail" src="${(data.thumbnail_image_url || ((data.iiif_tilesource || "").replace("/info.json", "/full/!100,100/0/default.jpg")))}" />
|
@@ -52,7 +52,7 @@ SirTrevor.Blocks.Browse = (function(){
|
|
52
52
|
<div class="title card-title">${(data.full_title || data.title)}</div>
|
53
53
|
<div>${(data.slug || data.id)}</div>
|
54
54
|
</div>
|
55
|
-
<div class="remove float-
|
55
|
+
<div class="remove float-end">
|
56
56
|
<a data-item-grid-panel-remove="true" href="#">${i18n.t("blocks:resources:panel:remove")}</a>
|
57
57
|
</div>
|
58
58
|
</div>
|
@@ -14,7 +14,7 @@ SirTrevor.Blocks.BrowseGroupCategories = (function(){
|
|
14
14
|
return `<auto-complete src="${this.autocomplete_url()}" for="${autocompleteID}-popup" fetch-on-empty>
|
15
15
|
<input type="text" name="${autocompleteID}" placeholder="${i18n.t("blocks:browse_group_categories:autocomplete")}" data-default-typeahead>
|
16
16
|
<ul id="${autocompleteID}-popup"></ul>
|
17
|
-
<div id="${autocompleteID}-popup-feedback" class="
|
17
|
+
<div id="${autocompleteID}-popup-feedback" class="visually-hidden"></div>
|
18
18
|
</auto-complete>`
|
19
19
|
},
|
20
20
|
autocomplete_template: function(obj) {
|
@@ -49,7 +49,7 @@ SirTrevor.Blocks.BrowseGroupCategories = (function(){
|
|
49
49
|
<div class="checkbox">
|
50
50
|
<input name="item[${index}][display]" type="hidden" value="false" />
|
51
51
|
<input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + data.id)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
|
52
|
-
<label class="
|
52
|
+
<label class="visually-hidden" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
|
53
53
|
</div>
|
54
54
|
<div class="main">
|
55
55
|
<div class="title card-title">${data.title}</div>
|
@@ -95,7 +95,7 @@ Core.Block.Resources = (function(){
|
|
95
95
|
<div class="checkbox">
|
96
96
|
<input name="item[${index}][display]" type="hidden" value="false" />
|
97
97
|
<input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + data.id)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
|
98
|
-
<label class="
|
98
|
+
<label class="visually-hidden" for="${this.formId(this.display_checkbox + '_' + data.id)}">${i18n.t("blocks:resources:panel:display")}</label>
|
99
99
|
</div>
|
100
100
|
<div class="pic">
|
101
101
|
<img class="img-thumbnail" src="${(data.thumbnail_image_url || ((data.iiif_tilesource || "").replace("/info.json", "/full/!100,100/0/default.jpg")))}" />
|
@@ -110,7 +110,7 @@ Core.Block.Resources = (function(){
|
|
110
110
|
<div>${(data.slug || data.id)}</div>
|
111
111
|
${this._altTextFieldsHTML(index, data)}
|
112
112
|
</div>
|
113
|
-
<div class="remove float-
|
113
|
+
<div class="remove float-end">
|
114
114
|
<a data-item-grid-panel-remove="true" href="#">${i18n.t("blocks:resources:panel:remove")}</a>
|
115
115
|
</div>
|
116
116
|
</div>
|
@@ -198,7 +198,7 @@ Core.Block.Resources = (function(){
|
|
198
198
|
altTextHTML: function(index, data) {
|
199
199
|
const { isDecorative, altText, altTextBackup, placeholderAttr, disabledAttr } = this._altTextData(data);
|
200
200
|
return `<div class="mt-2 pt-2 d-flex">
|
201
|
-
<div class="me-2
|
201
|
+
<div class="me-2">
|
202
202
|
<label class="col-form-label pb-0 pt-1" for="${this.formId(this.alt_text_textarea + '_' + data.id)}">${i18n.t("blocks:resources:alt_text:alternative_text")}</label>
|
203
203
|
<div class="form-check mb-1 justify-content-end">
|
204
204
|
<input class="form-check-input" type="checkbox"
|
@@ -75,10 +75,10 @@ SirTrevor.Blocks.SolrDocumentsCarousel = (function(){
|
|
75
75
|
var clickHandler = function (e) {
|
76
76
|
var href
|
77
77
|
var $this = $(this)
|
78
|
-
var $target = $($this.attr('data-
|
78
|
+
var $target = $($this.attr('data-bs-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
|
79
79
|
if (!$target.hasClass('carousel')) return
|
80
80
|
var options = $.extend({}, $target.data(), $this.data())
|
81
|
-
var slideIndex = $this.attr('data-
|
81
|
+
var slideIndex = $this.attr('data-bs-slide-to')
|
82
82
|
if (slideIndex) options.interval = false
|
83
83
|
|
84
84
|
$.fn.carousel.call($target, options)
|
@@ -91,8 +91,8 @@ SirTrevor.Blocks.SolrDocumentsCarousel = (function(){
|
|
91
91
|
}
|
92
92
|
|
93
93
|
$(this.inner).find('.carousel')
|
94
|
-
.on('click.bs.carousel.data-api', '[data-
|
95
|
-
.on('click.bs.carousel.data-api', '[data-
|
94
|
+
.on('click.bs.carousel.data-api', '[data-bs-slide]', clickHandler)
|
95
|
+
.on('click.bs.carousel.data-api', '[data-bs-slide-to]', clickHandler)
|
96
96
|
}
|
97
97
|
|
98
98
|
});
|
@@ -16,10 +16,10 @@ SirTrevor.Blocks.SolrDocumentsFeatures = (function(){
|
|
16
16
|
var clickHandler = function (e) {
|
17
17
|
var href
|
18
18
|
var $this = $(this)
|
19
|
-
var $target = $($this.attr('data-
|
19
|
+
var $target = $($this.attr('data-bs-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
|
20
20
|
if (!$target.hasClass('carousel')) return
|
21
21
|
var options = $.extend({}, $target.data(), $this.data())
|
22
|
-
var slideIndex
|
22
|
+
var slideIndex =$this.attr('data-bs-slide-to')
|
23
23
|
if (slideIndex) options.interval = false
|
24
24
|
|
25
25
|
$.fn.carousel.call($target, options)
|
@@ -32,8 +32,7 @@ SirTrevor.Blocks.SolrDocumentsFeatures = (function(){
|
|
32
32
|
}
|
33
33
|
|
34
34
|
$(this.inner).find('.carousel')
|
35
|
-
.on('click.bs.carousel.data-api', '[data-
|
36
|
-
.on('click.bs.carousel.data-api', '[data-slide-to], [data-bs-slide-to]', clickHandler)
|
35
|
+
.on('click.bs.carousel.data-api', '[data-bs-slide-to]', clickHandler)
|
37
36
|
}
|
38
37
|
|
39
38
|
});
|
@@ -82,24 +82,24 @@ SirTrevor.Blocks.UploadedItems = (function(){
|
|
82
82
|
<div class="checkbox">
|
83
83
|
<input name="item[${index}][display]" type="hidden" value="false" />
|
84
84
|
<input name="item[${index}][display]" id="${this.formId(this.display_checkbox + '_' + dataId)}" type="checkbox" ${checked} class="item-grid-checkbox" value="true" />
|
85
|
-
<label class="
|
85
|
+
<label class="visually-hidden" for="${this.formId(this.display_checkbox + '_' + dataId)}">${i18n.t("blocks:resources:panel:display")}</label>
|
86
86
|
</div>
|
87
87
|
<div class="pic">
|
88
88
|
<img class="img-thumbnail" src="${dataUrl}" />
|
89
89
|
</div>
|
90
90
|
<div class="main form-horizontal">
|
91
91
|
<div class="title card-title">${dataTitle}</div>
|
92
|
-
<div class="field row
|
92
|
+
<div class="field row me-3">
|
93
93
|
<label for="${this.formId('caption_' + dataId)}" class="col-form-label col-md-3">${i18n.t("blocks:uploaded_items:caption")}</label>
|
94
94
|
<input type="text" class="form-control col" id="${this.formId('caption_' + dataId)}" name="item[${index}][caption]" data-field="caption"/>
|
95
95
|
</div>
|
96
|
-
<div class="field row
|
96
|
+
<div class="field row me-3">
|
97
97
|
<label for="${this.formId('link_' + dataId)}" class="col-form-label col-md-3">${i18n.t("blocks:uploaded_items:link")}</label>
|
98
98
|
<input type="text" class="form-control col" id="${this.formId('link_' + dataId)}" name="item[${index}][link]" data-field="link"/>
|
99
99
|
</div>
|
100
100
|
${this._altTextFieldsHTML(index, data)}
|
101
101
|
</div>
|
102
|
-
<div class="remove float-
|
102
|
+
<div class="remove float-end">
|
103
103
|
<a data-item-grid-panel-remove="true" href="#">${i18n.t("blocks:resources:panel:remove")}</a>
|
104
104
|
</div>
|
105
105
|
</div>
|
@@ -149,8 +149,8 @@ SirTrevor.Blocks.UploadedItems = (function(){
|
|
149
149
|
altTextHTML: function(index, data) {
|
150
150
|
const { isDecorative, altText, altTextBackup, placeholderAttr, disabledAttr } = this._altTextData(data);
|
151
151
|
return `
|
152
|
-
<div class="field row
|
153
|
-
<div class="col-lg-3 ps-md-2
|
152
|
+
<div class="field row me-3">
|
153
|
+
<div class="col-lg-3 ps-md-2">
|
154
154
|
<label class="col-form-label text-nowrap pb-0 pt-1 justify-content-md-start justify-content-lg-end d-flex" for="${this.formId(this.alt_text_textarea + '_' + data.id)}">${i18n.t("blocks:resources:alt_text:alternative_text")}</label>
|
155
155
|
<div class="form-check d-flex justify-content-md-start justify-content-lg-end">
|
156
156
|
<input class="form-check-input" type="checkbox"
|
@@ -4,7 +4,7 @@ export default class {
|
|
4
4
|
function edit_user(event) {
|
5
5
|
event.preventDefault();
|
6
6
|
$(this).closest('tr').hide();
|
7
|
-
const id = $(this).attr('data-target')
|
7
|
+
const id = $(this).attr('data-target');
|
8
8
|
const edit_view = $("[data-edit-for='"+id+"']", container).show();
|
9
9
|
$.each(edit_view.find('input[type="text"], select'), function() {
|
10
10
|
// Cache original values incase editing is canceled
|
@@ -35,7 +35,7 @@ export default class {
|
|
35
35
|
}
|
36
36
|
|
37
37
|
function destroy_user(event) {
|
38
|
-
const id = $(this).attr('data-target')
|
38
|
+
const id = $(this).attr('data-target');
|
39
39
|
$("[data-destroy-for='"+id+"']", container).val('1');
|
40
40
|
}
|
41
41
|
|
@@ -192,9 +192,9 @@ export default class extends Controller {
|
|
192
192
|
type="button"
|
193
193
|
data-action="${this.identifier}#deselect"
|
194
194
|
data-tag="${tag}"
|
195
|
-
class="btn-close close ms-1
|
195
|
+
class="btn-close close ms-1"
|
196
196
|
aria-label="${this.translationsValue.remove} ${tag}"
|
197
|
-
|
197
|
+
></button>
|
198
198
|
</span>
|
199
199
|
</li>
|
200
200
|
`
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import OpenSeadragon from 'openseadragon';
|
2
|
+
|
1
3
|
export default class {
|
2
4
|
connect() {
|
3
5
|
$('.zpr-link').on('click', function() {
|
@@ -7,10 +9,10 @@ export default class {
|
|
7
9
|
modalDialog.addClass('modal-xl')
|
8
10
|
modalContent.html('<div id="osd-modal-container"></div>');
|
9
11
|
var controls = `<div class="controls d-flex justify-content-center justify-content-md-end">
|
10
|
-
<div class="custom-close-controls
|
11
|
-
<button type="button" class="btn btn-dark" data-
|
12
|
+
<div class="custom-close-controls pe-3 pt-3">
|
13
|
+
<button type="button" class="btn btn-dark" data-bs-dismiss="modal" aria-hidden="true">${Spotlight.ZprLinks.close}</button>
|
12
14
|
</div>
|
13
|
-
<div class="zoom-controls mb-3
|
15
|
+
<div class="zoom-controls mb-3 me-md-3">
|
14
16
|
<button id="osd-zoom-in" type="button" class="btn btn-dark">${Spotlight.ZprLinks.zoomIn}</button>
|
15
17
|
<button id="osd-zoom-out" type="button" class="btn btn-dark">${Spotlight.ZprLinks.zoomOut}</button>
|
16
18
|
</div>
|
@@ -18,9 +18,7 @@ module SirTrevorRails
|
|
18
18
|
send(:[], :format).present? ? send(:[], :format).to_sym : DEFAULT_FORMAT
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
self.class.supports_alt_text?
|
23
|
-
end
|
21
|
+
delegate :supports_alt_text?, to: :class
|
24
22
|
|
25
23
|
# By default we don't support alt text, but some subclasses do
|
26
24
|
def self.supports_alt_text?
|
@@ -365,7 +365,7 @@ module Spotlight
|
|
365
365
|
(json[:feature_pages] || []).each do |page|
|
366
366
|
p = exhibit.feature_pages.find_by(slug: page[:slug])
|
367
367
|
page[:content] = p.read_attribute(:content)
|
368
|
-
|
368
|
+
page[:translated_pages].each do |translated_page|
|
369
369
|
translated_page[:content] = p.translated_page_for(translated_page[:locale]).read_attribute(:content)
|
370
370
|
end
|
371
371
|
end
|
@@ -373,7 +373,7 @@ module Spotlight
|
|
373
373
|
(json[:about_pages] || []).each do |page|
|
374
374
|
p = exhibit.about_pages.find_by(slug: page[:slug])
|
375
375
|
page[:content] = p.read_attribute(:content)
|
376
|
-
|
376
|
+
page[:translated_pages].each do |translated_page|
|
377
377
|
translated_page[:content] = p.translated_page_for(translated_page[:locale]).read_attribute(:content)
|
378
378
|
end
|
379
379
|
end
|
@@ -4,9 +4,7 @@
|
|
4
4
|
<div class="modal-content">
|
5
5
|
<div class="modal-header">
|
6
6
|
<h4 class="modal-title" id="add-tag-modal"><%= t(:'spotlight.bulk_actions.add_tags.heading') %></h4>
|
7
|
-
<button type="button" class="blacklight-modal-close close btn-close" data-
|
8
|
-
<span aria-hidden="true" class="visually-hidden">×</span>
|
9
|
-
</button>
|
7
|
+
<button type="button" class="blacklight-modal-close close btn-close" data-bs-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>"></button>
|
10
8
|
</div>
|
11
9
|
<div class="modal-body">
|
12
10
|
<p>
|
@@ -20,7 +18,7 @@
|
|
20
18
|
</div>
|
21
19
|
<div class="modal-footer d-flex flex-row-reverse justify-content-start">
|
22
20
|
<%= f.submit t(:'spotlight.bulk_actions.add'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm'), turbo_confirm: t(:'spotlight.bulk_actions.confirm') } %>
|
23
|
-
<button type="button" class="btn btn-link" data-
|
21
|
+
<button type="button" class="btn btn-link" data-bs-dismiss="modal"><%= t :cancel %></button>
|
24
22
|
</div>
|
25
23
|
</div>
|
26
24
|
<% end %>
|
@@ -4,9 +4,7 @@
|
|
4
4
|
<div class="modal-content">
|
5
5
|
<div class="modal-header">
|
6
6
|
<h4 class="modal-title" id="save-modal-label"><%= t(:'spotlight.bulk_actions.change_visibility.heading') %></h4>
|
7
|
-
<button type="button" class="blacklight-modal-close close btn-close" data-
|
8
|
-
<span aria-hidden="true" class="visually-hidden">×</span>
|
9
|
-
</button>
|
7
|
+
<button type="button" class="blacklight-modal-close close btn-close" data-bs-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>"></button>
|
10
8
|
</div>
|
11
9
|
<div class="modal-body">
|
12
10
|
<p>
|
@@ -27,7 +25,7 @@
|
|
27
25
|
</div>
|
28
26
|
<div class="modal-footer d-flex flex-row-reverse justify-content-start">
|
29
27
|
<%= f.submit t(:'spotlight.bulk_actions.change'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm'), turbo_confirm: t(:'spotlight.bulk_actions.confirm') } %>
|
30
|
-
<button type="button" class="btn btn-link" data-
|
28
|
+
<button type="button" class="btn btn-link" data-bs-dismiss="modal"><%= t :cancel %></button>
|
31
29
|
</div>
|
32
30
|
</div>
|
33
31
|
<% end %>
|
@@ -4,9 +4,7 @@
|
|
4
4
|
<div class="modal-content">
|
5
5
|
<div class="modal-header">
|
6
6
|
<h4 class="modal-title" id="remove-tag-modal"><%= t(:'spotlight.bulk_actions.remove_tags.heading') %></h4>
|
7
|
-
<button type="button" class="blacklight-modal-close close btn-close" data-
|
8
|
-
<span aria-hidden="true" class="visually-hidden">×</span>
|
9
|
-
</button>
|
7
|
+
<button type="button" class="blacklight-modal-close close btn-close" data-bs-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>"></button>
|
10
8
|
</div>
|
11
9
|
<div class="modal-body">
|
12
10
|
<%= t(:'spotlight.bulk_actions.remove_tags.description_html', count: @response.total) %>
|
@@ -16,7 +14,7 @@
|
|
16
14
|
<h5><%= t(:'spotlight.bulk_actions.remove_tags.assigned') %></h5>
|
17
15
|
<% end %>
|
18
16
|
<% facet.items.each do |facet_item| %>
|
19
|
-
<div class="badge
|
17
|
+
<div class="badge bg-info">
|
20
18
|
<%= "#{facet_item.value} (#{facet_item.hits})" %>
|
21
19
|
</div>
|
22
20
|
<% end %>
|
@@ -29,7 +27,7 @@
|
|
29
27
|
</div>
|
30
28
|
<div class="modal-footer d-flex flex-row-reverse justify-content-start">
|
31
29
|
<%= f.submit t(:'spotlight.bulk_actions.remove'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm'), turbo_confirm: t(:'spotlight.bulk_actions.confirm') } %>
|
32
|
-
<button type="button" class="btn btn-link" data-
|
30
|
+
<button type="button" class="btn btn-link" data-bs-dismiss="modal"><%= t :cancel %></button>
|
33
31
|
</div>
|
34
32
|
</div>
|
35
33
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% if published_top_level_feature_pages.present? %>
|
3
3
|
<% if published_top_level_feature_pages.many? %>
|
4
4
|
<li class="nav-item dropdown">
|
5
|
-
<a href="#" class="nav-link dropdown-toggle" data-
|
5
|
+
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown"><%= navigation.label_or_default %></a>
|
6
6
|
<ul class="dropdown-menu">
|
7
7
|
<% published_top_level_feature_pages.each do |page| %>
|
8
8
|
<li><%= link_to page.title, [spotlight, page.exhibit, page], class: 'dropdown-item' %></li>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<% end %>
|
6
6
|
|
7
7
|
<% if nav_actions.present? %>
|
8
|
-
<ul class="navbar-nav
|
8
|
+
<ul class="navbar-nav me-auto'">
|
9
9
|
<%= nav_actions %>
|
10
10
|
</ul>
|
11
11
|
<% end %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%= render '/spotlight/shared/locale_picker' %>
|
15
15
|
<% if current_user %>
|
16
16
|
<li class="nav-item dropdown">
|
17
|
-
<a href="#" class="nav-link dropdown-toggle" data-
|
17
|
+
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown"><%=current_user%></a>
|
18
18
|
<ul class="dropdown-menu">
|
19
19
|
<% if can? :manage, Spotlight::Site.instance %>
|
20
20
|
<li><%= link_to t(:'spotlight.header_links.edit_site'), spotlight.edit_site_path, class: 'dropdown-item' %></li>
|
@@ -13,12 +13,12 @@
|
|
13
13
|
<tr>
|
14
14
|
<td class="<%= 'invite-pending' if user.invite_pending? %>">
|
15
15
|
<%= user.email %>
|
16
|
-
<span class='badge
|
16
|
+
<span class='badge bg-warning pending-label'><%= t('.pending') %></span>
|
17
17
|
</td>
|
18
18
|
<td>
|
19
19
|
<%= link_to(t('.destroy'), admin_user_path(user),
|
20
20
|
data: { method: :delete, turbo_method: :delete },
|
21
|
-
class: 'btn btn-sm btn-danger float-
|
21
|
+
class: 'btn btn-sm btn-danger float-end') unless user == current_user %>
|
22
22
|
</td>
|
23
23
|
</tr>
|
24
24
|
<% end %>
|
@@ -53,7 +53,7 @@
|
|
53
53
|
<div class="mb-4">
|
54
54
|
<h3 class="instructions"><%= t :'.admins_curators' %></h3>
|
55
55
|
<div id="admins_curators" class="card card-body bg-light">
|
56
|
-
<div class='btn-toolbar
|
56
|
+
<div class='btn-toolbar align-self-end'>
|
57
57
|
<button class="btn btn-sm btn-primary copy-email-addresses" data-clipboard-target="#admins_curators">
|
58
58
|
<%= t('.copy') %>
|
59
59
|
</button>
|
@@ -76,12 +76,12 @@
|
|
76
76
|
<tr>
|
77
77
|
<td class="<%= 'invite-pending' if user.invite_pending? %>">
|
78
78
|
<%= user.email %>
|
79
|
-
<span class='badge
|
79
|
+
<span class='badge bg-warning pending-label'><%= t('.pending') %></span>
|
80
80
|
</td>
|
81
81
|
<td class="role">
|
82
82
|
<%= user.roles.map { |r| r.role.titleize }.uniq.join(", ") %>
|
83
83
|
</td>
|
84
|
-
<td class="text-
|
84
|
+
<td class="text-end">
|
85
85
|
<% if user.superadmin? %>
|
86
86
|
<%= link_to(t('.destroy'), admin_user_path(user),
|
87
87
|
data: { method: :delete, turbo_method: :delete },
|
@@ -20,20 +20,20 @@
|
|
20
20
|
<ul class="nav nav-tabs" role="tablist">
|
21
21
|
<% if current_exhibit.themes.many? %>
|
22
22
|
<li role="presentation" class="nav-item">
|
23
|
-
<a href="#site-theme" aria-controls="site-theme" role="tab" data-
|
23
|
+
<a href="#site-theme" aria-controls="site-theme" role="tab" data-bs-toggle="tab" class="nav-link active"><%= t(:'.site_theme.heading') %></a>
|
24
24
|
</li>
|
25
25
|
<% end %>
|
26
26
|
|
27
27
|
<li role="presentation" class="nav-item">
|
28
|
-
<a href="#site-masthead" aria-controls="site-masthead" role="tab" data-
|
28
|
+
<a href="#site-masthead" aria-controls="site-masthead" role="tab" data-bs-toggle="tab" class="nav-link <%= 'active' unless current_exhibit.themes.many? %>"><%= t(:'.site_masthead.heading') %></a>
|
29
29
|
</li>
|
30
30
|
|
31
31
|
<li role="presentation" class="nav-item">
|
32
|
-
<a href="#site-thumbnail" aria-controls="site-thumbnail" role="tab" data-
|
32
|
+
<a href="#site-thumbnail" aria-controls="site-thumbnail" role="tab" data-bs-toggle="tab" class="nav-link"><%= t(:'.site_thumbnail.heading') %></a>
|
33
33
|
</li>
|
34
34
|
|
35
35
|
<li role="presentation" class="nav-item">
|
36
|
-
<a href="#main-menu" aria-controls="main-menu" role="tab" data-
|
36
|
+
<a href="#main-menu" aria-controls="main-menu" role="tab" data-bs-toggle="tab" class="nav-link"><%= t(:'.main_navigation.menu') %></a>
|
37
37
|
</li>
|
38
38
|
</ul>
|
39
39
|
<div class="tab-content">
|
@@ -7,11 +7,11 @@
|
|
7
7
|
<div class="input-group">
|
8
8
|
<%= text_field_tag :q, params[:q], placeholder: t(:'.placeholder'), class: "form-control", id: "browse_q" %>
|
9
9
|
<button class="btn btn-reset btn-sm" type="reset">
|
10
|
-
<span class="
|
10
|
+
<span class="visually-hidden"><%= t(:'.reset') %></span>
|
11
11
|
<%= blacklight_icon('highlight_off') %>
|
12
12
|
</button>
|
13
13
|
<button type="submit" class="btn btn-primary search-btn" id="browse-search">
|
14
|
-
<span class="submit-search-text
|
14
|
+
<span class="submit-search-text visually-hidden"><%= t(:'.submit') %></span>
|
15
15
|
<%= blacklight_icon('search', aria_hidden: true) %>
|
16
16
|
</button>
|
17
17
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% title = current_exhibit.main_navigations.browse.label_or_default %>
|
2
2
|
<% set_html_page_title(title) %>
|
3
|
-
<h1 class="
|
3
|
+
<h1 class="visually-hidden"><%= title %></h1>
|
4
4
|
|
5
5
|
<% if @groups.any? # active %>
|
6
6
|
<ul class="browse-group-navigation nav nav-pills justify-content-center">
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% set_html_page_title @search.title %>
|
2
2
|
<% add_browse_meta_content(@search) %>
|
3
3
|
|
4
|
-
<%= exhibit_edit_link @search, class: 'edit-button float-
|
4
|
+
<%= exhibit_edit_link @search, class: 'edit-button float-end btn btn-primary' if can? :edit, @search %>
|
5
5
|
<% if resource_masthead? %>
|
6
6
|
<% content_for :masthead do %>
|
7
7
|
<%= render 'search_title', search: @search %>
|
@@ -3,13 +3,13 @@
|
|
3
3
|
<%= bootstrap_form_with(url: download_template_exhibit_bulk_updates_path, local: true, data: { turbo: false }) do |f| %>
|
4
4
|
<div class="row">
|
5
5
|
<div class="col col-sm-3">
|
6
|
-
<%= f.form_group(:reference_fields, label: { text: t('.reference_fields.heading'), class: '
|
6
|
+
<%= f.form_group(:reference_fields, label: { text: t('.reference_fields.heading'), class: 'fw-bold mb-3' }) do %>
|
7
7
|
<%= f.check_box('reference_fields[item_id]', label: t('.item_id'), checked: true, disabled: true) %>
|
8
8
|
<%= f.check_box('reference_fields[item_title]', label: t('.item_title')) %>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
11
11
|
<div class="col col-sm-3">
|
12
|
-
<%= f.form_group(:updatable_fields, label: { text: t('.updatable_fields.heading'), class: '
|
12
|
+
<%= f.form_group(:updatable_fields, label: { text: t('.updatable_fields.heading'), class: 'fw-bold mb-3' }) do %>
|
13
13
|
<%= f.check_box('updatable_fields[visibility]', checked: true, label: t('.visibility')) %>
|
14
14
|
<%= f.check_box('updatable_fields[tags]', label: t('.tags')) %>
|
15
15
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<%= bootstrap_form_with(url: exhibit_bulk_updates_path, method: :patch, html: { multipart: true }) do |f| %>
|
4
4
|
<div class="row">
|
5
|
-
<div class="col-12 col-md-3 text-md-
|
5
|
+
<div class="col-12 col-md-3 text-md-end">
|
6
6
|
<%= f.label :file, t('.file_label'), class: 'col-form-label' %>
|
7
7
|
</div>
|
8
8
|
<div class="col-12 col-md-9">
|
@@ -11,13 +11,13 @@
|
|
11
11
|
<div role="tabpanel">
|
12
12
|
<ul class="nav nav-tabs" role="tablist">
|
13
13
|
<li role="presentation" class="nav-item">
|
14
|
-
<a href="#overview" aria-controls="overview" role="tab" data-
|
14
|
+
<a href="#overview" aria-controls="overview" role="tab" data-bs-toggle="tab" class="nav-link active"><%= t(:'.overview.heading') %></a>
|
15
15
|
</li>
|
16
16
|
<li role="presentation" class="nav-item">
|
17
|
-
<a href="#download" aria-controls="download" role="tab" data-
|
17
|
+
<a href="#download" aria-controls="download" role="tab" data-bs-toggle="tab" class="nav-link"><%= t(:'.download.heading') %></a>
|
18
18
|
</li>
|
19
19
|
<li role="presentation" class="nav-item">
|
20
|
-
<a href="#upload" aria-controls="upload" role="tab" data-
|
20
|
+
<a href="#upload" aria-controls="upload" role="tab" data-bs-toggle="tab" class="nav-link"><%= t(:'.upload.heading') %></a>
|
21
21
|
</li>
|
22
22
|
</ul>
|
23
23
|
|