blacklight-spotlight 4.3.6 → 4.5.0

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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spotlight/spotlight.esm.js +20 -11
  3. data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
  4. data/app/assets/javascripts/spotlight/spotlight.js +20 -11
  5. data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
  6. data/app/assets/stylesheets/spotlight/_accessibility.scss +9 -0
  7. data/app/assets/stylesheets/spotlight/_browse.scss +4 -11
  8. data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +4 -2
  9. data/app/assets/stylesheets/spotlight/_mixins.scss +1 -0
  10. data/app/components/spotlight/edit_view_links_component.html.erb +13 -0
  11. data/app/components/spotlight/edit_view_links_component.rb +16 -0
  12. data/app/components/spotlight/solr_document_legacy_embed_component.rb +1 -1
  13. data/app/components/spotlight/tag_list_form_component.html.erb +1 -1
  14. data/app/controllers/spotlight/accessibility_controller.rb +45 -0
  15. data/app/helpers/spotlight/main_app_helpers.rb +1 -1
  16. data/app/helpers/spotlight/title_helper.rb +4 -0
  17. data/app/javascript/spotlight/admin/blocks/resources_block.js +16 -7
  18. data/app/javascript/spotlight/admin/blocks/solr_documents_embed_block.js +0 -1
  19. data/app/javascript/spotlight/admin/pages.js +1 -0
  20. data/app/javascript/spotlight/admin/visibility_toggle.js +1 -1
  21. data/app/javascript/spotlight/user/clear_form_button.js +2 -2
  22. data/app/models/sir_trevor_rails/block.rb +12 -0
  23. data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +4 -0
  24. data/app/models/sir_trevor_rails/blocks/solr_documents_embed_block.rb +3 -0
  25. data/app/models/sir_trevor_rails/blocks/uploaded_items_block.rb +4 -0
  26. data/app/models/spotlight/blacklight_configuration.rb +2 -1
  27. data/app/models/spotlight/custom_field.rb +1 -1
  28. data/app/services/spotlight/exhibit_import_export_service.rb +1 -0
  29. data/app/views/layouts/spotlight/base.html.erb +1 -1
  30. data/app/views/shared/_masthead.html.erb +1 -1
  31. data/app/views/spotlight/accessibility/alt_text.html.erb +64 -0
  32. data/app/views/spotlight/browse/_search_box.html.erb +9 -11
  33. data/app/views/spotlight/bulk_updates/_upload.html.erb +1 -1
  34. data/app/views/spotlight/custom_fields/form_group/_text.html.erb +1 -1
  35. data/app/views/spotlight/custom_fields/form_group/_vocab.html.erb +1 -1
  36. data/app/views/spotlight/dashboards/_page.html.erb +1 -9
  37. data/app/views/spotlight/exhibits/_form.html.erb +2 -2
  38. data/app/views/spotlight/feature_pages/_header.html.erb +3 -6
  39. data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +7 -0
  40. data/app/views/spotlight/metadata_configurations/edit.html.erb +1 -0
  41. data/app/views/spotlight/pages/_form.html.erb +1 -1
  42. data/app/views/spotlight/pages/_page.html.erb +1 -5
  43. data/app/views/spotlight/searches/_form.html.erb +3 -3
  44. data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +1 -0
  45. data/app/views/spotlight/shared/_honeypot_field.html.erb +2 -2
  46. data/app/views/spotlight/sir_trevor/blocks/_browse_block.html.erb +1 -1
  47. data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +1 -1
  48. data/app/views/spotlight/sir_trevor/blocks/_featured_pages_block.html.erb +1 -1
  49. data/app/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb +1 -1
  50. data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +2 -2
  51. data/app/views/spotlight/translations/_import.html.erb +1 -1
  52. data/config/locales/spotlight.en.yml +15 -2
  53. data/config/routes.rb +2 -0
  54. data/lib/spotlight/version.rb +1 -1
  55. metadata +6 -2
