blacklight-spotlight 5.3.2 → 6.0.0.rc2
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/README.md +41 -4
- data/Rakefile +1 -2
- data/app/assets/javascripts/spotlight/spotlight.esm.js +2168 -4560
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +2167 -4559
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/assets/stylesheets/spotlight/_blacklight_overrides.scss +4 -0
- data/app/assets/stylesheets/spotlight/_browse.scss +0 -4
- data/app/assets/stylesheets/spotlight/{_collapse_toggle.scss → _collapse_toggle.css} +2 -2
- data/app/assets/stylesheets/spotlight/_exhibit_admin.scss +8 -0
- data/app/assets/stylesheets/spotlight/_exhibits_index.scss +2 -1
- data/app/assets/stylesheets/spotlight/_footer.scss +2 -2
- data/app/assets/stylesheets/spotlight/_header.scss +8 -8
- data/app/assets/stylesheets/spotlight/_pages.scss +1 -1
- data/app/assets/stylesheets/spotlight/_slideshow_block.scss +15 -0
- data/app/assets/stylesheets/spotlight/_spotlight.scss +1 -1
- data/app/assets/stylesheets/spotlight/_translations.scss +3 -3
- data/app/assets/stylesheets/spotlight/_uploaded_items_block.css +7 -0
- data/app/assets/stylesheets/spotlight/_variables.css +15 -0
- data/app/assets/stylesheets/spotlight/browse_group_categories_block.scss +0 -76
- data/app/components/blacklight/icons/pause_component.rb +15 -0
- data/app/components/blacklight/icons/play_arrow_component.rb +15 -0
- data/app/components/spotlight/analytics/dashboard_component.html.erb +1 -1
- data/app/components/spotlight/custom_field_form_group_component.rb +40 -0
- data/app/components/spotlight/document_admin_table_component.html.erb +2 -2
- data/app/components/spotlight/edit_sidecar_component.html.erb +18 -0
- data/app/components/spotlight/edit_sidecar_component.rb +41 -0
- data/app/components/spotlight/masthead_component.html.erb +18 -0
- data/app/components/spotlight/masthead_component.rb +46 -0
- data/app/components/spotlight/save_search_component.html.erb +1 -1
- data/app/components/spotlight/sidecar_form_field_component.html.erb +18 -0
- data/app/components/spotlight/sidecar_form_field_component.rb +71 -0
- data/app/components/spotlight/solr_document_legacy_embed_component.html.erb +0 -4
- data/app/components/spotlight/solr_document_legacy_embed_component.rb +2 -2
- data/app/components/spotlight/tag_selector_component.html.erb +1 -1
- data/app/components/spotlight/tag_selector_component.rb +3 -2
- data/app/components/spotlight/upload_field_form_group_component.rb +33 -0
- data/app/controllers/concerns/spotlight/controller.rb +15 -14
- data/app/controllers/concerns/spotlight/search_helper.rb +2 -5
- data/app/controllers/spotlight/browse_controller.rb +1 -6
- data/app/controllers/spotlight/catalog_controller.rb +2 -3
- data/app/controllers/spotlight/concerns/application_controller.rb +4 -6
- data/app/controllers/spotlight/exhibits_controller.rb +22 -10
- data/app/controllers/spotlight/lock_controller.rb +1 -1
- data/app/controllers/spotlight/pages_controller.rb +11 -11
- data/app/controllers/spotlight/resources/upload_controller.rb +1 -1
- data/app/controllers/spotlight/resources_controller.rb +1 -1
- data/app/controllers/spotlight/solr_controller.rb +5 -1
- data/app/helpers/spotlight/application_helper.rb +14 -26
- data/app/helpers/spotlight/crud_link_helpers.rb +0 -12
- data/app/helpers/spotlight/main_app_helpers.rb +2 -2
- data/app/javascript/spotlight/admin/add_another.js +37 -25
- data/app/javascript/spotlight/admin/add_image_selector.js +43 -26
- data/app/javascript/spotlight/admin/add_new_button.js +51 -36
- data/app/javascript/spotlight/admin/blacklight_configuration.js +76 -54
- data/app/javascript/spotlight/admin/block_mixins/autocompleteable.js +102 -101
- data/app/javascript/spotlight/admin/block_mixins/formable.js +91 -75
- data/app/javascript/spotlight/admin/block_mixins/plustextable.js +46 -48
- data/app/javascript/spotlight/admin/blocks/block.js +27 -28
- data/app/javascript/spotlight/admin/blocks/browse_block.js +14 -10
- data/app/javascript/spotlight/admin/blocks/browse_group_categories_block.js +14 -10
- data/app/javascript/spotlight/admin/blocks/pages_block.js +5 -4
- data/app/javascript/spotlight/admin/blocks/resources_block.js +61 -41
- data/app/javascript/spotlight/admin/blocks/search_result_block.js +24 -7
- data/app/javascript/spotlight/admin/blocks/solr_documents_base_block.js +103 -50
- data/app/javascript/spotlight/admin/blocks/solr_documents_carousel_block.js +50 -26
- data/app/javascript/spotlight/admin/blocks/solr_documents_features_block.js +47 -23
- data/app/javascript/spotlight/admin/blocks/uploaded_items_block.js +35 -19
- data/app/javascript/spotlight/admin/crop.js +146 -66
- data/app/javascript/spotlight/admin/croppable.js +5 -4
- data/app/javascript/spotlight/admin/croppable_modal.js +67 -32
- data/app/javascript/spotlight/admin/edit_in_place.js +69 -54
- data/app/javascript/spotlight/admin/exhibits.js +92 -45
- data/app/javascript/spotlight/admin/form_observer.js +92 -78
- data/app/javascript/spotlight/admin/multi_image_selector.js +201 -153
- data/app/javascript/spotlight/admin/pages.js +13 -7
- data/app/javascript/spotlight/admin/progress_monitor.js +65 -50
- data/app/javascript/spotlight/admin/readonly_checkbox.js +7 -3
- data/app/javascript/spotlight/admin/search_typeahead.js +20 -11
- data/app/javascript/spotlight/admin/select_related_input.js +23 -23
- data/app/javascript/spotlight/admin/serialize_json.js +120 -0
- data/app/javascript/spotlight/admin/sir-trevor/block_controls.js +24 -11
- data/app/javascript/spotlight/admin/sir-trevor/block_limits.js +9 -6
- data/app/javascript/spotlight/admin/sir-trevor/locales.js +2 -2
- data/app/javascript/spotlight/admin/spotlight_nestable.js +2 -5
- data/app/javascript/spotlight/admin/translation_progress.js +18 -13
- data/app/javascript/spotlight/admin/users.js +151 -64
- data/app/javascript/spotlight/user/carousel.js +104 -32
- data/app/javascript/spotlight/user/clear_form_button.js +24 -14
- data/app/javascript/spotlight/user/index.js +0 -2
- data/app/javascript/spotlight/user/zpr_links.js +99 -40
- data/app/jobs/concerns/spotlight/gather_documents.rb +1 -1
- data/app/jobs/spotlight/add_uploads_from_csv.rb +31 -8
- data/app/jobs/spotlight/cleanup_job_trackers_job.rb +5 -3
- data/app/models/concerns/spotlight/access_controls_enforcement_search_builder.rb +13 -2
- data/app/models/concerns/spotlight/browse_category_search_builder.rb +3 -3
- data/app/models/concerns/spotlight/exhibit_documents.rb +2 -2
- data/app/models/concerns/spotlight/sitemap.rb +2 -2
- data/app/models/concerns/spotlight/solr_document/finder.rb +2 -2
- data/app/models/concerns/spotlight/solr_document.rb +1 -47
- data/app/models/sir_trevor_rails/blocks/browse_block.rb +0 -4
- data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +2 -1
- data/app/models/spotlight/blacklight_configuration.rb +5 -3
- data/app/models/spotlight/contact_email.rb +2 -2
- data/app/models/spotlight/custom_field.rb +17 -0
- data/app/models/spotlight/exhibit.rb +28 -0
- data/app/models/spotlight/featured_image.rb +1 -1
- data/app/models/spotlight/field_metadata.rb +10 -5
- data/app/models/spotlight/job_tracker.rb +0 -18
- data/app/models/spotlight/main_navigation.rb +2 -2
- data/app/models/spotlight/page.rb +3 -3
- data/app/models/spotlight/resources/iiif_harvester.rb +7 -4
- data/app/models/spotlight/resources/iiif_manifest.rb +0 -4
- data/app/models/spotlight/resources/iiif_manifest_metadata.rb +1 -3
- data/app/models/spotlight/resources/iiif_service.rb +21 -6
- data/app/models/spotlight/resources/upload.rb +6 -0
- data/app/models/spotlight/search.rb +5 -9
- data/app/models/spotlight/solr_document_sidecar.rb +18 -0
- data/app/services/spotlight/bulk_updates_csv_template_service.rb +1 -1
- data/app/services/spotlight/etl/pipeline.rb +2 -2
- data/app/services/spotlight/etl/step.rb +2 -2
- data/app/views/catalog/_remove_tags.html.erb +2 -2
- data/app/views/layouts/spotlight/base.html.erb +3 -6
- data/app/views/layouts/spotlight/spotlight.html.erb +2 -2
- data/app/views/shared/_analytics.html.erb +4 -3
- data/app/views/shared/_masthead.html.erb +2 -18
- data/app/views/spotlight/about_pages/_empty.html.erb +1 -1
- data/app/views/spotlight/about_pages/_sidebar.html.erb +10 -8
- data/app/views/spotlight/browse/_search.html.erb +2 -2
- data/app/views/spotlight/browse/_search_box.html.erb +6 -14
- data/app/views/spotlight/browse/index.html.erb +1 -1
- data/app/views/spotlight/browse/show.html.erb +1 -1
- data/app/views/spotlight/catalog/_document_admin_table.html.erb +1 -1
- data/app/views/spotlight/catalog/_edit_default.html.erb +1 -1
- data/app/views/spotlight/catalog/edit.html.erb +1 -1
- data/app/views/spotlight/dashboards/_page.html.erb +1 -1
- data/app/views/spotlight/exhibits/_exhibit_card.html.erb +3 -1
- data/app/views/spotlight/exhibits/_export.html.erb +17 -1
- data/app/views/spotlight/exhibits/_form.html.erb +20 -4
- data/app/views/spotlight/exhibits/_missing_exhibits.html.erb +3 -3
- data/app/views/spotlight/exhibits/index.html.erb +21 -8
- data/app/views/spotlight/feature_pages/_empty.html.erb +1 -1
- data/app/views/spotlight/feature_pages/_sidebar.html.erb +17 -15
- data/app/views/spotlight/home_pages/_empty.html.erb +7 -7
- data/app/views/spotlight/pages/show.html.erb +1 -0
- data/app/views/spotlight/resources/upload/_form.html.erb +2 -2
- data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +5 -16
- data/app/views/spotlight/sir_trevor/blocks/_embedded_document.html.erb +3 -5
- data/app/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +11 -2
- data/app/views/spotlight/sites/_exhibit.html.erb +1 -1
- data/config/i18n-tasks.yml +1 -1
- data/config/locales/spotlight.ar.yml +1 -2
- data/config/locales/spotlight.de.yml +1 -2
- data/config/locales/spotlight.en.yml +39 -10
- data/config/locales/spotlight.es.yml +1 -2
- data/config/locales/spotlight.fr.yml +1 -2
- data/config/locales/spotlight.it.yml +1 -2
- data/config/locales/spotlight.ja.yml +39 -0
- data/config/locales/spotlight.zh.yml +1 -2
- data/db/migrate/20261007133748_add_discovery_enabled_to_spotlight_exhibits.rb +5 -0
- data/lib/generators/spotlight/assets/importmap_generator.rb +2 -10
- data/lib/generators/spotlight/assets/propshaft_generator.rb +5 -4
- data/lib/generators/spotlight/install_generator.rb +2 -4
- data/lib/generators/spotlight/templates/catalog_controller.rb +0 -1
- data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +26 -4
- data/lib/generators/spotlight/templates/solr/conf/schema.xml +4 -3
- data/lib/generators/spotlight/templates/solr/conf/solrconfig.xml +3 -8
- data/lib/migration/page_language.rb +0 -2
- data/lib/spotlight/engine.rb +28 -9
- data/lib/spotlight/search_state.rb +7 -11
- data/lib/spotlight/upload_field_config.rb +19 -1
- data/lib/spotlight/version.rb +1 -1
- data/lib/spotlight.rb +1 -1
- data/spec/support/features/capybara_wait_metadata_helper.rb +3 -1
- data/spec/support/features/test_features_helpers.rb +24 -1
- data/spec/support/iiif_manifest_fixtures.rb +33 -0
- data/spec/support/stub_dns_resolution.rb +12 -0
- metadata +50 -80
- data/app/assets/stylesheets/spotlight/_uploaded_items_block.scss +0 -7
- data/app/assets/stylesheets/spotlight/_variables.scss +0 -13
- data/app/components/blacklight/icons/arrow_alt_circle_left_component.rb +0 -15
- data/app/components/blacklight/icons/arrow_alt_circle_right_component.rb +0 -15
- data/app/components/blacklight/icons/info_component.rb +0 -15
- data/app/components/blacklight/icons/zoom_in_component.rb +0 -15
- data/app/components/blacklight/icons/zoom_out_component.rb +0 -15
- data/app/components/spotlight/icon_component.rb +0 -13
- data/app/javascript/spotlight/user/browse_group_categories.js +0 -54
- data/app/mailers/spotlight/invitation_mailer.rb +0 -21
- data/app/models/concerns/spotlight/resources/web.rb +0 -38
- data/app/services/spotlight/iiif_resource_resolver.rb +0 -78
- data/app/views/catalog/_image_default.html.erb +0 -6
- data/app/views/shared/_exhibit_navbar.html.erb +0 -2
- data/app/views/shared/_header_navbar.html.erb +0 -6
- data/app/views/spotlight/catalog/_admin_index_header_default.html.erb +0 -23
- data/app/views/spotlight/catalog/_admin_thumbnail_default.html.erb +0 -7
- data/app/views/spotlight/catalog/_curation_mode_toggle_default.html.erb +0 -1
- data/app/views/spotlight/catalog/_document_row.html.erb +0 -2
- data/app/views/spotlight/catalog/_edit_sidecar.html.erb +0 -24
- data/app/views/spotlight/catalog/_index_compact_default.html.erb +0 -21
- data/app/views/spotlight/custom_fields/form_group/_text.html.erb +0 -23
- data/app/views/spotlight/custom_fields/form_group/_vocab.html.erb +0 -23
- data/app/views/spotlight/invitation_mailer/exhibit_invitation_notification.html.erb +0 -12
- data/lib/generators/spotlight/templates/javascript/jquery-shim.js +0 -1
- data/vendor/assets/javascripts/tiny-slider.js +0 -3221
- data/vendor/assets/stylesheets/tiny-slider.css +0 -1
- /data/app/assets/stylesheets/spotlight/{_breadcrumbs.scss → _breadcrumbs.css} +0 -0
- /data/app/assets/stylesheets/spotlight/{_croppable.scss → _croppable.css} +0 -0
- /data/app/assets/stylesheets/spotlight/{_modals.scss → _modals.css} +0 -0
- /data/app/assets/stylesheets/spotlight/{_utilities.scss → _utilities.css} +0 -0
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Spotlight
|
|
4
|
-
###
|
|
5
|
-
# Update an ActiveRecord resource that containes identifiers for all the
|
|
6
|
-
# levels of an image resource described in a IIIF manifest
|
|
7
|
-
#
|
|
8
|
-
class IiifResourceResolver
|
|
9
|
-
delegate :iiif_manifest_url, :iiif_canvas_id, :iiif_image_id, to: :resource
|
|
10
|
-
def initialize(resource)
|
|
11
|
-
@resource = resource
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def resolve!
|
|
15
|
-
resource.iiif_tilesource = updated_tilesource
|
|
16
|
-
return resource.save if resource.changed?
|
|
17
|
-
|
|
18
|
-
Rails.logger.info("#{self.class.name} resolved #{iiif_manifest_url}, but nothing changed.")
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
private
|
|
22
|
-
|
|
23
|
-
attr_reader :resource
|
|
24
|
-
|
|
25
|
-
def updated_tilesource
|
|
26
|
-
"#{updated_image['resource']['service']['@id']}/info.json"
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def updated_image
|
|
30
|
-
new_image = updated_canvas['images'].find do |image|
|
|
31
|
-
image['@id'] == iiif_image_id
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
raise(ManifestError, "No image with @id #{iiif_image_id} found in #{iiif_manifest_url}") unless new_image
|
|
35
|
-
|
|
36
|
-
new_image
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def updated_canvas
|
|
40
|
-
new_canvas = canvases.find do |canvas|
|
|
41
|
-
canvas['@id'] == iiif_canvas_id
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
raise(ManifestError, "No canvas with @id #{iiif_canvas_id} found in #{iiif_manifest_url}") unless new_canvas
|
|
45
|
-
|
|
46
|
-
new_canvas
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def canvases
|
|
50
|
-
sequence['canvases'] || []
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# Currently only supporting a single sequence
|
|
54
|
-
def sequence
|
|
55
|
-
Array.wrap(manifest['sequences']).first || {}
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def response
|
|
59
|
-
@response ||= begin
|
|
60
|
-
Spotlight::Resources::IiifService.http_client.get(iiif_manifest_url).body
|
|
61
|
-
rescue Faraday::Error => e
|
|
62
|
-
Rails.logger.warn("#{self.class.name} failed to fetch #{iiif_manifest_url} with: #{e}")
|
|
63
|
-
'{}'
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
def manifest
|
|
68
|
-
@manifest ||= begin
|
|
69
|
-
JSON.parse(response)
|
|
70
|
-
rescue JSON::ParserError => e
|
|
71
|
-
Rails.logger.warn("#{self.class.name} failed to parse #{iiif_manifest_url} with: #{e}")
|
|
72
|
-
{}
|
|
73
|
-
end
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
class ManifestError < RuntimeError; end
|
|
77
|
-
end
|
|
78
|
-
end
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<%# looks suspiciously similar to blacklight's _thumbnail, but skips all the search context + linking -%>
|
|
2
|
-
<%- if has_thumbnail?(document) && tn = render_thumbnail_tag(document, { alt: '' }, :suppress_link => true) %>
|
|
3
|
-
<div class="img-thumbnail">
|
|
4
|
-
<%= tn %>
|
|
5
|
-
</div>
|
|
6
|
-
<%- end %>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
<%- Spotlight.deprecator.warn("_exhibit_navbar.html.erb will be removed. Customize the exhibit navbar using components instead.") if !blacklight_config.key?(:exhibit_navbar_component) %>
|
|
2
|
-
<%= render (blacklight_config&.exhibit_navbar_component || Spotlight::ExhibitNavbarComponent).new %>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<% if blacklight_config.header_component.present? && blacklight_config.header_component != Blacklight::HeaderComponent %>
|
|
2
|
-
<%= render blacklight_config.header_component.new(blacklight_config: blacklight_config) %>
|
|
3
|
-
<% else %>
|
|
4
|
-
<%= render Spotlight::HeaderComponent.new(blacklight_config: blacklight_config) %>
|
|
5
|
-
<% Spotlight.deprecator.warn("_header_navbar.html.erb will be deprecated in future versions. Please use Blacklight configuration to specify your HeaderComponent.") %>
|
|
6
|
-
<% end %>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<%# header bar for doc items in index view -%>
|
|
2
|
-
<%- Spotlight.deprecator.warn 'The partial _spotlight/catalog/admin_index_header_default.html.erb will be removed; customize the admin display using components instead' %>
|
|
3
|
-
<div class="documentHeader row" data-label-toggle="<%= document.id %>">
|
|
4
|
-
<%# main title container for doc partial view
|
|
5
|
-
How many bootstrap columns need to be reserved
|
|
6
|
-
for bookmarks control depends on size.
|
|
7
|
-
-%>
|
|
8
|
-
<% document_actions = capture do %>
|
|
9
|
-
<%# bookmark functions for items/docs -%>
|
|
10
|
-
<%= render_index_doc_actions document, wrapping_class: "index-document-functions col-sm-3 col-lg-2" %>
|
|
11
|
-
<% end %>
|
|
12
|
-
|
|
13
|
-
<h5 class="index_title <%= document_actions.present? ? "col-sm-9 col-lg-10" : "col-md-12" %>">
|
|
14
|
-
<% if counter = document_counter_with_offset(document_counter) %>
|
|
15
|
-
<span class="document-counter">
|
|
16
|
-
<%= t('blacklight.search.documents.counter', counter: counter) %>
|
|
17
|
-
</span>
|
|
18
|
-
<% end %>
|
|
19
|
-
<%= link_to_document document, counter: counter %>
|
|
20
|
-
</h5>
|
|
21
|
-
|
|
22
|
-
<%= document_actions %>
|
|
23
|
-
</div>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<%- Spotlight.deprecator.warn 'The partial _spotlight/catalog/_admin_thumbnail.html.erb will be removed; customize the admin display using components instead' %>
|
|
2
|
-
<% doc_presenter = document_presenter(document) %>
|
|
3
|
-
<%- if doc_presenter.thumbnail.exists? %>
|
|
4
|
-
<div class="document-thumbnail spotlight-admin-thumbnail">
|
|
5
|
-
<%= doc_presenter.thumbnail.thumbnail_tag({ alt: '' }, 'aria-hidden': true, tabindex: -1, counter: document_counter_with_offset(document_counter)) %>
|
|
6
|
-
</div>
|
|
7
|
-
<%- end %>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= exhibit_edit_link document, [:edit, current_exhibit, document], class: 'float-end btn btn-primary' if can?(:curate, current_exhibit) and !current_page? [:edit, current_exhibit, document] %>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<%= f.fields_for :sidecar, document.sidecar(current_exhibit) do |c| %>
|
|
2
|
-
<%= c.fields_for :data do |d| %>
|
|
3
|
-
<% if document.uploaded_resource? %>
|
|
4
|
-
<%= d.fields_for :configured_fields do |e| %>
|
|
5
|
-
<% Spotlight::Resources::Upload.fields(current_exhibit).each do |config| %>
|
|
6
|
-
<%= e.send(config.form_field_type, config.field_name, value: (document.sidecar(current_exhibit).data["configured_fields"] || {})[config.field_name.to_s], label: uploaded_field_label(config)) %>
|
|
7
|
-
<% end %>
|
|
8
|
-
<% end %>
|
|
9
|
-
<% end %>
|
|
10
|
-
|
|
11
|
-
<%# Using `includes(:exhibit)` to ensure all fields are using the same exhibit object to take advantage of memoization %>
|
|
12
|
-
<% current_exhibit.custom_fields.includes(:exhibit).each do |field| %>
|
|
13
|
-
<% data = document.sidecar(current_exhibit).data %>
|
|
14
|
-
<%= render partial: "spotlight/custom_fields/form_group/#{field.field_type}", locals: { f: d, field: field, value: data[field.slug.to_s] || data[field.field.to_s] } %>
|
|
15
|
-
|
|
16
|
-
<% unless field.configured_to_display? %>
|
|
17
|
-
<p class="bg-warning form-text">
|
|
18
|
-
<%= t(:'.blank_field_warning_html',
|
|
19
|
-
link: link_to(t(:'spotlight.configuration.sidebar.metadata'), spotlight.edit_exhibit_metadata_configuration_path(current_exhibit))) %>
|
|
20
|
-
</p>
|
|
21
|
-
<% end %>
|
|
22
|
-
<% end %>
|
|
23
|
-
<% end %>
|
|
24
|
-
<% end %>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<%- Spotlight.deprecator.warn 'The partial _spotlight/catalog/_index_compact_default.html.erb will be removed; customize the admin display using components instead' %>
|
|
2
|
-
<%# header bar for doc items in index view -%>
|
|
3
|
-
<td>
|
|
4
|
-
<%= render_document_partial document, 'admin_thumbnail', document_counter: document_counter %>
|
|
5
|
-
</td>
|
|
6
|
-
<td>
|
|
7
|
-
<%= render_document_partial document, 'admin_index_header', document_counter: document_counter %>
|
|
8
|
-
|
|
9
|
-
<div class="page-links">
|
|
10
|
-
<%= view_link document, search_state.url_for_document(document) %> ·
|
|
11
|
-
<%= exhibit_edit_link document, [:edit, current_exhibit, document] %>
|
|
12
|
-
</div>
|
|
13
|
-
</td>
|
|
14
|
-
|
|
15
|
-
<td class="text-nowrap">
|
|
16
|
-
<%= l Date.parse(document[blacklight_config.index.timestamp_field]) if document[blacklight_config.index.timestamp_field] %>
|
|
17
|
-
</td>
|
|
18
|
-
|
|
19
|
-
<td class="checkbox-toggle">
|
|
20
|
-
<%= render partial: 'document_visibility_control', locals: { document: document} %>
|
|
21
|
-
</td>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<% inline = local_assigns[:inline].presence %>
|
|
2
|
-
<% label_col = f&.label_col %>
|
|
3
|
-
<% control_col = f&.control_col %>
|
|
4
|
-
<% offset_col = label_col.sub('col', 'offset') %>
|
|
5
|
-
|
|
6
|
-
<div class="form-group mb-3 <%= "row" if inline %>">
|
|
7
|
-
<% Array(value || '').each_with_index do |v, index| %>
|
|
8
|
-
<%= f.label field.slug, field.label, namespace: "f#{index}", class: "col-form-label #{label_col if inline} #{'visually-hidden' if index > 0}" %>
|
|
9
|
-
<div class="mb-3 <%= control_col if inline %>">
|
|
10
|
-
<%= f.text_area_without_bootstrap field.slug, namespace: "f#{index}",multiple: field.is_multiple?, value: v, class: "form-control field-#{field.slug}", readonly: field.readonly_field? %>
|
|
11
|
-
</div>
|
|
12
|
-
<% end %>
|
|
13
|
-
|
|
14
|
-
<% if field.is_multiple? && !field.readonly_field? %>
|
|
15
|
-
<%= content_tag :template, id: "spotlight-field-template-#{field.slug}" do %>
|
|
16
|
-
<%= f.label field.slug, field.label, class: "col-form-label #{label_col if inline} visually-hidden" %>
|
|
17
|
-
<div class="mb-3 <%= "#{offset_col} #{control_col}" if inline %>">
|
|
18
|
-
<%= f.text_area_without_bootstrap field.slug, multiple: field.is_multiple?, value: nil, class: "form-control field-#{field.slug}" %>
|
|
19
|
-
</div>
|
|
20
|
-
<% end %>
|
|
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
|
-
<% end %>
|
|
23
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<% inline = local_assigns[:inline].presence %>
|
|
2
|
-
<% label_col = f&.label_col %>
|
|
3
|
-
<% control_col = f&.control_col %>
|
|
4
|
-
<% offset_col = label_col.sub('col', 'offset') %>
|
|
5
|
-
|
|
6
|
-
<div class="form-group mb-3 <%= "row" if inline %>">
|
|
7
|
-
<% Array(value || '').each_with_index do |v, index| %>
|
|
8
|
-
<%= f.label field.slug, field.label, namespace: "f#{index}", class: "col-form-label #{label_col if inline} #{'visually-hidden' if index > 0}" %>
|
|
9
|
-
<div class="mb-3 <%= control_col if inline %>">
|
|
10
|
-
<%= f.text_field_without_bootstrap field.slug, namespace: "f#{index}", multiple: field.is_multiple?, value: v, class: "form-control field-#{field.slug}", readonly: field.readonly_field? %>
|
|
11
|
-
</div>
|
|
12
|
-
<% end %>
|
|
13
|
-
|
|
14
|
-
<% if field.is_multiple? && !field.readonly_field? %>
|
|
15
|
-
<%= content_tag :template, id: "spotlight-field-template-#{field.slug}" do %>
|
|
16
|
-
<%= f.label field.slug, field.label, class: "col-form-label #{label_col if inline} visually-hidden" %>
|
|
17
|
-
<div class="mb-3 <%= "#{offset_col} #{control_col}" if inline %>">
|
|
18
|
-
<%= f.text_field_without_bootstrap field.slug, multiple: field.is_multiple?, value: nil, class: "form-control field-#{field.slug}" %>
|
|
19
|
-
</div>
|
|
20
|
-
<% end %>
|
|
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
|
-
<% end %>
|
|
23
|
-
</div>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<p><%= t("spotlight.#{@key}.invitation_instructions.hello", email: @role.user.email) %></p>
|
|
2
|
-
|
|
3
|
-
<p><%= t("spotlight.#{@key}.invitation_instructions.someone_invited_you", role: @role, exhibit_name: @role.resource.title) %></p>
|
|
4
|
-
|
|
5
|
-
<% if @role.user.invite_pending? %>
|
|
6
|
-
<p><%= t("spotlight.#{@key}.invitation_instructions.accept_invitation") %></p>
|
|
7
|
-
<p><%= link_to t("spotlight.#{@key}.invitation_instructions.accept"), accept_invitation_url(@role.user, invitation_token: @role.user.invitation_token) %></p>
|
|
8
|
-
<% elsif @role.resource.is_a? Spotlight::Exhibit %>
|
|
9
|
-
<p><%= link_to t("spotlight.#{@key}.invitation_instructions.visit"), url: spotlight.exhibit_home_page_url(@role.resource) %></p>
|
|
10
|
-
<% end %>
|
|
11
|
-
|
|
12
|
-
<p><%= t("spotlight.#{@key}.invitation_instructions.ignore") %></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default window.jQuery;
|