blacklight-spotlight 3.0.0.alpha.9 → 3.0.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/app/assets/images/blacklight/arrow-alt-circle-left.svg +1 -0
- data/app/assets/images/blacklight/arrow-alt-circle-right.svg +1 -0
- data/app/assets/javascripts/spotlight/admin/{add_new_page_button.js → add_new_button.js} +7 -0
- data/app/assets/javascripts/spotlight/admin/block_mixins/autocompleteable.js +4 -4
- data/app/assets/javascripts/spotlight/admin/blocks/browse_block.js +55 -1
- data/app/assets/javascripts/spotlight/admin/blocks/browse_group_categories_block.js +88 -0
- data/app/assets/javascripts/spotlight/admin/blocks/pages_block.js +1 -1
- data/app/assets/javascripts/spotlight/admin/blocks/solr_documents_base_block.js +1 -1
- data/app/assets/javascripts/spotlight/admin/blocks/uploaded_items_block.js +7 -2
- data/app/assets/javascripts/spotlight/admin/crop.es6 +11 -0
- data/app/assets/javascripts/spotlight/admin/croppable.js +1 -1
- data/app/assets/javascripts/spotlight/admin/index.js +0 -2
- data/app/assets/javascripts/spotlight/admin/reindex_monitor.js +1 -0
- data/app/assets/javascripts/spotlight/admin/search_typeahead.js +2 -2
- data/app/assets/javascripts/spotlight/admin/sir-trevor/block_controls.js +21 -12
- data/app/assets/javascripts/spotlight/admin/sir-trevor/locales.js +11 -3
- data/app/assets/javascripts/spotlight/user/browse_group_categories.js +59 -0
- data/app/assets/javascripts/spotlight/user/index.js +1 -0
- data/app/assets/stylesheets/spotlight/_accessibility.scss +1 -1
- data/app/assets/stylesheets/spotlight/_breadcrumbs.scss +8 -0
- data/app/assets/stylesheets/spotlight/_browse.scss +16 -0
- data/app/assets/stylesheets/spotlight/_catalog.scss +6 -6
- data/app/assets/stylesheets/spotlight/_curation.scss +6 -0
- data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +214 -83
- data/app/assets/stylesheets/spotlight/_header.scss +1 -1
- data/app/assets/stylesheets/spotlight/_item_text_block.scss +6 -0
- data/app/assets/stylesheets/spotlight/_pages.scss +9 -4
- data/app/assets/stylesheets/spotlight/_report_a_problem.scss +5 -2
- data/app/assets/stylesheets/spotlight/_spotlight.scss +2 -0
- data/app/assets/stylesheets/spotlight/_translations.scss +7 -0
- data/app/assets/stylesheets/spotlight/browse_group_categories_block.scss +92 -0
- data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +1 -2
- data/app/controllers/concerns/spotlight/search_helper.rb +2 -8
- data/app/controllers/spotlight/appearances_controller.rb +0 -12
- data/app/controllers/spotlight/browse_controller.rb +7 -3
- data/app/controllers/spotlight/catalog_controller.rb +5 -2
- data/app/controllers/spotlight/concerns/application_controller.rb +13 -2
- data/app/controllers/spotlight/dashboards_controller.rb +1 -1
- data/app/controllers/spotlight/exhibits_controller.rb +2 -3
- data/app/controllers/spotlight/featured_images_controller.rb +1 -1
- data/app/controllers/spotlight/groups_controller.rb +80 -0
- data/app/controllers/spotlight/pages_controller.rb +6 -9
- data/app/controllers/spotlight/resources/csv_upload_controller.rb +1 -1
- data/app/controllers/spotlight/searches_controller.rb +7 -19
- data/app/controllers/spotlight/translations_controller.rb +46 -0
- data/app/helpers/spotlight/application_helper.rb +20 -1
- data/app/helpers/spotlight/crop_helper.rb +4 -1
- data/app/helpers/spotlight/crud_link_helpers.rb +1 -1
- data/app/helpers/spotlight/main_app_helpers.rb +1 -1
- data/app/helpers/spotlight/pages_helper.rb +1 -1
- data/app/jobs/concerns/spotlight/job_tracking.rb +47 -0
- data/app/jobs/concerns/spotlight/limit_concurrency.rb +33 -0
- data/app/jobs/spotlight/add_uploads_from_csv.rb +34 -6
- data/app/jobs/spotlight/application_job.rb +8 -0
- data/app/jobs/spotlight/cleanup_job_trackers_job.rb +13 -0
- data/app/jobs/spotlight/default_thumbnail_job.rb +1 -3
- data/app/jobs/spotlight/reindex_exhibit_job.rb +36 -0
- data/app/jobs/spotlight/reindex_job.rb +49 -41
- data/app/jobs/spotlight/rename_sidecar_field_job.rb +2 -2
- data/app/jobs/spotlight/update_job_trackers_job.rb +20 -0
- data/app/mailers/spotlight/indexing_complete_mailer.rb +3 -2
- data/app/models/concerns/spotlight/exhibit_defaults.rb +1 -1
- data/app/models/concerns/spotlight/translatables.rb +17 -1
- data/app/models/concerns/spotlight/user.rb +2 -1
- data/app/models/sir_trevor_rails/blocks/browse_group_categories_block.rb +25 -0
- data/app/models/spotlight/ability.rb +2 -0
- data/app/models/spotlight/about_page.rb +3 -1
- data/app/models/spotlight/blacklight_configuration.rb +2 -1
- data/app/models/spotlight/contact.rb +1 -1
- data/app/models/spotlight/custom_field.rb +3 -3
- data/app/models/spotlight/event.rb +13 -0
- data/app/models/spotlight/exhibit.rb +18 -14
- data/app/models/spotlight/feature_page.rb +3 -1
- data/app/models/spotlight/featured_image.rb +29 -12
- data/app/models/spotlight/group.rb +22 -0
- data/app/models/spotlight/group_member.rb +11 -0
- data/app/models/spotlight/home_page.rb +3 -1
- data/app/models/spotlight/job_tracker.rb +105 -0
- data/app/models/spotlight/main_navigation.rb +2 -2
- data/app/models/spotlight/masthead.rb +1 -1
- data/app/models/spotlight/page.rb +5 -1
- data/app/models/spotlight/page_configurations.rb +6 -0
- data/app/models/spotlight/page_content.rb +2 -0
- data/app/models/spotlight/reindex_progress.rb +44 -27
- data/app/models/spotlight/resource.rb +24 -58
- data/app/models/spotlight/resources/csv_upload.rb +2 -1
- data/app/models/spotlight/resources/iiif_harvester.rb +10 -1
- data/app/models/spotlight/resources/iiif_manifest.rb +11 -7
- data/app/models/spotlight/resources/iiif_service.rb +1 -1
- data/app/models/spotlight/resources/json_upload.rb +12 -0
- data/app/models/spotlight/resources/upload.rb +25 -2
- data/app/models/spotlight/search.rb +10 -1
- data/app/models/spotlight/solr_document_sidecar.rb +9 -6
- data/app/models/spotlight/temporary_image.rb +8 -0
- data/app/services/spotlight/etl.rb +7 -0
- data/app/services/spotlight/etl/context.rb +52 -0
- data/app/services/spotlight/etl/executor.rb +194 -0
- data/app/services/spotlight/etl/loaders.rb +12 -0
- data/app/services/spotlight/etl/pipeline.rb +81 -0
- data/app/services/spotlight/etl/solr_loader.rb +96 -0
- data/app/services/spotlight/etl/sources.rb +25 -0
- data/app/services/spotlight/etl/step.rb +82 -0
- data/app/services/spotlight/etl/transforms.rb +64 -0
- data/app/services/spotlight/exhibit_import_export_service.rb +482 -0
- data/app/services/spotlight/validity_checker.rb +5 -5
- data/app/values/custom_field_name.rb +1 -0
- data/app/views/catalog/_save_search.html.erb +1 -1
- data/app/views/spotlight/about_pages/_empty.html.erb +5 -5
- data/app/views/spotlight/browse/_search.html.erb +5 -3
- data/app/views/spotlight/browse/_search_title.html.erb +2 -1
- data/app/views/spotlight/browse/index.html.erb +13 -0
- data/app/views/spotlight/catalog/_document.html.erb +2 -4
- data/app/views/spotlight/catalog/index.iiif_json.jbuilder +22 -0
- data/app/views/spotlight/contacts/_form.html.erb +1 -1
- data/app/views/spotlight/dashboards/_reindexing_activity.html.erb +6 -6
- data/app/views/spotlight/feature_pages/_empty.html.erb +5 -5
- data/app/views/spotlight/featured_images/_form.html.erb +1 -1
- data/app/views/spotlight/featured_images/_upload_form.html.erb +1 -1
- data/app/views/spotlight/home_pages/_empty.html.erb +3 -3
- data/app/views/spotlight/indexing_complete_mailer/documents_indexed.html.erb +9 -0
- data/app/views/spotlight/pages/_form.html.erb +2 -2
- data/app/views/spotlight/searches/_form.html.erb +13 -0
- data/app/views/spotlight/searches/_group.html.erb +27 -0
- data/app/views/spotlight/searches/_search.html.erb +1 -0
- data/app/views/spotlight/searches/index.html.erb +58 -17
- data/app/views/spotlight/shared/_honeypot_field.html.erb +4 -0
- data/app/views/spotlight/shared/_locale_picker.html.erb +1 -1
- data/app/views/spotlight/shared/_report_a_problem.html.erb +7 -10
- data/app/views/spotlight/sir_trevor/blocks/_browse_block.html.erb +1 -0
- data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +45 -0
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +7 -1
- data/app/views/spotlight/translations/_browse_categories.html.erb +29 -3
- data/app/views/spotlight/translations/_general.html.erb +7 -7
- data/app/views/spotlight/translations/_groups.html.erb +34 -0
- data/app/views/spotlight/translations/_import.html.erb +24 -0
- data/app/views/spotlight/translations/_metadata.html.erb +1 -1
- data/app/views/spotlight/translations/_page.html.erb +5 -5
- data/app/views/spotlight/translations/_pages.html.erb +4 -4
- data/app/views/spotlight/translations/_pages_table.html.erb +5 -5
- data/app/views/spotlight/translations/_search_fields.html.erb +3 -3
- data/app/views/spotlight/translations/edit.html.erb +14 -6
- data/app/views/spotlight/translations/show.yaml.yamlbuilder +81 -0
- data/config/i18n-tasks.yml +7 -0
- data/config/locales/spotlight.ar.yml +57 -24
- data/config/locales/spotlight.en.yml +184 -128
- data/config/routes.rb +16 -1
- data/db/migrate/20200403161512_add_subtitle_to_searches.rb +7 -0
- data/db/migrate/20210113092223_create_spotlight_groups.rb +23 -0
- data/db/migrate/20210122082032_create_job_trackers.rb +22 -0
- data/db/migrate/20210126123041_create_events.rb +15 -0
- data/lib/generators/spotlight/install_generator.rb +23 -2
- data/lib/generators/spotlight/scaffold_resource_generator.rb +5 -13
- data/lib/generators/spotlight/templates/config/initializers/sir_trevor_rails.rb +10 -0
- data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +3 -1
- data/lib/spotlight/engine.rb +35 -4
- data/lib/spotlight/upload_field_config.rb +1 -0
- data/lib/spotlight/version.rb +1 -1
- data/spec/controllers/spotlight/about_pages_controller_spec.rb +3 -3
- data/spec/controllers/spotlight/browse_controller_spec.rb +24 -1
- data/spec/controllers/spotlight/catalog_controller_spec.rb +4 -2
- data/spec/controllers/spotlight/contacts_controller_spec.rb +2 -2
- data/spec/controllers/spotlight/feature_pages_controller_spec.rb +11 -0
- data/spec/controllers/spotlight/groups_controller_spec.rb +103 -0
- data/spec/controllers/spotlight/home_pages_controller_spec.rb +2 -2
- data/spec/controllers/spotlight/resources/csv_upload_controller_spec.rb +4 -4
- data/spec/controllers/spotlight/searches_controller_spec.rb +10 -3
- data/spec/controllers/spotlight/translations_controller_spec.rb +53 -2
- data/spec/controllers/spotlight/view_configurations_controller_spec.rb +1 -1
- data/spec/examples.txt +1448 -125
- data/spec/factories/featured_images.rb +4 -0
- data/spec/factories/group.rb +17 -0
- data/spec/factories/job_trackers.rb +9 -0
- data/spec/factories/searches.rb +11 -1
- data/spec/features/add_contacts_spec.rb +1 -1
- data/spec/features/add_items_spec.rb +9 -4
- data/spec/features/browse_category_admin_spec.rb +39 -7
- data/spec/features/browse_category_navigation_spec.rb +44 -0
- data/spec/features/browse_category_spec.rb +2 -2
- data/spec/features/catalog_spec.rb +2 -2
- data/spec/features/create_exhibit_spec.rb +5 -4
- data/spec/features/dashboard_spec.rb +7 -7
- data/spec/features/edit_search_fields_spec.rb +2 -2
- data/spec/features/exhibits/administration_spec.rb +3 -3
- data/spec/features/exhibits/edit_metadata_fields_spec.rb +1 -1
- data/spec/features/exhibits/language_create_edit_spec.rb +3 -3
- data/spec/features/exhibits/translation_editing_spec.rb +57 -8
- data/spec/features/home_page_spec.rb +13 -4
- data/spec/features/item_admin_spec.rb +4 -4
- data/spec/features/javascript/about_page_admin_spec.rb +1 -1
- data/spec/features/javascript/block_controls_spec.rb +3 -1
- data/spec/features/javascript/blocks/browse_group_categories_block_spec.rb +64 -0
- data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +4 -1
- data/spec/features/javascript/browse_group_admin_spec.rb +45 -0
- data/spec/features/javascript/edit_in_place_spec.rb +3 -3
- data/spec/features/javascript/feature_page_admin_spec.rb +1 -1
- data/spec/features/javascript/reindex_monitor_spec.rb +1 -1
- data/spec/features/javascript/search_config_admin_spec.rb +1 -1
- data/spec/features/report_a_problem_spec.rb +6 -5
- data/spec/features/site_users_management_spec.rb +4 -4
- data/spec/helpers/spotlight/crud_link_helpers_spec.rb +3 -3
- data/spec/helpers/spotlight/pages_helper_spec.rb +10 -2
- data/spec/i18n_spec.rb +0 -2
- data/spec/jobs/spotlight/add_uploads_from_csv_spec.rb +13 -1
- data/spec/jobs/spotlight/reindex_exhibit_job_spec.rb +43 -0
- data/spec/jobs/spotlight/reindex_job_spec.rb +30 -59
- data/spec/mailers/spotlight/indexing_complete_mailer_spec.rb +11 -1
- data/spec/models/sir_trevor_rails/blocks/browse_group_categories_block_spec.rb +41 -0
- data/spec/models/solr_document_spec.rb +2 -3
- data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +1 -0
- data/spec/models/spotlight/exhibit_spec.rb +21 -59
- data/spec/models/spotlight/featured_image_spec.rb +27 -0
- data/spec/models/spotlight/group_spec.rb +19 -0
- data/spec/models/spotlight/main_navigation_spec.rb +1 -1
- data/spec/models/spotlight/page_spec.rb +6 -1
- data/spec/models/spotlight/reindex_progress_spec.rb +89 -87
- data/spec/models/spotlight/resource_spec.rb +69 -90
- data/spec/models/spotlight/resources/iiif_harvester_spec.rb +9 -10
- data/spec/models/spotlight/resources/upload_spec.rb +43 -79
- data/spec/models/spotlight/role_spec.rb +3 -3
- data/spec/models/spotlight/search_spec.rb +30 -3
- data/spec/models/spotlight/solr_document_sidecar_spec.rb +1 -0
- data/spec/services/spotlight/etl/context_spec.rb +66 -0
- data/spec/services/spotlight/etl/executor_spec.rb +149 -0
- data/spec/services/spotlight/etl/pipeline_spec.rb +22 -0
- data/spec/services/spotlight/etl/solr_loader_spec.rb +76 -0
- data/spec/services/spotlight/etl/step_spec.rb +70 -0
- data/spec/{serializers/spotlight/exhibit_export_serializer_spec.rb → services/spotlight/exhibit_import_export_service_spec.rb} +168 -23
- data/spec/services/spotlight/iiif_resource_resolver_spec.rb +1 -1
- data/spec/spec_helper.rb +3 -6
- data/spec/support/features/test_features_helpers.rb +15 -0
- data/spec/test_app_templates/Gemfile.extra +1 -3
- data/spec/test_app_templates/catalog_controller.rb +6 -3
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
- data/spec/views/shared/_exhibit_navbar.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/browse/index.html.erb_spec.rb +2 -0
- data/spec/views/spotlight/dashboards/_analytics.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +28 -25
- data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +3 -3
- data/spec/views/spotlight/pages/show.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/search_configurations/_facets.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb +7 -8
- data/spec/views/spotlight/translations/_import.html.erb_spec.rb +24 -0
- data/vendor/assets/javascripts/leaflet-iiif.js +46 -21
- data/vendor/assets/javascripts/tiny-slider.js +3218 -0
- data/vendor/assets/stylesheets/tiny-slider.css +1 -0
- metadata +444 -289
- data/app/models/concerns/spotlight/resources/open_graph.rb +0 -36
- data/app/models/spotlight/reindexing_log_entry.rb +0 -42
- data/app/serializers/spotlight/exhibit_export_serializer.rb +0 -205
- data/app/serializers/spotlight/featured_image_representer.rb +0 -29
- data/app/serializers/spotlight/main_navigation_representer.rb +0 -13
- data/app/serializers/spotlight/page_representer.rb +0 -33
- data/app/services/spotlight/resources/iiif_builder.rb +0 -19
- data/app/services/spotlight/solr_document_builder.rb +0 -76
- data/app/services/spotlight/upload_solr_document_builder.rb +0 -57
- data/spec/factories/reindexing_log_entries.rb +0 -54
- data/spec/models/spotlight/reindexing_log_entry_spec.rb +0 -129
- data/spec/models/spotlight/resources/open_graph_spec.rb +0 -65
- data/spec/services/spotlight/solr_document_builder_spec.rb +0 -66
- data/vendor/assets/javascripts/handlebars-v1.3.0.js +0 -2746
@@ -6,7 +6,7 @@
|
|
6
6
|
<ul class="dropdown-menu">
|
7
7
|
<% locale_selecter_dropown_options.each do |language| %>
|
8
8
|
<li>
|
9
|
-
<%= link_to language.to_native, (
|
9
|
+
<%= link_to language.to_native, current_page_for_locale(language.locale), class: 'dropdown-item', data: { turbolinks: false } %>
|
10
10
|
</li>
|
11
11
|
<% end %>
|
12
12
|
</ul>
|
@@ -2,20 +2,17 @@
|
|
2
2
|
<div class="row justify-content-center">
|
3
3
|
<% contact_form ||= Spotlight::ContactForm.new current_url: request.original_url %>
|
4
4
|
<%= bootstrap_form_for contact_form, url: spotlight.exhibit_contact_form_path(current_exhibit, contact_form), layout: :horizontal, label_col: 'col-sm-3', control_col: 'col-sm-9', html: { class: 'col-md-offset-2 col-md-8 my-3 '} do |f| %>
|
5
|
-
|
6
5
|
<h2><%= t(:'.title') %></h2>
|
6
|
+
<div class="alert alert-primary"><%= t('.reporting_from', url: contact_form.current_url) %></div>
|
7
|
+
<%= f.text_area :message, rows: 4 %>
|
7
8
|
<%= f.text_field :name %>
|
8
|
-
|
9
|
-
<% honeypot_field_name = Spotlight::Engine.config.spambot_honeypot_email_field %>
|
10
|
-
<%= f.email_field honeypot_field_name, label: t(:'.honeypot_field_explanation') %>
|
11
|
-
</span>
|
9
|
+
<%= render '/spotlight/shared/honeypot_field', f: f %>
|
12
10
|
<%= f.email_field :email %>
|
13
|
-
<%= f.text_area :message, rows: 7 %>
|
14
11
|
<%= f.hidden_field :current_url %>
|
15
|
-
<div class="form-actions">
|
16
|
-
<div class="
|
17
|
-
|
18
|
-
|
12
|
+
<div class="form-actions row">
|
13
|
+
<div class="col offset-sm-3">
|
14
|
+
<%= f.submit nil, class: 'btn btn-primary' %>
|
15
|
+
<%= link_to t(:'helpers.action.cancel'), '#', class: 'btn-sizing', data: { 'behavior' => 'cancel-link' } %>
|
19
16
|
</div>
|
20
17
|
</div>
|
21
18
|
<% end %>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<% if browse_group_categories_block.groups? %>
|
2
|
+
<% browse_group_categories_block.groups.each do |group| %>
|
3
|
+
<div class="browse-group-categories-block" data-browse-group-categories-count="<%= group.searches.count %>">
|
4
|
+
<div class="d-flex flex-column flex-md-row py-2">
|
5
|
+
<div class="d-flex justify-content-between align-items-end">
|
6
|
+
<h2 class="m-0"><%= group.title %></h2>
|
7
|
+
<div class="pl-5">
|
8
|
+
<%= link_to t(:'.view_all'), exhibit_browse_groups_path(current_exhibit, group) %>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<% if group.searches.count > 1 %>
|
12
|
+
<ul class="browse-group-categories-controls p-0 pt-2 pt-md-0 ml-md-auto mb-0 d-flex justify-content-center align-items-end">
|
13
|
+
<li class="prev px-1 overflow-hidden">
|
14
|
+
<%= blacklight_icon 'arrow-alt-circle-left' %>
|
15
|
+
</li>
|
16
|
+
<li class="next px-1 overflow-hidden">
|
17
|
+
<%= blacklight_icon 'arrow-alt-circle-right' %>
|
18
|
+
</li>
|
19
|
+
</ul>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
22
|
+
<div class="spotlight-flexbox browse-categories categories-<%= [group.searches.count, (@page.display_sidebar? ? 3 : 4)].min %>" data-browse-group-categories-carousel data-sidebar='<%= @page.display_sidebar? %>' data-browse-group-categories-count="<%= group.searches.count %>">
|
23
|
+
<% group.searches.published.each_with_index do |search, index| %>
|
24
|
+
<div class="box category-1 justify-content-center justify-content-md-start">
|
25
|
+
<%= link_to spotlight.exhibit_browse_group_path(current_exhibit, group, search), class: 'justify-content-center' do %>
|
26
|
+
<div class="browse-category" style='background-image: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5)), url("<%= search.thumbnail.iiif_url if search.thumbnail %>")'>
|
27
|
+
<div class="category-caption">
|
28
|
+
<p class="category-title">
|
29
|
+
<%= search.title %>
|
30
|
+
<% if search.subtitle.present? %><span class="category-subtitle"><%= search.subtitle %></span><% end %>
|
31
|
+
</p>
|
32
|
+
|
33
|
+
<% if browse_group_categories_block.display_item_counts? %>
|
34
|
+
<span class="item-count"><%= t(:'.items', count: search.count) %></span>
|
35
|
+
<% end %>
|
36
|
+
</div>
|
37
|
+
<div class="hover-overlay"></div>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
40
|
+
</div>
|
41
|
+
<% end %>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
<% end %>
|
45
|
+
<% end %>
|
@@ -4,7 +4,13 @@
|
|
4
4
|
<% uploaded_items_block.files.each do |file| %>
|
5
5
|
<div class="box" data-id="<%= file[:id] %>">
|
6
6
|
<div class="contents">
|
7
|
-
|
7
|
+
<% if file[:link].present? %>
|
8
|
+
<%= link_to file[:link], rel: 'ugc' do %>
|
9
|
+
<%= image_tag file[:url], class: 'img-thumbnail', alt: file[:caption] %>
|
10
|
+
<% end %>
|
11
|
+
<% else %>
|
12
|
+
<%= image_tag file[:url], class: 'img-thumbnail', alt: '', role: 'presentation' %>
|
13
|
+
<% end %>
|
8
14
|
<% if file[:caption].present? %>
|
9
15
|
<div class="caption">
|
10
16
|
<%= file[:caption] %>
|
@@ -6,12 +6,12 @@
|
|
6
6
|
<div class="row">
|
7
7
|
<div class="col-4 text-right">
|
8
8
|
<span class="browse-translations-header">
|
9
|
-
<%= t :'
|
9
|
+
<%= t :'.default_language_column_label' %>
|
10
10
|
</span>
|
11
11
|
</div>
|
12
12
|
<div class="col-7">
|
13
13
|
<span class="browse-translations-header">
|
14
|
-
<%= t :'
|
14
|
+
<%= t :'.translation_column_label', language: t("locales.#{@language}") %>
|
15
15
|
</span>
|
16
16
|
</div>
|
17
17
|
</div>
|
@@ -36,12 +36,38 @@
|
|
36
36
|
</div>
|
37
37
|
<% end %>
|
38
38
|
|
39
|
+
<% subtitle_translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "#{search.slug}.subtitle", locale: @language) %>
|
40
|
+
<div data-translation-progress-item="true" class="row form-group browse-category-subtitle">
|
41
|
+
<div class="col-7 offset-4">
|
42
|
+
<%= f.fields_for :translations, subtitle_translation do |translation_fields| %>
|
43
|
+
<%= button_tag 'type' => 'button', class: 'btn btn-text collapse-toggle collapsed translation-subtitle-toggle', 'data-toggle': 'collapse', 'data-target': "#browse_category_subtitle_#{search.id}", 'aria-expanded': 'false', 'aria-controls': "#browse_category_subtitle_#{search.id}" do %>
|
44
|
+
<%= translation_fields.label :value, t(:'.subtitle_label') %>
|
45
|
+
<% end %>
|
46
|
+
<span class="collapse-chevron">❯</span>
|
47
|
+
|
48
|
+
<%= translation_fields.hidden_field :key %>
|
49
|
+
<%= translation_fields.hidden_field :locale %>
|
50
|
+
<div id="browse_category_subtitle_<%= search.id %>" class="card card-body collapse panel-translation">
|
51
|
+
<%= translation_fields.text_field_without_bootstrap :value, class: 'form-control' %>
|
52
|
+
<small class="form-text text-muted"><%= search[:subtitle] %></small>
|
53
|
+
</div>
|
54
|
+
<% end %>
|
55
|
+
</div>
|
56
|
+
<div class="col-1">
|
57
|
+
<% if subtitle_translation.value.present? %>
|
58
|
+
<span data-translation-present="true">
|
59
|
+
<%= blacklight_icon('check', classes: 'translation-complete') %>
|
60
|
+
</span>
|
61
|
+
<% end %>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
|
39
65
|
<% description_translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "#{search.slug}.long_description", locale: @language) %>
|
40
66
|
<div data-translation-progress-item="true" class="row form-group browse-category-description">
|
41
67
|
<div class="col-7 offset-4">
|
42
68
|
<%= f.fields_for :translations, description_translation do |translation_fields| %>
|
43
69
|
<%= button_tag 'type' => 'button', class: 'btn btn-text collapse-toggle collapsed translation-description-toggle', 'data-toggle': 'collapse', 'data-target': "#browse_category_description_#{search.id}", 'aria-expanded': 'false', 'aria-controls': "#browse_category_description_#{search.id}" do %>
|
44
|
-
<%= translation_fields.label :value, t(:'
|
70
|
+
<%= translation_fields.label :value, t(:'.description_label') %>
|
45
71
|
<% end %>
|
46
72
|
<span class="collapse-chevron">❯</span>
|
47
73
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
<div class='translation-basic-settings'>
|
7
7
|
<h2 class='translation-subheading'>
|
8
|
-
<%= t('
|
8
|
+
<%= t('.basic_settings.label') %>
|
9
9
|
</h2>
|
10
10
|
|
11
11
|
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "#{current_exhibit.slug}.title", locale: @language) %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= translation_fields.hidden_field :key %>
|
14
14
|
<%= translation_fields.hidden_field :locale %>
|
15
15
|
<div data-translation-progress-item='true' class='row form-group translation-form translation-basic-settings-title'>
|
16
|
-
<%= translation_fields.label :value, t('
|
16
|
+
<%= translation_fields.label :value, t('.basic_settings.title'), class: 'col-form-label col-12 col-sm-2' %>
|
17
17
|
<div class='col-11 col-sm-9 card card-body panel-translation'>
|
18
18
|
<%= translation_fields.text_field_without_bootstrap :value, class: 'form-control' %>
|
19
19
|
<small class="form-text text-muted">
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<%= translation_fields.hidden_field :key %>
|
35
35
|
<%= translation_fields.hidden_field :locale %>
|
36
36
|
<div data-translation-progress-item='true' class='row form-group translation-form translation-basic-settings-subtitle'>
|
37
|
-
<%= translation_fields.label :value, t('
|
37
|
+
<%= translation_fields.label :value, t('.basic_settings.subtitle'), class: 'col-form-label col-12 col-sm-2' %>
|
38
38
|
<div class='col-11 col-sm-9 card card-body panel-translation'>
|
39
39
|
<%= translation_fields.text_field_without_bootstrap :value, class: 'form-control' %>
|
40
40
|
<small class="form-text text-muted">
|
@@ -55,7 +55,7 @@
|
|
55
55
|
<%= translation_fields.hidden_field :key %>
|
56
56
|
<%= translation_fields.hidden_field :locale %>
|
57
57
|
<div data-translation-progress-item='true' class='row form-group translation-form translation-basic-settings-description'>
|
58
|
-
<%= translation_fields.label :value, t('
|
58
|
+
<%= translation_fields.label :value, t('.basic_settings.description'), class: 'col-form-label col-12 col-sm-2' %>
|
59
59
|
<div class='col-11 col-sm-9 card card-body panel-translation'>
|
60
60
|
<%= translation_fields.text_area_without_bootstrap :value, class: 'form-control' %>
|
61
61
|
<small class="form-text text-muted">
|
@@ -74,7 +74,7 @@
|
|
74
74
|
</div>
|
75
75
|
<div class='translation-main-menu'>
|
76
76
|
<h2 class='translation-subheading'>
|
77
|
-
<%= t('
|
77
|
+
<%= t('.main_menu.label') %>
|
78
78
|
</h2>
|
79
79
|
|
80
80
|
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "spotlight.curation.nav.home", locale: @language) %>
|
@@ -82,7 +82,7 @@
|
|
82
82
|
<%= translation_fields.hidden_field :key %>
|
83
83
|
<%= translation_fields.hidden_field :locale %>
|
84
84
|
<div data-translation-progress-item='true' class='row form-group translation-form translation-main-menu-home'>
|
85
|
-
<%= translation_fields.label :value, t('
|
85
|
+
<%= translation_fields.label :value, t('.main_menu.home'), class: 'col-form-label col-12 col-sm-2' %>
|
86
86
|
<div class='col-11 col-sm-9 card card-body panel-translation'>
|
87
87
|
<%= translation_fields.text_field_without_bootstrap :value, class: 'form-control' %>
|
88
88
|
<small class="form-text text-muted">
|
@@ -105,7 +105,7 @@
|
|
105
105
|
<%= translation_fields.hidden_field :key %>
|
106
106
|
<%= translation_fields.hidden_field :locale %>
|
107
107
|
<div data-translation-progress-item='true' class='row form-group translation-form translation-main-menu-<%= navigation.nav_type %>'>
|
108
|
-
<%= translation_fields.label :value, t("
|
108
|
+
<%= translation_fields.label :value, t(".main_menu.#{navigation.nav_type}", default: navigation.default_label), class: 'col-form-label col-12 col-sm-2' %>
|
109
109
|
<div class='col-11 col-sm-9 card card-body panel-translation'>
|
110
110
|
<%= translation_fields.text_field_without_bootstrap :value, class: 'form-control' %>
|
111
111
|
<small class="form-text text-muted">
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<div role="tabpanel" class="tab-pane <%= 'active' if @tab == 'groups' %>" id="groups">
|
2
|
+
<%= bootstrap_form_for current_exhibit, url: spotlight.exhibit_translations_path(current_exhibit), layout: :horizontal do |f| %>
|
3
|
+
<% # Add hidden fields for the language and tab so the redirect knows how to come back here %>
|
4
|
+
<%= hidden_field_tag :language, @language %>
|
5
|
+
<%= hidden_field_tag :tab, 'groups' %>
|
6
|
+
|
7
|
+
<% current_exhibit.groups.each do |group| %>
|
8
|
+
<% title_translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "#{group.slug}.title", locale: @language) %>
|
9
|
+
<%= f.fields_for :translations, title_translation do |translation_fields| %>
|
10
|
+
<%= translation_fields.hidden_field :key %>
|
11
|
+
<%= translation_fields.hidden_field :locale %>
|
12
|
+
<div data-translation-progress-item="true" class="row form-group browse-group-title">
|
13
|
+
<%= translation_fields.label :value, group[:title], class: 'col-form-label col-12 col-sm-2' %>
|
14
|
+
<div class="col-11 col-sm-9">
|
15
|
+
<%= translation_fields.text_field_without_bootstrap :value, class: 'form-control' %>
|
16
|
+
</div>
|
17
|
+
<div class="col-1">
|
18
|
+
<% if title_translation.value.present? %>
|
19
|
+
<span data-translation-present="true">
|
20
|
+
<%= blacklight_icon('check', classes: 'translation-complete') %>
|
21
|
+
</span>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<div class="form-actions">
|
29
|
+
<div class="primary-actions">
|
30
|
+
<%= f.submit nil, class: 'btn btn-primary' %>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<% if can? :import_translations, Spotlight::Exhibit %>
|
2
|
+
<div class="row col-md-12 mb-5">
|
3
|
+
<h2><%= t(:'.header') %></h2>
|
4
|
+
<p class="instructions"><%= t(:'.description') %></p>
|
5
|
+
|
6
|
+
<%= bootstrap_form_for current_exhibit, url: spotlight.import_exhibit_translations_path(current_exhibit), html: { class: 'row col-md-12 align-items-center clearfix mb-3', multipart: true } do |f| %>
|
7
|
+
<%= f.label :value, t(".import_label"), class: 'col-form-label col-12 col-sm-3 pl-0 translation-import-export-label' %>
|
8
|
+
|
9
|
+
<div class="input-group col px-0">
|
10
|
+
<%= file_field_tag :file, class: 'form-control' %>
|
11
|
+
<%= hidden_field_tag :tab, 'import' %>
|
12
|
+
<div class="input-group-append">
|
13
|
+
<%= f.submit t(:'.import_submit'), class: 'btn btn-primary' %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
17
|
+
<div class="row col-md-12 align-items-center">
|
18
|
+
<%= content_tag :span, t(".export_label"), class: 'col-form-label col-12 col-sm-3 pl-0 translation-import-export-label' %>
|
19
|
+
|
20
|
+
<%= link_to t(:'.export_current_locale', language: t(:"locales.#{@language}")), spotlight.exhibit_translations_path(current_exhibit, format: "yaml", locale: @language), class: 'btn btn-primary mr-3' %>
|
21
|
+
<%= link_to t(:'.export_default_locale', language: t(:"locales.#{I18n.default_locale}")), spotlight.exhibit_translations_path(current_exhibit, format: "yaml", locale: I18n.default_locale), class: 'btn btn-primary' %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<% if current_exhibit.custom_fields.any? %>
|
33
33
|
<div class='translation-exhibit-specific-fields'>
|
34
34
|
<h2 class='translation-subheading'>
|
35
|
-
<%= t('
|
35
|
+
<%= t('.exhibit_specific_fields.label') %>
|
36
36
|
</h2>
|
37
37
|
|
38
38
|
<% current_exhibit.custom_fields.each do |custom_field| %>
|
@@ -22,8 +22,8 @@
|
|
22
22
|
</p>
|
23
23
|
<% else %>
|
24
24
|
<span class="new-translated-page">
|
25
|
-
<%= t('
|
26
|
-
<%= link_to(t('
|
25
|
+
<%= t('.no_translated_page') %>
|
26
|
+
<%= link_to(t('.new'), polymorphic_path([:clone, current_exhibit, page], language: @language)) %>
|
27
27
|
<span>
|
28
28
|
<% end %>
|
29
29
|
</td>
|
@@ -36,11 +36,11 @@
|
|
36
36
|
</td>
|
37
37
|
<td class="text-center">
|
38
38
|
<% if translated_page %>
|
39
|
-
<%= link_to(t('
|
40
|
-
<%= link_to(t('
|
39
|
+
<%= link_to(t('.edit'), polymorphic_path([:edit, current_exhibit, translated_page], locale: @language)) %> ·
|
40
|
+
<%= link_to(t('.recreate'), polymorphic_path([:clone, current_exhibit, page], language: @language), data: { confirm: t('.recreate_are_you_sure') }) %>
|
41
41
|
<% if page.feature_page? || page.about_page? %>
|
42
42
|
·
|
43
|
-
<%= link_to(t('
|
43
|
+
<%= link_to(t('.destroy'), polymorphic_path([current_exhibit, translated_page], locale: @language), method: :delete, data: { confirm: t('.destroy_are_you_sure') }) %>
|
44
44
|
<% end %>
|
45
45
|
<% end %>
|
46
46
|
</td>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<div role="tabpanel" class="tab-pane <%= 'active' if @tab == 'pages' %>" id="pages">
|
2
|
-
<p class="instructions"><%= t('
|
2
|
+
<p class="instructions"><%= t('.help_html') %></p>
|
3
3
|
|
4
4
|
<%= bootstrap_form_for @exhibit, url: polymorphic_path([:update_all, @exhibit, :pages]), layout: :horizontal, control_col: 'col-sm-10', html: {:'data-form-observer' => true} do |f| %>
|
5
5
|
<div class="translation-home-page-settings">
|
6
6
|
<h2 class="translation-subheading">
|
7
|
-
<%= t('
|
7
|
+
<%= t('.home_page.label') %>
|
8
8
|
</h2>
|
9
9
|
<%= render 'pages_table', pages: [current_exhibit.home_page], f: f %>
|
10
10
|
</div>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<% if current_exhibit.feature_pages.any? %>
|
13
13
|
<div class="translation-feature-page-settings">
|
14
14
|
<h2 class="translation-subheading">
|
15
|
-
<%= t('
|
15
|
+
<%= t('.feature_pages.label') %>
|
16
16
|
</h2>
|
17
17
|
|
18
18
|
<%= render 'pages_table', pages: current_exhibit.feature_pages.for_default_locale, f: f %>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<% if current_exhibit.about_pages.any? %>
|
23
23
|
<div class="translation-about-page-settings">
|
24
24
|
<h2 class="translation-subheading">
|
25
|
-
<%= t('
|
25
|
+
<%= t('.about_pages.label') %>
|
26
26
|
</h2>
|
27
27
|
|
28
28
|
<%= render 'pages_table', pages: current_exhibit.about_pages.for_default_locale, f: f %>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<table class="table table-striped">
|
2
2
|
<thead>
|
3
3
|
<tr>
|
4
|
-
<th><%= t('
|
5
|
-
<th class="text-center"><%= t('
|
6
|
-
<th><%= t('
|
7
|
-
<th class='text-center'><%= t('
|
8
|
-
<th class='text-center'><%= t('
|
4
|
+
<th><%= t('.header.last_updated', language: t(:"locales.#{I18n.default_locale}")) %></th>
|
5
|
+
<th class="text-center"><%= t('.header.default_published') %></th>
|
6
|
+
<th><%= t('.header.last_updated', language: t(:"locales.#{@language}")) %></th>
|
7
|
+
<th class='text-center'><%= t('.header.language_published') %></th>
|
8
|
+
<th class='text-center'><%= t('.header.actions') %></th>
|
9
9
|
</tr>
|
10
10
|
</thead>
|
11
11
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<div class='translation-field-based-search-fields'>
|
8
8
|
<h2 class='translation-subheading'>
|
9
|
-
<%= t('
|
9
|
+
<%= t('.field_based_search_fields.label') %>
|
10
10
|
</h2>
|
11
11
|
|
12
12
|
<% current_exhibit.blacklight_config.search_fields.select { |_, config| config.if }.each do |key, search_config| %>
|
@@ -36,7 +36,7 @@
|
|
36
36
|
|
37
37
|
<div class='translation-facet-fields'>
|
38
38
|
<h2 class='translation-subheading'>
|
39
|
-
<%= t('
|
39
|
+
<%= t('.facet_fields.label') %>
|
40
40
|
</h2>
|
41
41
|
|
42
42
|
<% current_exhibit.blacklight_config.facet_fields.each do |key, facet_config| %>
|
@@ -66,7 +66,7 @@
|
|
66
66
|
|
67
67
|
<div class='translation-sort-fields'>
|
68
68
|
<h2 class='translation-subheading'>
|
69
|
-
<%= t('
|
69
|
+
<%= t('.sort_fields.label') %>
|
70
70
|
</h2>
|
71
71
|
|
72
72
|
<% current_exhibit.blacklight_config.sort_fields.each do |key, sort_config| %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<div class='translation-edit-form'>
|
6
|
-
<%= curation_page_title t('
|
6
|
+
<%= curation_page_title t('.title') %>
|
7
7
|
|
8
8
|
<div class='text-center'>
|
9
9
|
<ul class='nav nav-pills'>
|
@@ -17,31 +17,38 @@
|
|
17
17
|
</ul>
|
18
18
|
</div>
|
19
19
|
|
20
|
+
<%= render partial: 'import' %>
|
21
|
+
|
20
22
|
<div role="tabpanel">
|
21
23
|
<ul class='nav nav-tabs' role="tablist">
|
22
24
|
<li role="presentation" class="nav-item">
|
23
25
|
<a href='#general' class="nav-link <%= 'active' if @tab.blank? %>" aria-controls="general" role="tab" data-toggle="tab" data-behavior="translation-progress">
|
24
|
-
<%= t('spotlight.
|
26
|
+
<%= t('spotlight.translations.general.label') %> <span class="badge"></span>
|
25
27
|
</a>
|
26
28
|
</li>
|
27
29
|
<li class="nav-item">
|
28
30
|
<a href="#metadata" class="nav-link <%= 'active' if @tab == 'metadata' %>" aria-controls="metadata" role="tab" data-toggle="tab" data-behavior="translation-progress">
|
29
|
-
<%= t('spotlight.
|
31
|
+
<%= t('spotlight.translations.metadata.label') %> <span class="badge"></span>
|
30
32
|
</a>
|
31
33
|
</li>
|
32
34
|
<li class="nav-item" >
|
33
35
|
<a href="#search_fields" class="nav-link <%= 'active' if @tab == 'search_fields' %>" aria-controls="search_fields" role="tab" data-toggle="tab" data-behavior="translation-progress">
|
34
|
-
<%= t('spotlight.
|
36
|
+
<%= t('spotlight.translations.search_fields.label') %> <span class="badge"></span>
|
35
37
|
</a>
|
36
38
|
</li>
|
37
39
|
<li class="nav-item">
|
38
40
|
<a href="#browse" class="nav-link <%= 'active' if @tab == 'browse' %>" aria-controls="browse" role="tab" data-toggle="tab" data-behavior="translation-progress">
|
39
|
-
<%= t('spotlight.
|
41
|
+
<%= t('spotlight.translations.browse_categories.label') %> <span class="badge"></span>
|
42
|
+
</a>
|
43
|
+
</li>
|
44
|
+
<li class="nav-item">
|
45
|
+
<a href="#groups" class="nav-link <%= 'active' if @tab == 'groups' %>" aria-controls="groups" role="tab" data-toggle="tab" data-behavior="translation-progress">
|
46
|
+
<%= t('spotlight.translations.groups.label') %> <span class="badge"></span>
|
40
47
|
</a>
|
41
48
|
</li>
|
42
49
|
<li class="nav-item">
|
43
50
|
<a href="#pages" class="nav-link <%= 'active' if @tab == 'pages' %>" aria-controls="pages" role="tab" data-toggle="tab" data-behavior="translation-progress">
|
44
|
-
<%= t('spotlight.
|
51
|
+
<%= t('spotlight.translations.pages.label') %> <span class="badge"></span>
|
45
52
|
</a>
|
46
53
|
</li>
|
47
54
|
</ul>
|
@@ -52,6 +59,7 @@
|
|
52
59
|
<%= render 'search_fields' %>
|
53
60
|
<%= render 'browse_categories' %>
|
54
61
|
<%= render 'pages' %>
|
62
|
+
<%= render 'groups' %>
|
55
63
|
</div>
|
56
64
|
</div>
|
57
65
|
</div>
|