@@ -6,3 +6,12 @@
6
6
  outline: $input-focus-border-color auto 5px;
7
7
  }
8
8
  }
9
+
10
+ // CSS for accessibility dashboard
11
+ .alt-text-status .bi-exclamation-triangle-fill {
12
+ fill: $warning;
13
+ }
14
+
15
+ .alt-text-status .bi-check-circle-fill {
16
+ fill: $success;
17
+ }
@@ -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
- height: 100%;
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: 8%;
76
+ padding: 50px 20px 20px 20px;
84
77
  text-align: center;
85
- text-shadow: 0 1px 0 $black;
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;
@@ -142,6 +134,7 @@ $image-overlay-max-height: 300px;
142
134
  .btn-reset {
143
135
  background-color: transparent;
144
136
  display: none;
137
+ margin-left: -42px;
145
138
  left: -40px;
146
139
  z-index: 20;
147
140
  }
@@ -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: 16px; // assumes default font-size of 16px, using browser default of 1 rem == 16px
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 {
@@ -14,5 +14,6 @@
14
14
  @extend .bg-warning !optional;
15
15
  content: 'Private';
16
16
  margin-left: 3px;
17
+ color: black;
17
18
  }
18
19
  }
@@ -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) %> &middot;
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 %> &middot;
8
+ <%= helpers.exhibit_edit_link page, data: { turbolinks: false, turbo: false } %>
9
+ <% end %>
10
+ <% if delete_link %>
11
+ &middot; <%= 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
@@ -12,7 +12,7 @@ module Spotlight
12
12
  end
13
13
 
14
14
  def before_render
15
- set_slot(:embed, nil, block_context: block_context) unless embed
15
+ set_slot(:embed, nil, block_context:) unless embed
16
16
 
17
17
  super
