blacklight-spotlight 3.0.0.alpha.2 → 3.0.0.alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -4
- data/app/assets/javascripts/spotlight/admin/appearance.js +3 -3
- data/app/assets/javascripts/spotlight/admin/blocks/resources_block.js +18 -16
- data/app/assets/javascripts/spotlight/admin/blocks/uploaded_items_block.js +19 -20
- data/app/assets/javascripts/spotlight/admin/exhibits.js +6 -1
- data/app/assets/javascripts/spotlight/admin/multi_image_selector.js +1 -1
- data/app/assets/javascripts/spotlight/admin/search_typeahead.js +1 -1
- data/app/assets/javascripts/spotlight/admin/sir-trevor/locales.js +1 -1
- data/app/assets/javascripts/spotlight/admin/spotlight_nestable.js +6 -1
- data/app/assets/javascripts/spotlight/admin/tabs.js +2 -2
- data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +1 -35
- data/app/assets/stylesheets/spotlight/_bootstrap_overrides.scss +17 -10
- data/app/assets/stylesheets/spotlight/_browse.scss +11 -18
- data/app/assets/stylesheets/spotlight/_catalog.scss +13 -4
- data/app/assets/stylesheets/spotlight/_curation.scss +21 -14
- data/app/assets/stylesheets/spotlight/_exhibit_navbar.scss +10 -0
- data/app/assets/stylesheets/spotlight/_exhibits_index.scss +4 -48
- data/app/assets/stylesheets/spotlight/_header.scss +3 -1
- data/app/assets/stylesheets/spotlight/_item_text_block.scss +3 -3
- data/app/assets/stylesheets/spotlight/_multi_image_selector.scss +6 -7
- data/app/assets/stylesheets/spotlight/_nestable.scss +12 -1
- data/app/assets/stylesheets/spotlight/_pages.scss +7 -19
- data/app/assets/stylesheets/spotlight/_spotlight.scss +1 -0
- data/app/assets/stylesheets/spotlight/_translations.scss +5 -0
- data/app/controllers/concerns/spotlight/base.rb +2 -2
- data/app/controllers/concerns/spotlight/controller.rb +2 -2
- data/app/controllers/concerns/spotlight/search_helper.rb +2 -0
- data/app/controllers/spotlight/about_pages_controller.rb +1 -1
- data/app/controllers/spotlight/appearances_controller.rb +9 -9
- data/app/controllers/spotlight/browse_controller.rb +1 -1
- data/app/controllers/spotlight/catalog_controller.rb +5 -9
- data/app/controllers/spotlight/concerns/application_controller.rb +3 -3
- data/app/controllers/spotlight/contacts_controller.rb +1 -1
- data/app/controllers/spotlight/custom_fields_controller.rb +1 -1
- data/app/controllers/spotlight/custom_search_fields_controller.rb +1 -1
- data/app/controllers/spotlight/exhibits_controller.rb +4 -4
- data/app/controllers/spotlight/feature_pages_controller.rb +3 -5
- data/app/controllers/spotlight/filters_controller.rb +1 -3
- data/app/controllers/spotlight/home_pages_controller.rb +1 -1
- data/app/controllers/spotlight/metadata_configurations_controller.rb +1 -1
- data/app/controllers/spotlight/pages_controller.rb +7 -7
- data/app/controllers/spotlight/resources/upload_controller.rb +1 -1
- data/app/controllers/spotlight/resources_controller.rb +1 -1
- data/app/controllers/spotlight/roles_controller.rb +1 -1
- data/app/controllers/spotlight/search_configurations_controller.rb +3 -3
- data/app/controllers/spotlight/searches_controller.rb +12 -12
- data/app/controllers/spotlight/sites_controller.rb +5 -5
- data/app/controllers/spotlight/translations_controller.rb +1 -1
- data/app/helpers/spotlight/application_helper.rb +3 -3
- data/app/helpers/spotlight/main_app_helpers.rb +6 -6
- data/app/helpers/spotlight/masthead_helper.rb +19 -0
- data/app/helpers/spotlight/search_configurations_helper.rb +9 -7
- data/app/helpers/spotlight/searches_helper.rb +1 -1
- data/app/jobs/spotlight/add_uploads_from_csv.rb +0 -1
- data/app/jobs/spotlight/reindex_job.rb +4 -4
- data/app/models/concerns/spotlight/access_controls_enforcement_search_builder.rb +1 -1
- data/app/models/concerns/spotlight/exhibit_analytics.rb +2 -2
- data/app/models/concerns/spotlight/solr_document.rb +5 -1
- data/app/models/concerns/spotlight/solr_document/uploaded_resource.rb +2 -2
- data/app/models/spotlight/ability.rb +2 -2
- data/app/models/spotlight/about_page.rb +1 -1
- data/app/models/spotlight/analytics/ga.rb +1 -1
- data/app/models/spotlight/blacklight_configuration.rb +20 -18
- data/app/models/spotlight/contact.rb +1 -1
- data/app/models/spotlight/custom_field.rb +7 -7
- data/app/models/spotlight/exhibit.rb +11 -2
- data/app/models/spotlight/feature_page.rb +1 -1
- data/app/models/spotlight/featured_image.rb +1 -4
- data/app/models/spotlight/home_page.rb +1 -1
- data/app/models/spotlight/page.rb +2 -2
- data/app/models/spotlight/reindexing_log_entry.rb +3 -3
- data/app/models/spotlight/resource.rb +3 -5
- data/app/models/spotlight/resources/iiif_manifest.rb +1 -1
- data/app/models/spotlight/resources/upload.rb +0 -1
- data/app/models/spotlight/role.rb +1 -1
- data/app/models/spotlight/search.rb +3 -3
- data/app/serializers/spotlight/exhibit_export_serializer.rb +10 -10
- data/app/serializers/spotlight/featured_image_representer.rb +1 -1
- data/app/serializers/spotlight/main_navigation_representer.rb +1 -1
- data/app/serializers/spotlight/page_representer.rb +1 -1
- data/app/uploaders/spotlight/attachment_uploader.rb +0 -1
- data/app/views/catalog/_image_default.html.erb +3 -3
- data/app/views/catalog/_save_search.html.erb +2 -2
- data/app/views/layouts/spotlight/spotlight.html.erb +2 -2
- data/app/views/shared/_breadcrumbs.html.erb +1 -1
- data/app/views/shared/_exhibit_navbar.html.erb +3 -3
- data/app/views/shared/_header_navbar.html.erb +1 -1
- data/app/views/shared/_masthead.html.erb +12 -15
- data/app/views/spotlight/about_pages/_contact.html.erb +12 -12
- data/app/views/spotlight/about_pages/_contact_properties.html.erb +16 -12
- data/app/views/spotlight/about_pages/_contacts.html.erb +1 -1
- data/app/views/spotlight/about_pages/_contacts_form.html.erb +2 -2
- data/app/views/spotlight/about_pages/_sidebar.html.erb +1 -1
- data/app/views/spotlight/appearances/edit.html.erb +27 -31
- data/app/views/spotlight/browse/_search.html.erb +1 -1
- data/app/views/spotlight/browse/_search_box.html.erb +2 -2
- data/app/views/spotlight/browse/_sort_and_per_page.html.erb +1 -1
- data/app/views/spotlight/browse/index.html.erb +3 -2
- data/app/views/spotlight/catalog/_admin_thumbnail_default.html.erb +1 -1
- data/app/views/spotlight/catalog/_document_admin_table.html.erb +1 -1
- data/app/views/spotlight/contacts/_form.html.erb +2 -2
- data/app/views/spotlight/custom_fields/form_group/_text.html.erb +15 -6
- data/app/views/spotlight/custom_fields/form_group/_vocab.html.erb +15 -6
- data/app/views/spotlight/custom_search_fields/edit.html.erb +5 -5
- data/app/views/spotlight/custom_search_fields/new.html.erb +5 -5
- data/app/views/spotlight/dashboards/_analytics.html.erb +1 -1
- data/app/views/spotlight/dashboards/_page_activity.html.erb +1 -1
- data/app/views/spotlight/dashboards/_reindexing_activity.html.erb +1 -1
- data/app/views/spotlight/dashboards/_solr_document_activity.html.erb +1 -1
- data/app/views/spotlight/exhibits/_contact.html.erb +1 -1
- data/app/views/spotlight/exhibits/_delete.html.erb +2 -2
- data/app/views/spotlight/exhibits/_exhibit_card.html.erb +2 -2
- data/app/views/spotlight/exhibits/_exhibit_card_back.html.erb +21 -19
- data/app/views/spotlight/exhibits/_exhibit_card_front.html.erb +5 -3
- data/app/views/spotlight/exhibits/_exhibits.html.erb +3 -5
- data/app/views/spotlight/exhibits/_form.html.erb +3 -3
- data/app/views/spotlight/exhibits/_languages.html.erb +6 -4
- data/app/views/spotlight/feature_pages/_header.html.erb +5 -5
- data/app/views/spotlight/feature_pages/_sidebar.html.erb +1 -1
- data/app/views/spotlight/featured_images/_form.html.erb +2 -2
- data/app/views/spotlight/featured_images/_upload_form.html.erb +2 -2
- data/app/views/spotlight/home_pages/_edit_page_link.html.erb +1 -1
- data/app/views/spotlight/metadata_configurations/edit.html.erb +2 -2
- data/app/views/spotlight/pages/_order_pages.html.erb +1 -1
- data/app/views/spotlight/pages/_page.html.erb +23 -23
- data/app/views/spotlight/pages/_view_type_group.html.erb +1 -1
- data/app/views/spotlight/resources/_external_resources_form.html.erb +10 -2
- data/app/views/spotlight/resources/new.html.erb +2 -2
- data/app/views/spotlight/resources/upload/_form.html.erb +1 -1
- data/app/views/spotlight/roles/index.html.erb +2 -6
- data/app/views/spotlight/search_configurations/_default_per_page.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_document_index_view_types.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_facets.html.erb +22 -22
- data/app/views/spotlight/search_configurations/_search_fields.html.erb +11 -15
- data/app/views/spotlight/search_configurations/_sort.html.erb +19 -19
- data/app/views/spotlight/searches/_form.html.erb +3 -3
- data/app/views/spotlight/searches/_search.html.erb +24 -24
- data/app/views/spotlight/searches/index.html.erb +1 -1
- data/app/views/spotlight/shared/_configuration_sidebar.html.erb +2 -1
- data/app/views/spotlight/shared/_curation_sidebar.html.erb +1 -1
- data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +1 -0
- data/app/views/spotlight/sir_trevor/blocks/_oembed_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_search_results_block.html.erb +1 -2
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +6 -6
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb +15 -7
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +7 -6
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +4 -4
- data/config/locales/spotlight.en.yml +13 -5
- data/config/locales/spotlight.es.yml +40 -0
- data/config/locales/spotlight.pt-BR.yml +25 -0
- data/config/routes.rb +14 -14
- data/lib/generators/spotlight/install_generator.rb +1 -1
- data/lib/generators/spotlight/scaffold_resource_generator.rb +1 -1
- data/lib/generators/spotlight/templates/config/initializers/translation.rb +5 -5
- data/lib/spotlight/engine.rb +12 -11
- data/lib/spotlight/version.rb +1 -1
- data/lib/tasks/spotlight_tasks.rake +2 -2
- data/spec/controllers/application_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/about_pages_controller_spec.rb +10 -0
- data/spec/controllers/spotlight/admin_users_controller_spec.rb +4 -0
- data/spec/controllers/spotlight/appearances_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/application_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/attachments_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/browse_controller_spec.rb +5 -4
- data/spec/controllers/spotlight/catalog_controller_spec.rb +18 -4
- data/spec/controllers/spotlight/confirmations_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/contact_forms_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/contacts_controller_spec.rb +3 -0
- data/spec/controllers/spotlight/custom_fields_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/custom_search_fields_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/dashboards_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/exhibits_controller_spec.rb +4 -2
- data/spec/controllers/spotlight/feature_pages_controller_spec.rb +13 -1
- data/spec/controllers/spotlight/featured_images_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/home_pages_controller_spec.rb +5 -2
- data/spec/controllers/spotlight/metadata_configurations_controller_spec.rb +2 -1
- data/spec/controllers/spotlight/pages_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/resources/csv_upload_controller_spec.rb +4 -0
- data/spec/controllers/spotlight/resources/upload_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/resources_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/roles_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/search_configurations_controller_spec.rb +2 -1
- data/spec/controllers/spotlight/searches_controller_spec.rb +4 -0
- data/spec/controllers/spotlight/sites_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/tags_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/translations_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/versions_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/view_configurations_controller_spec.rb +2 -1
- data/spec/examples.txt +1382 -50
- data/spec/factories/contact_emails.rb +1 -1
- data/spec/factories/contact_images.rb +1 -1
- data/spec/factories/contacts.rb +1 -1
- data/spec/factories/custom_fields.rb +1 -1
- data/spec/factories/custom_search_fields.rb +1 -1
- data/spec/factories/exhibit_thumbnails.rb +1 -1
- data/spec/factories/exhibits.rb +1 -1
- data/spec/factories/featured_images.rb +2 -2
- data/spec/factories/language.rb +1 -1
- data/spec/factories/main_navigation.rb +1 -1
- data/spec/factories/reindexing_log_entries.rb +6 -6
- data/spec/factories/resources.rb +2 -2
- data/spec/factories/roles.rb +1 -1
- data/spec/factories/searches.rb +2 -2
- data/spec/factories/tags.rb +2 -2
- data/spec/features/about_page_spec.rb +1 -0
- data/spec/features/add_contacts_spec.rb +2 -1
- data/spec/features/add_custom_field_metadata_spec.rb +3 -0
- data/spec/features/add_iiif_manifest_spec.rb +1 -0
- data/spec/features/add_items_spec.rb +1 -0
- data/spec/features/browse_category_admin_spec.rb +3 -1
- data/spec/features/browse_category_spec.rb +4 -1
- data/spec/features/catalog_spec.rb +1 -0
- data/spec/features/create_exhibit_spec.rb +1 -0
- data/spec/features/create_page_spec.rb +1 -0
- data/spec/features/edit_contact_spec.rb +1 -0
- data/spec/features/edit_search_fields_spec.rb +4 -3
- data/spec/features/exhibit_masthead_spec.rb +4 -4
- data/spec/features/exhibits/administration_spec.rb +11 -2
- data/spec/features/exhibits/edit_metadata_fields_spec.rb +3 -2
- data/spec/features/exhibits/language_create_edit_spec.rb +1 -0
- data/spec/features/exhibits/translation_editing_spec.rb +5 -3
- data/spec/features/exhibits_index_spec.rb +2 -2
- data/spec/features/feature_page_spec.rb +6 -2
- data/spec/features/home_page_spec.rb +3 -1
- data/spec/features/import_exhibit_spec.rb +1 -0
- data/spec/features/item_admin_spec.rb +4 -2
- data/spec/features/javascript/about_page_admin_spec.rb +2 -1
- data/spec/features/javascript/block_controls_spec.rb +3 -2
- data/spec/features/javascript/blocks/rule_block_spec.rb +1 -0
- data/spec/features/javascript/blocks/solr_documents_block_spec.rb +11 -11
- data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +5 -7
- data/spec/features/javascript/edit_in_place_spec.rb +2 -1
- data/spec/features/javascript/feature_page_admin_spec.rb +1 -1
- data/spec/features/javascript/home_page_edit_spec.rb +1 -1
- data/spec/features/javascript/metadata_admin_spec.rb +3 -1
- data/spec/features/javascript/multi_image_select_spec.rb +3 -2
- data/spec/features/javascript/reindex_monitor_spec.rb +1 -1
- data/spec/features/javascript/roles_admin_spec.rb +1 -0
- data/spec/features/javascript/search_config_admin_spec.rb +3 -1
- data/spec/features/javascript/search_context_spec.rb +5 -4
- data/spec/features/main_navigation_spec.rb +46 -2
- data/spec/features/metadata_admin_spec.rb +1 -0
- data/spec/features/report_a_problem_spec.rb +1 -1
- data/spec/features/site_masthead_spec.rb +3 -3
- data/spec/features/slideshow_spec.rb +1 -1
- data/spec/helpers/spotlight/application_helper_spec.rb +10 -5
- data/spec/helpers/spotlight/crud_link_helpers_spec.rb +3 -0
- data/spec/helpers/spotlight/languages_helper_spec.rb +2 -0
- data/spec/helpers/spotlight/main_app_helpers_spec.rb +10 -6
- data/spec/helpers/spotlight/masthead_helper_spec.rb +51 -0
- data/spec/helpers/spotlight/meta_helper_spec.rb +1 -0
- data/spec/helpers/spotlight/navbar_helper_spec.rb +5 -3
- data/spec/helpers/spotlight/pages_helper_spec.rb +10 -3
- data/spec/helpers/spotlight/title_helper_spec.rb +1 -0
- data/spec/jobs/spotlight/add_uploads_from_csv_spec.rb +1 -0
- data/spec/jobs/spotlight/default_thumbnail_job_spec.rb +2 -1
- data/spec/lib/migration/iiif_spec.rb +1 -1
- data/spec/lib/migration/page_language_spec.rb +1 -0
- data/spec/lib/spotlight/controller_spec.rb +4 -4
- data/spec/mailers/spotlight/indexing_complete_mailer_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/browse_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/featured_pages_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/search_results_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/solr_documents_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/textable_spec.rb +5 -2
- data/spec/models/solr_document_spec.rb +19 -10
- data/spec/models/spotlight/ability_spec.rb +3 -1
- data/spec/models/spotlight/about_page_spec.rb +6 -3
- data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +2 -1
- data/spec/models/spotlight/analytics/ga_spec.rb +1 -1
- data/spec/models/spotlight/blacklight_configuration_spec.rb +36 -31
- data/spec/models/spotlight/contact_email_spec.rb +4 -3
- data/spec/models/spotlight/contact_form_spec.rb +3 -2
- data/spec/models/spotlight/contact_spec.rb +4 -3
- data/spec/models/spotlight/custom_field_spec.rb +17 -8
- data/spec/models/spotlight/custom_search_field_spec.rb +2 -0
- data/spec/models/spotlight/custom_translation_extension_spec.rb +2 -1
- data/spec/models/spotlight/exhibit_spec.rb +34 -3
- data/spec/models/spotlight/feature_page_spec.rb +21 -9
- data/spec/models/spotlight/field_metadata_spec.rb +4 -4
- data/spec/models/spotlight/home_page_spec.rb +8 -4
- data/spec/models/spotlight/language_spec.rb +1 -0
- data/spec/models/spotlight/masthead_spec.rb +2 -1
- data/spec/models/spotlight/page_configurations_spec.rb +2 -1
- data/spec/models/spotlight/page_spec.rb +14 -8
- data/spec/models/spotlight/reindexing_log_entry_spec.rb +4 -4
- data/spec/models/spotlight/resources/iiif_harvester_spec.rb +5 -3
- data/spec/models/spotlight/resources/iiif_manifest_spec.rb +6 -2
- data/spec/models/spotlight/resources/iiif_service_spec.rb +4 -1
- data/spec/models/spotlight/resources/open_graph_spec.rb +3 -2
- data/spec/models/spotlight/resources/upload_spec.rb +7 -2
- data/spec/models/spotlight/role_spec.rb +5 -0
- data/spec/models/spotlight/search_spec.rb +4 -1
- data/spec/models/spotlight/sitemap_spec.rb +2 -2
- data/spec/models/spotlight/solr_document/atomic_updates_spec.rb +2 -1
- data/spec/models/spotlight/solr_document/uploaded_resource_spec.rb +3 -1
- data/spec/models/spotlight/solr_document_sidecar_spec.rb +8 -7
- data/spec/models/spotlight/user_spec.rb +1 -0
- data/spec/models/translation_spec.rb +3 -2
- data/spec/serializers/spotlight/exhibit_export_serializer_spec.rb +24 -23
- data/spec/services/spotlight/clone_translated_page_from_locale_spec.rb +2 -1
- data/spec/services/spotlight/iiif_resource_resolver_spec.rb +3 -2
- data/spec/services/spotlight/solr_document_builder_spec.rb +2 -1
- data/spec/spec_helper.rb +4 -4
- data/spec/support/features/test_features_helpers.rb +1 -1
- data/spec/test_app_templates/Gemfile.extra +1 -1
- data/spec/test_app_templates/catalog_controller.rb +1 -1
- data/spec/test_app_templates/spotlight_test.rake +1 -1
- data/spec/uploaders/spotlight/attachment_uploader_spec.rb +2 -1
- data/spec/uploaders/spotlight/featured_image_uploader_spec.rb +2 -1
- data/spec/views/shared/_analytics.html.erb_spec.rb +1 -0
- data/spec/views/shared/_exhibit_navbar.html.erb_spec.rb +5 -5
- data/spec/views/shared/_masthead.html.erb_spec.rb +4 -1
- data/spec/views/shared/_user_util_links.html.erb_spec.rb +9 -2
- data/spec/views/spotlight/about_pages/_empty.html.erb_spec.rb +4 -1
- data/spec/views/spotlight/about_pages/index.html.erb_spec.rb +2 -0
- data/spec/views/spotlight/browse/_search.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/browse/index.html.erb_spec.rb +3 -1
- data/spec/views/spotlight/browse/show.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/catalog/_edit_default.html.erb_spec.rb +6 -5
- data/spec/views/spotlight/catalog/admin.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/contacts/edit.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/dashboards/_analytics.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/exhibits/_exhibit_card_front.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/exhibits/_form.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/exhibits/edit.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/featured_images/_form.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/home_pages/_empty.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/metadata_configurations/edit.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/_form.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/edit.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/index.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/new.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/show.html.erb_spec.rb +4 -3
- data/spec/views/spotlight/resources/_external_resources_form.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/resources/new.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/search_configurations/_facet_metadata.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/search_configurations/_facets.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb_spec.rb +17 -3
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb_spec.rb +8 -1
- data/spec/views/spotlight/tags/index.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/translations/_page.html.erb_spec.rb +1 -0
- metadata +158 -152
@@ -12,11 +12,11 @@
|
|
12
12
|
<% doc_presenter = index_presenter(document) %>
|
13
13
|
<div class="carousel-item <%= 'active' if index == 0 %>" data-id="<%= document.id %>">
|
14
14
|
<% if block_options[:full_image_url].present? %>
|
15
|
-
<%= link_to_document(document, image_tag(block_options[:full_image_url]), counter: -1) %>
|
15
|
+
<%= link_to_document(document, image_tag(block_options[:full_image_url], alt: doc_presenter.heading), counter: -1) %>
|
16
16
|
<% elsif block_options[:iiif_tilesource_base].present? %>
|
17
|
-
<%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!800,800/0/default.jpg'), counter: -1) %>
|
17
|
+
<%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!800,800/0/default.jpg', alt: doc_presenter.heading), counter: -1) %>
|
18
18
|
<% elsif has_thumbnail? document %>
|
19
|
-
<%= render_thumbnail_tag(document, {}, document_counter: -1) %>
|
19
|
+
<%= render_thumbnail_tag(document, { alt: doc_presenter.heading }, document_counter: -1) %>
|
20
20
|
<% end %>
|
21
21
|
</div>
|
22
22
|
|
@@ -1,15 +1,16 @@
|
|
1
1
|
<% solr_documents_grid_block.with_solr_helper(self) %>
|
2
|
-
<div class="content-block item-grid-block row
|
3
|
-
<div class="items-col <%= solr_documents_grid_block.text? ? 'col-md-9' : 'col-md-12' %>">
|
2
|
+
<div class="content-block item-grid-block row d-block">
|
3
|
+
<div class="items-col align-content-start justify-content-between flex-wrap <%= solr_documents_grid_block.text? ? 'col-md-9' : 'col-md-12' %> <%= solr_documents_grid_block.content_align == 'right' ? 'float-right' : 'float-left' %>">
|
4
4
|
<% if solr_documents_grid_block.documents? %>
|
5
5
|
<% solr_documents_grid_block.each_document.each_with_index do |(block_options, document), index| %>
|
6
|
+
<% doc_presenter = index_presenter(document) %>
|
6
7
|
<div class="box item-<%= index %>" data-id="<%= document.id %>">
|
7
8
|
<% if block_options[:thumbnail_image_url].present? %>
|
8
|
-
<%= link_to_document(document, image_tag(block_options[:thumbnail_image_url], class: 'img-thumbnail'), counter: -1) %>
|
9
|
+
<%= link_to_document(document, image_tag(block_options[:thumbnail_image_url], class: 'img-thumbnail', alt: doc_presenter.heading), counter: -1) %>
|
9
10
|
<% elsif block_options[:iiif_tilesource_base].present? %>
|
10
|
-
<%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!400,400/0/default.jpg', class: 'img-thumbnail'), counter: -1) %>
|
11
|
+
<%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!400,400/0/default.jpg', class: 'img-thumbnail', alt: doc_presenter.heading), counter: -1) %>
|
11
12
|
<% elsif has_thumbnail? document %>
|
12
|
-
<%= render_thumbnail_tag(document, { class: 'img-thumbnail'}, document_counter: -1) %>
|
13
|
+
<%= render_thumbnail_tag(document, { class: 'img-thumbnail', alt: doc_presenter.heading }, document_counter: -1) %>
|
13
14
|
<% end %>
|
14
15
|
</div>
|
15
16
|
<% end %>
|
@@ -18,7 +19,7 @@
|
|
18
19
|
|
19
20
|
|
20
21
|
<% if solr_documents_grid_block.text? %>
|
21
|
-
<div class="text-col col-md-3">
|
22
|
+
<div class="text-col col-md-3 mw-100">
|
22
23
|
<% unless solr_documents_grid_block.title.blank? %>
|
23
24
|
<h3><%= solr_documents_grid_block.title %></h3>
|
24
25
|
<% end %>
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<div class="content-block item-text row
|
2
|
-
<div class="items-col spotlight-flexbox <%= 'col-md-6' if uploaded_items_block.text? %> col-12 uploaded-items-block">
|
1
|
+
<div class="content-block item-text row d-block">
|
2
|
+
<div class="items-col spotlight-flexbox <%= 'col-md-6' if uploaded_items_block.text? %> col-12 <%= uploaded_items_block.content_align == 'right' ? 'float-right' : 'float-left' %> uploaded-items-block">
|
3
3
|
<% if uploaded_items_block.files.present? %>
|
4
4
|
<% uploaded_items_block.files.each do |file| %>
|
5
5
|
<div class="box" data-id="<%= file[:id] %>">
|
6
6
|
<div class="contents">
|
7
|
-
<img class="img-thumbnail" src='<%= file[:url] %>' alt='
|
7
|
+
<img class="img-thumbnail" src='<%= file[:url] %>' alt='' />
|
8
8
|
<% if file[:caption].present? %>
|
9
9
|
<div class="caption">
|
10
10
|
<%= file[:caption] %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<% if uploaded_items_block.text? %>
|
20
|
-
<div class="text-col col-md-6">
|
20
|
+
<div class="text-col col-md-6 mw-100">
|
21
21
|
<%= content_tag(:h3, uploaded_items_block.title) if uploaded_items_block.title.present? %>
|
22
22
|
<%= sir_trevor_markdown uploaded_items_block.text %>
|
23
23
|
</div>
|
@@ -27,7 +27,7 @@ en:
|
|
27
27
|
drag: Drag
|
28
28
|
helpers:
|
29
29
|
action:
|
30
|
-
add_another: Add another
|
30
|
+
add_another: Add another value
|
31
31
|
cancel: Cancel
|
32
32
|
destroy: Delete
|
33
33
|
destroy_are_you_sure: Are you sure you want to delete this %{model}?
|
@@ -207,9 +207,9 @@ en:
|
|
207
207
|
heading: Exhibit thumbnail
|
208
208
|
help: You can select and crop an image to visually represent this exhibit.
|
209
209
|
application_name: "%{exhibit} - %{application_name}"
|
210
|
+
breadcrumb:
|
211
|
+
label: Breadcrumb
|
210
212
|
browse:
|
211
|
-
index:
|
212
|
-
header: Browse Exhibit
|
213
213
|
search:
|
214
214
|
item_count:
|
215
215
|
one: "%{count} item"
|
@@ -363,6 +363,8 @@ en:
|
|
363
363
|
solr_document_activity:
|
364
364
|
header: Recently Updated Items
|
365
365
|
no_documents: There are no documents in this exhibit
|
366
|
+
exhibitnavbar:
|
367
|
+
label: Exhibit navigation
|
366
368
|
exhibits:
|
367
369
|
breadcrumb: Home
|
368
370
|
confirmation_status:
|
@@ -374,6 +376,7 @@ en:
|
|
374
376
|
email_delete_button: Delete contact
|
375
377
|
email_delete_confirmation: Delete contact email address?
|
376
378
|
email_delete_error: 'Problem deleting contact email:'
|
379
|
+
email_input_aria_label: Contact email %{index}
|
377
380
|
delete:
|
378
381
|
heading: Delete exhibit
|
379
382
|
warning_html: This action is irreversible. Be sure to back up the exhibit settings and content using the %{export_link} feature before proceeding.
|
@@ -744,8 +747,9 @@ en:
|
|
744
747
|
help_secondary: To create a browse category-specific masthead, you should use an image that is at least 120 pixels tall and 1200 pixels wide. For best results use an image at least 1800 pixels wide. You can crop larger images using the cropping tool below.
|
745
748
|
query_params: Search parameters
|
746
749
|
search_box:
|
750
|
+
checkbox_label: Display
|
747
751
|
help_block: Displays a search box that enables users to search within the browse category results
|
748
|
-
label:
|
752
|
+
label: Search box
|
749
753
|
search_description: Description
|
750
754
|
search_masthead: Masthead
|
751
755
|
search_thumbnail: Thumbnail
|
@@ -754,7 +758,7 @@ en:
|
|
754
758
|
index:
|
755
759
|
categories_header: Browse Categories
|
756
760
|
header: Browse
|
757
|
-
instructions: Use the Save search button on a search results page to create a new browse category. Select the categories you want to be displayed on the browse landing page. Drag and drop categories to change the order in which they appear on that page.
|
761
|
+
instructions: Use the Save search button on a search results page to create a new browse category. Select the categories you want to be displayed on the browse landing page. Drag and drop categories to change the order in which they appear on that page.
|
758
762
|
no_saved_searches: You can save search results while in curation mode to create browse categories, which will be displayed here.
|
759
763
|
not_searchable_html: This exhibit is not currently searchable. To perform searches that can be saved as additional browse categories, temporarily turn on the Display search box option in the Options section of the Configuration > %{href} page.
|
760
764
|
title: Curation - Browse
|
@@ -764,6 +768,8 @@ en:
|
|
764
768
|
other: "%{count} items"
|
765
769
|
missing_description_html: "%{link} to add a description."
|
766
770
|
shared:
|
771
|
+
exhibit_sidebar:
|
772
|
+
header: Administration menu
|
767
773
|
report_a_problem:
|
768
774
|
honeypot_field_explanation: Ignore this text box. It is used to detect spammers. If you enter anything into this text box, your message will not be sent.
|
769
775
|
title: Contact Us
|
@@ -806,6 +812,8 @@ en:
|
|
806
812
|
no_tags: No items in this exhibit have been tagged. You can add tags to an item on the Item Details page while in curation mode.
|
807
813
|
taggings:
|
808
814
|
count: Items tagged
|
815
|
+
topbar:
|
816
|
+
label: Utilities
|
809
817
|
versions:
|
810
818
|
redo: Redo changes
|
811
819
|
undo: Undo changes
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
es:
|
3
|
+
about_pages:
|
4
|
+
contacts:
|
5
|
+
header: Contacto
|
6
|
+
activemodel:
|
7
|
+
attributes:
|
8
|
+
spotlight/contact_form:
|
9
|
+
email: Correo electrónico
|
10
|
+
message: Mensage
|
11
|
+
name: Nombre
|
12
|
+
browse:
|
13
|
+
search:
|
14
|
+
item_count:
|
15
|
+
one: "%{count} registros"
|
16
|
+
other: "%{count} registros"
|
17
|
+
search_box:
|
18
|
+
label: Buscar en esta categoría
|
19
|
+
placeholder: Buscar
|
20
|
+
reset: Limpiar
|
21
|
+
submit: Buscar en esta categoría
|
22
|
+
success:
|
23
|
+
expand_html: También puede buscar todos los elementos recuperados %{browse_query}.
|
24
|
+
result_number_html: Su búsqueda coincide con %{search_size} de elementos de las %{parent_search_count} en esta categoría.
|
25
|
+
zero_results:
|
26
|
+
expand_html: Puede %{clear_search_url} borrar su búsqueda o interntar otra que busque en todos los elementos %{browse_query}.
|
27
|
+
result_number: No se encuentran registos con esta búsqueda.
|
28
|
+
header_links:
|
29
|
+
contact: Comentarios
|
30
|
+
helpers:
|
31
|
+
action:
|
32
|
+
cancel: Cancelar
|
33
|
+
submit:
|
34
|
+
contact_form:
|
35
|
+
create: Enviar
|
36
|
+
created: Gracias. Hemos recibido sus comentarios.
|
37
|
+
shared:
|
38
|
+
report_a_problem:
|
39
|
+
honeypot_field_explanation: No escribir en espacio. Es para detectar "spam." Si escribe algo el mensaje no se enviará.
|
40
|
+
title: Contacto
|
@@ -0,0 +1,25 @@
|
|
1
|
+
pt-BR:
|
2
|
+
activemodel:
|
3
|
+
attributes:
|
4
|
+
spotlight/contact_form:
|
5
|
+
email: Email
|
6
|
+
message: Mensagem
|
7
|
+
name: Nome
|
8
|
+
cancel: Cancelar
|
9
|
+
helpers:
|
10
|
+
action:
|
11
|
+
cancel: Cancelar
|
12
|
+
submit:
|
13
|
+
contact_form:
|
14
|
+
create: Enviar
|
15
|
+
created: Obrigado. Seu comentário foi enviado.
|
16
|
+
spotlight:
|
17
|
+
about_pages:
|
18
|
+
contacts:
|
19
|
+
header: Contatos
|
20
|
+
header_links:
|
21
|
+
contact: Comentários
|
22
|
+
shared:
|
23
|
+
report_a_problem:
|
24
|
+
honeypot_field_explanation: Ignore esta caixa de texto. É usado para detectar spammer. Se você digitar algo nessa caixa de texto, sua mensagem não será enviada.
|
25
|
+
title: Contate-Nos
|
data/config/routes.rb
CHANGED
@@ -8,7 +8,7 @@ Spotlight::Engine.routes.draw do
|
|
8
8
|
resources :mastheads, controller: :featured_images, only: :create
|
9
9
|
resources :featured_images, only: :create
|
10
10
|
|
11
|
-
resource :site, only: [
|
11
|
+
resource :site, only: %i[edit update] do
|
12
12
|
collection do
|
13
13
|
get '/tags', to: 'sites#tags'
|
14
14
|
end
|
@@ -16,7 +16,7 @@ Spotlight::Engine.routes.draw do
|
|
16
16
|
|
17
17
|
get '/exhibits/edit', to: 'sites#edit_exhibits', as: 'edit_site_exhibits'
|
18
18
|
|
19
|
-
resources :admin_users, only: [
|
19
|
+
resources :admin_users, only: %i[index create update destroy]
|
20
20
|
|
21
21
|
resources :exhibits, path: '/', except: [:show] do
|
22
22
|
member do
|
@@ -28,17 +28,17 @@ Spotlight::Engine.routes.draw do
|
|
28
28
|
|
29
29
|
resources :contact_email, only: [:destroy], defaults: { format: :json }
|
30
30
|
resources :attachments, only: :create
|
31
|
-
resource :contact_form, path: 'contact', only: [
|
31
|
+
resource :contact_form, path: 'contact', only: %i[new create]
|
32
32
|
resource :blacklight_configuration, only: [:update]
|
33
33
|
|
34
|
-
resource :appearance, only: [
|
34
|
+
resource :appearance, only: %i[edit update]
|
35
35
|
|
36
|
-
resource :metadata_configuration, only: [
|
37
|
-
resource :search_configuration, only: [
|
36
|
+
resource :metadata_configuration, only: %i[show edit update]
|
37
|
+
resource :search_configuration, only: %i[show edit update]
|
38
38
|
resource :view_configuration, only: [:show]
|
39
39
|
|
40
|
-
resources :filters, only: [
|
41
|
-
resources :languages, only: [
|
40
|
+
resources :filters, only: %i[create update]
|
41
|
+
resources :languages, only: %i[create destroy]
|
42
42
|
|
43
43
|
concern :searchable, Blacklight::Routes::Searchable.new
|
44
44
|
|
@@ -99,10 +99,10 @@ Spotlight::Engine.routes.draw do
|
|
99
99
|
get :autocomplete
|
100
100
|
end
|
101
101
|
end
|
102
|
-
resources :browse, only: [
|
103
|
-
resources :tags, only: [
|
102
|
+
resources :browse, only: %i[index show]
|
103
|
+
resources :tags, only: %i[index destroy]
|
104
104
|
|
105
|
-
resources :contacts, only: [
|
105
|
+
resources :contacts, only: %i[edit update destroy]
|
106
106
|
|
107
107
|
resources :pages, only: [:update_all] do
|
108
108
|
collection do
|
@@ -115,7 +115,7 @@ Spotlight::Engine.routes.draw do
|
|
115
115
|
end
|
116
116
|
collection do
|
117
117
|
patch 'contacts' => 'about_pages#update_contacts'
|
118
|
-
resources :contacts, only: [
|
118
|
+
resources :contacts, only: %i[new create]
|
119
119
|
patch :update_all
|
120
120
|
end
|
121
121
|
end
|
@@ -137,13 +137,13 @@ Spotlight::Engine.routes.draw do
|
|
137
137
|
|
138
138
|
resources :lock, only: [:destroy]
|
139
139
|
|
140
|
-
resources :roles, path: 'users', only: [
|
140
|
+
resources :roles, path: 'users', only: %i[index create destroy] do
|
141
141
|
collection do
|
142
142
|
patch :update_all
|
143
143
|
end
|
144
144
|
end
|
145
145
|
post 'solr/update' => 'solr#update'
|
146
|
-
resource :translations, only: [
|
146
|
+
resource :translations, only: %i[edit update]
|
147
147
|
end
|
148
148
|
|
149
149
|
get '/:exhibit_id' => 'home_pages#show', as: :exhibit_root
|
@@ -6,7 +6,7 @@ module Spotlight
|
|
6
6
|
##
|
7
7
|
# spotlight:install generator
|
8
8
|
class Install < Rails::Generators::Base
|
9
|
-
source_root File.expand_path('
|
9
|
+
source_root File.expand_path('templates', __dir__)
|
10
10
|
class_option :solr_update_class, type: :string, default: 'Spotlight::SolrDocument::AtomicUpdates'
|
11
11
|
class_option :mailer_default_url_host, type: :string, default: '' # e.g. localhost:3000
|
12
12
|
|
@@ -6,7 +6,7 @@ require 'rails/generators'
|
|
6
6
|
module Spotlight
|
7
7
|
# spotlight:scaffold_resource generator
|
8
8
|
class ScaffoldResource < Rails::Generators::NamedBase
|
9
|
-
source_root File.expand_path('
|
9
|
+
source_root File.expand_path('templates', __dir__)
|
10
10
|
def create_document_builder
|
11
11
|
create_file "app/services/#{file_name}_builder.rb", <<-FILE.strip_heredoc
|
12
12
|
class #{class_name}Builder < Spotlight::SolrDocumentBuilder
|
@@ -11,11 +11,11 @@ if Translation.table_exists?
|
|
11
11
|
# turn on the ActiveRecord backend, uncomment the following lines.
|
12
12
|
|
13
13
|
I18n.backend = I18n::Backend::ActiveRecord.new
|
14
|
-
I18n::Backend::ActiveRecord.
|
15
|
-
Translation.
|
16
|
-
I18n::Backend::Simple.
|
17
|
-
I18n::Backend::Simple.
|
18
|
-
I18n::Backend::Simple.
|
14
|
+
I18n::Backend::ActiveRecord.include I18n::Backend::Memoize
|
15
|
+
Translation.include Spotlight::CustomTranslationExtension
|
16
|
+
I18n::Backend::Simple.include I18n::Backend::Memoize
|
17
|
+
I18n::Backend::Simple.include I18n::Backend::Pluralization
|
18
|
+
I18n::Backend::Simple.include I18n::Backend::Fallbacks
|
19
19
|
|
20
20
|
I18n.backend = I18n::Backend::Chain.new(I18n.backend, I18n::Backend::Simple.new)
|
21
21
|
end
|
data/lib/spotlight/engine.rb
CHANGED
@@ -7,7 +7,6 @@ require 'devise'
|
|
7
7
|
require 'devise_invitable'
|
8
8
|
|
9
9
|
require 'blacklight'
|
10
|
-
require 'blacklight/oembed'
|
11
10
|
require 'autoprefixer-rails'
|
12
11
|
require 'friendly_id'
|
13
12
|
require 'tophat'
|
@@ -21,7 +20,7 @@ require 'riiif'
|
|
21
20
|
module Spotlight
|
22
21
|
##
|
23
22
|
# Spotlight::Engine
|
24
|
-
# rubocop:disable ClassLength
|
23
|
+
# rubocop:disable Metrics/ClassLength
|
25
24
|
class Engine < ::Rails::Engine
|
26
25
|
isolate_namespace Spotlight
|
27
26
|
# Breadcrumbs on rails must be required outside of an initializer or it doesn't get loaded.
|
@@ -42,13 +41,13 @@ module Spotlight
|
|
42
41
|
require 'sprockets/es6'
|
43
42
|
require 'almond-rails'
|
44
43
|
|
45
|
-
config.assets.precompile += %w
|
44
|
+
config.assets.precompile += %w[spotlight/fallback/*.png]
|
46
45
|
|
47
|
-
config.autoload_paths += %W
|
46
|
+
config.autoload_paths += %W[
|
48
47
|
#{config.root}/app/builders
|
49
48
|
#{config.root}/app/controllers/concerns
|
50
49
|
#{config.root}/app/models/concerns
|
51
|
-
|
50
|
+
]
|
52
51
|
|
53
52
|
initializer 'spotlight.initialize' do
|
54
53
|
require 'cancan'
|
@@ -64,11 +63,11 @@ module Spotlight
|
|
64
63
|
end
|
65
64
|
|
66
65
|
initializer 'spotlight.factories', after: 'factory_bot.set_factory_paths' do
|
67
|
-
FactoryBot.definition_file_paths << File.expand_path('
|
66
|
+
FactoryBot.definition_file_paths << File.expand_path('../../spec/factories', __dir__) if defined?(FactoryBot)
|
68
67
|
end
|
69
68
|
|
70
69
|
initializer 'spotlight.assets.precompile' do |app|
|
71
|
-
app.config.assets.precompile += %w
|
70
|
+
app.config.assets.precompile += %w[spotlight/default_thumbnail.jpg spotlight/default_browse_thumbnail.jpg]
|
72
71
|
|
73
72
|
Sprockets::ES6.configuration = { 'modules' => 'amd', 'moduleIds' => true }
|
74
73
|
# When we upgrade to Sprockets 4, we can ditch sprockets-es6 and config AMD
|
@@ -93,7 +92,7 @@ module Spotlight
|
|
93
92
|
config.catalog_controller_class = '::CatalogController'
|
94
93
|
config.default_blacklight_config = nil
|
95
94
|
|
96
|
-
config.exhibit_main_navigation = [
|
95
|
+
config.exhibit_main_navigation = %i[curated_features browse about]
|
97
96
|
|
98
97
|
config.resource_partials = [
|
99
98
|
'spotlight/resources/external_resources_form',
|
@@ -114,7 +113,7 @@ module Spotlight
|
|
114
113
|
config.writable_index = true
|
115
114
|
|
116
115
|
# The allowed file extensions for uploading non-repository items.
|
117
|
-
config.allowed_upload_extensions = %w
|
116
|
+
config.allowed_upload_extensions = %w[jpg jpeg png]
|
118
117
|
|
119
118
|
# Suffixes for spotlight-created solr fields
|
120
119
|
config.solr_fields = OpenStruct.new
|
@@ -241,16 +240,18 @@ module Spotlight
|
|
241
240
|
end
|
242
241
|
|
243
242
|
# make blacklight configuration play nice with bootstrap_form
|
243
|
+
# rubocop:disable Lint/SendWithMixinArgument
|
244
244
|
Blacklight::OpenStructWithHashAccess.send(:extend, ActiveModel::Translation)
|
245
|
+
# rubocop:enable Lint/SendWithMixinArgument
|
245
246
|
|
246
247
|
config.exhibit_themes = ['default']
|
247
248
|
|
248
249
|
config.default_page_content_type = 'SirTrevor'
|
249
|
-
config.sir_trevor_widgets = %w
|
250
|
+
config.sir_trevor_widgets = %w[
|
250
251
|
Heading Text List Quote Iframe Video Oembed Rule UploadedItems Browse LinkToSearch
|
251
252
|
FeaturedPages SolrDocuments SolrDocumentsCarousel SolrDocumentsEmbed
|
252
253
|
SolrDocumentsFeatures SolrDocumentsGrid SearchResults
|
253
|
-
|
254
|
+
]
|
254
255
|
|
255
256
|
config.routes = OpenStruct.new
|
256
257
|
config.routes.solr_documents = {}
|
data/lib/spotlight/version.rb
CHANGED
@@ -67,7 +67,7 @@ namespace :spotlight do
|
|
67
67
|
require 'migration/iiif'
|
68
68
|
Migration::IIIF.run args[:hostname]
|
69
69
|
else
|
70
|
-
|
70
|
+
warn "\nUsage: rake spotlight:migrate_to_iiif[hostname]\n\n Example: rake spotlight:migrate_to_iiif[https://exhibits.stanford.edu]\n\n"
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
@@ -82,7 +82,7 @@ namespace :spotlight do
|
|
82
82
|
puts 'User not found. Enter a password to create the user.'
|
83
83
|
u.password = prompt_for_password
|
84
84
|
end
|
85
|
-
rescue => e
|
85
|
+
rescue StandardError => e
|
86
86
|
puts e
|
87
87
|
retry
|
88
88
|
end
|
@@ -3,12 +3,14 @@
|
|
3
3
|
describe Spotlight::AboutPagesController, type: :controller, versioning: true do
|
4
4
|
routes { Spotlight::Engine.routes }
|
5
5
|
let(:valid_attributes) { { 'title' => 'MyString', thumbnail: { iiif_url: '' } } }
|
6
|
+
|
6
7
|
after do
|
7
8
|
I18n.locale = I18n.default_locale
|
8
9
|
end
|
9
10
|
|
10
11
|
describe 'when not logged in' do
|
11
12
|
let(:exhibit) { FactoryBot.create(:exhibit) }
|
13
|
+
|
12
14
|
describe 'POST update_all' do
|
13
15
|
it 'is not allowed' do
|
14
16
|
post :update_all, params: { exhibit_id: exhibit }
|
@@ -30,11 +32,13 @@ describe Spotlight::AboutPagesController, type: :controller, versioning: true do
|
|
30
32
|
describe 'when signed in as a curator' do
|
31
33
|
let(:exhibit) { FactoryBot.create(:exhibit) }
|
32
34
|
let(:user) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) }
|
35
|
+
|
33
36
|
before { sign_in user }
|
34
37
|
|
35
38
|
describe 'GET show' do
|
36
39
|
let(:page) { FactoryBot.create(:about_page, weight: 0, exhibit: exhibit) }
|
37
40
|
let(:page2) { FactoryBot.create(:about_page, weight: 5, exhibit: exhibit) }
|
41
|
+
|
38
42
|
describe 'on the main about page' do
|
39
43
|
it 'is successful' do
|
40
44
|
expect(controller).to receive(:add_breadcrumb).with('Home', exhibit_root_path(exhibit))
|
@@ -104,6 +108,7 @@ describe Spotlight::AboutPagesController, type: :controller, versioning: true do
|
|
104
108
|
describe 'GET edit' do
|
105
109
|
let!(:page) { FactoryBot.create(:about_page, weight: 0, exhibit: exhibit) }
|
106
110
|
let!(:page2) { FactoryBot.create(:about_page, weight: 5, exhibit: exhibit) }
|
111
|
+
|
107
112
|
describe 'on the main about page' do
|
108
113
|
it 'is successful' do
|
109
114
|
expect(controller).to receive(:add_breadcrumb).with('Home', exhibit_root_path(exhibit))
|
@@ -128,6 +133,7 @@ describe Spotlight::AboutPagesController, type: :controller, versioning: true do
|
|
128
133
|
|
129
134
|
describe 'GET index' do
|
130
135
|
let!(:page) { FactoryBot.create(:about_page, exhibit: exhibit) }
|
136
|
+
|
131
137
|
it 'is successful' do
|
132
138
|
expect(controller).to receive(:add_breadcrumb).with('Home', exhibit_root_path(exhibit))
|
133
139
|
expect(controller).to receive(:add_breadcrumb).with('Curation', exhibit_dashboard_path(exhibit))
|
@@ -149,6 +155,7 @@ describe Spotlight::AboutPagesController, type: :controller, versioning: true do
|
|
149
155
|
|
150
156
|
describe 'PUT update' do
|
151
157
|
let!(:page) { FactoryBot.create(:about_page, exhibit: exhibit) }
|
158
|
+
|
152
159
|
it 'redirects to the about page' do
|
153
160
|
put :update, params: { id: page, exhibit_id: page.exhibit.id, about_page: valid_attributes }
|
154
161
|
page.reload
|
@@ -161,6 +168,7 @@ describe Spotlight::AboutPagesController, type: :controller, versioning: true do
|
|
161
168
|
let!(:page1) { FactoryBot.create(:about_page, exhibit: exhibit) }
|
162
169
|
let!(:page2) { FactoryBot.create(:about_page, exhibit: exhibit, published: true) }
|
163
170
|
let!(:page3) { FactoryBot.create(:about_page, exhibit: exhibit, published: true) }
|
171
|
+
|
164
172
|
before { request.env['HTTP_REFERER'] = 'http://example.com' }
|
165
173
|
|
166
174
|
it 'updates whether they are on the landing page' do
|
@@ -185,6 +193,7 @@ describe Spotlight::AboutPagesController, type: :controller, versioning: true do
|
|
185
193
|
describe 'PATCH update_contacts' do
|
186
194
|
let!(:contact1) { FactoryBot.create(:contact, name: 'Aphra Behn', exhibit: exhibit) }
|
187
195
|
let!(:contact2) { FactoryBot.create(:contact, exhibit: exhibit) }
|
196
|
+
|
188
197
|
it 'updates contacts' do
|
189
198
|
patch :update_contacts, params: {
|
190
199
|
exhibit_id: exhibit,
|
@@ -202,6 +211,7 @@ describe Spotlight::AboutPagesController, type: :controller, versioning: true do
|
|
202
211
|
expect(contact1.reload.weight).to eq 1
|
203
212
|
expect(contact2.reload.weight).to eq 2
|
204
213
|
end
|
214
|
+
|
205
215
|
it 'shows index on failure' do
|
206
216
|
expect_any_instance_of(Spotlight::Exhibit).to receive(:update).and_return(false)
|
207
217
|
patch :update_contacts, params: {
|