18
18
  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,45 @@
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
+ def alt_text
11
+ @limit = 5
12
+ # Sort by newest except for the homepage, which is always first
13
+ pages_with_alt = @exhibit.pages.order(Arel.sql('id = 1 DESC, created_at DESC')).select { |elem| elem.content.any?(&:alt_text?) }
14
+ pages = params[:show_all] ? pages_with_alt : pages_with_alt.first(@limit)
15
+ @pages = pages.map { |page| get_alt_info(page) }
16
+ @has_alt_text = @pages.sum { |page| page[:has_alt_text] }
17
+ @total_alt_items = @pages.sum { |page| page[:can_have_alt_text] }
18
+
19
+ attach_alt_text_breadcrumbs
20
+ end
21
+
22
+ private
23
+
24
+ def get_alt_info(page)
25
+ can_have_alt_text = 0
26
+ has_alt_text = 0
27
+ page.content.each do |content|
28
+ next unless content.alt_text?
29
+
30
+ content.item&.each_value do |item|
31
+ can_have_alt_text += 1
32
+ has_alt_text += 1 if item['alt_text'].present? || item['decorative'].present?
33
+ end
34
+ end
35
+ complete = can_have_alt_text.zero? || has_alt_text / can_have_alt_text == 1
36
+ { can_have_alt_text:, has_alt_text:, page:, status: has_alt_text, complete: }
37
+ end
38
+
39
+ def attach_alt_text_breadcrumbs
40
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
41
+ add_breadcrumb(t(:'spotlight.accessibility.header'), exhibit_dashboard_path(@exhibit))
42
+ add_breadcrumb(t(:'spotlight.accessibility.alt_text.header'), exhibit_alt_text_path(@exhibit))
43
+ end
44
+ end
45
+ 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: view_config, **kwargs)
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.show_alt_text) {
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.show_alt_text) {
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.show_alt_text) {
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.show_alt_text) {
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);
@@ -4,7 +4,6 @@ SirTrevor.Blocks.SolrDocumentsEmbed = (function(){
4
4
 
5
5
  return SirTrevor.Blocks.SolrDocumentsBase.extend({
6
6
  type: "solr_documents_embed",
7
- show_alt_text: false,
8
7
  icon_name: "item_embed",
9
8
 
10
9
  item_options: function() { return "" },
@@ -25,6 +25,7 @@ export default class {
25
25
  var editor = new SirTrevor.Editor({
26
26
  el: instance[0],
27
27
  blockTypes: instance.data('blockTypes'),
28
+ altTextSettings: instance.data('altTextSettings'),
28
29
  defaultType:["Text"],
29
30
  onEditorRender: function() {
30
31
  $.SerializedForm();
@@ -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.parent().prev('input');
4
+ var $input = $clearBtn.prev('#browse_q');
5
5
  var btnCheck = function(){
6
6
  if ($input.val() !== '') {
7
- $clearBtn.css('display', 'inline-block');
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
@@ -13,6 +13,10 @@ module SirTrevorRails
13
13
  @solr_helper = solr_helper
14
14
  end
15
15
 
16
+ def self.alt_text?
17
+ true
18
+ end
19
+
16
20
  def each_document
17
21
  return to_enum(:each_document) unless block_given?
18
22
 
@@ -5,6 +5,9 @@ module SirTrevorRails
5
5
  ##
6
6
  # Embed documents (using a special blacklight view configuration) and text block
7
7
  class SolrDocumentsEmbedBlock < SirTrevorRails::Blocks::SolrDocumentsBlock
8
+ def self.alt_text?
9
+ false
10
+ end
8
11
  end
9
12
  end
10
13
  end
@@ -12,6 +12,10 @@ module SirTrevorRails
12
12
  (item || {}).map { |_, file| file }.select { |file| file[:display].to_s == 'true' }
13
13
  end
14
14
 
15
+ def self.alt_text?
16
+ true
17
+ end
18
+
15
19
  def zpr_link?
16
20
  zpr_link == 'true'
17
21
  end
@@ -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
@@ -39,7 +39,7 @@ module Spotlight
39
39
  else
40
40
  configuration
41
41
  end
42
- conf['label']
42
+ conf['label'] || conf[:label]
43
43
  end
44
44
 
45
45
  def short_description=(short_description)
@@ -164,6 +164,7 @@ module Spotlight
164
164
 
165
165
  hash[:custom_fields].each do |attr|
166
166
  ar = exhibit.custom_fields.find_or_initialize_by(slug: attr[:slug])
167
+ attr[:configuration] = attr[:configuration].clone.transform_keys(&:to_s)
167
168
  ar.update(attr)
168
169
  end
169
170
 
@@ -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 %>" role="main" aria-label="<%= t('blacklight.main.aria.main_container') %>">
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? %>" role="banner">
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>
@@ -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-3 row">
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
- <span class="input-group-btn input-group-append">
10
- <button class="btn btn-reset btn-sm" type="reset">
11
- <span class="sr-only visually-hidden"><%= t(:'.reset') %></span>
12
- <%= blacklight_icon('highlight_off') %>
13
- </button>
14
- <button type="submit" class="btn btn-primary search-btn" id="browse-search">
15
- <span class="submit-search-text"><%= t(:'.submit') %></span>
16
- <%= blacklight_icon('search', aria_hidden: true) %>
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>
@@ -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>
@@ -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
- <div class="page-links pt-0">
5
- <% if page.is_a?(Spotlight::HomePage) %>
6
- <%= link_to action_default_value(page, :view), current_exhibit %> &middot;
7
- <%= exhibit_edit_link page, edit_exhibit_home_page_path(page.exhibit), data: { turbolinks: false, turbo: false } %>
8
- <% else %>
9
- <%= exhibit_view_link page %> &middot;
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: { text: nil, class: 'pt-0' }, help: nil do %>
15
- <%= f.check_box :published, label: "" %>
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
 
@@ -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 bg-light page main">
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']">
@@ -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
- <div class="page-links">
15
- <%= exhibit_view_link page, exhibit_root_path(page.exhibit) %> &middot;
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>
@@ -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=" ">
@@ -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