blacklight-spotlight 3.2.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/assets/stylesheets/spotlight/_breadcrumbs.scss +2 -4
- data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +2 -2
- data/app/controllers/concerns/spotlight/controller.rb +13 -12
- data/app/controllers/spotlight/attachments_controller.rb +1 -1
- data/app/controllers/spotlight/custom_search_fields_controller.rb +1 -1
- data/app/controllers/spotlight/pages_controller.rb +2 -2
- data/app/controllers/spotlight/roles_controller.rb +1 -1
- data/app/controllers/spotlight/searches_controller.rb +6 -1
- data/app/helpers/spotlight/application_helper.rb +1 -1
- data/app/helpers/spotlight/main_app_helpers.rb +1 -1
- data/app/helpers/spotlight/pages_helper.rb +12 -0
- data/app/helpers/spotlight/title_helper.rb +0 -2
- data/app/mailers/spotlight/confirmation_mailer.rb +2 -1
- data/app/models/sir_trevor_rails/block.rb +85 -0
- data/app/models/sir_trevor_rails/blocks/displayable.rb +1 -1
- data/app/models/spotlight/contact_email.rb +1 -1
- data/app/models/spotlight/page_configurations.rb +1 -1
- data/app/models/spotlight/page_content/sir_trevor.rb +13 -4
- data/app/models/translation.rb +18 -0
- data/app/services/spotlight/exhibit_import_export_service.rb +1 -1
- data/app/views/shared/_site_sidebar.html.erb +1 -1
- data/app/views/spotlight/catalog/admin.html.erb +1 -1
- data/app/views/spotlight/confirmation_mailer/confirmation_instructions.html.erb +3 -3
- data/app/views/spotlight/exhibits/_import.html.erb +1 -1
- data/app/views/spotlight/exhibits/_languages.html.erb +2 -2
- data/app/views/spotlight/filters/_form.html.erb +1 -1
- data/app/views/spotlight/resources/upload/_form.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_document_index_view_types.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_facet_metadata.html.erb +4 -2
- data/app/views/spotlight/search_configurations/_facets.html.erb +1 -1
- data/app/views/spotlight/searches/_form.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_video_block.html.erb +5 -0
- data/app/views/spotlight/translations/_browse_categories.html.erb +1 -1
- data/app/views/spotlight/translations/_groups.html.erb +1 -1
- data/app/views/spotlight/translations/_import.html.erb +1 -1
- data/app/views/spotlight/translations/_metadata.html.erb +1 -1
- data/app/views/spotlight/translations/_search_fields.html.erb +1 -1
- data/config/i18n-tasks.yml +2 -1
- data/config/locales/spotlight.de.yml +40 -0
- data/config/locales/spotlight.en.yml +12 -3
- data/lib/generators/spotlight/install_generator.rb +40 -2
- data/lib/generators/spotlight/templates/config/initializers/translation.rb +15 -13
- data/lib/generators/spotlight/templates/solr/config/schema.xml +32 -50
- data/lib/generators/spotlight/templates/solr/config/solrconfig.xml +14 -12
- data/lib/spotlight/engine.rb +4 -2
- data/lib/spotlight/version.rb +1 -1
- data/lib/tasks/spotlight_tasks.rake +40 -5
- metadata +110 -621
- data/lib/generators/spotlight/templates/config/initializers/sir_trevor_rails.rb +0 -10
- data/spec/controllers/application_controller_spec.rb +0 -30
- data/spec/controllers/spotlight/about_pages_controller_spec.rb +0 -241
- data/spec/controllers/spotlight/admin_users_controller_spec.rb +0 -53
- data/spec/controllers/spotlight/appearances_controller_spec.rb +0 -88
- data/spec/controllers/spotlight/application_controller_spec.rb +0 -11
- data/spec/controllers/spotlight/attachments_controller_spec.rb +0 -28
- data/spec/controllers/spotlight/browse_controller_spec.rb +0 -133
- data/spec/controllers/spotlight/bulk_actions_controller_spec.rb +0 -124
- data/spec/controllers/spotlight/bulk_updates_controller_spec.rb +0 -77
- data/spec/controllers/spotlight/catalog_controller_spec.rb +0 -552
- data/spec/controllers/spotlight/confirmations_controller_spec.rb +0 -38
- data/spec/controllers/spotlight/contact_email_controller_spec.rb +0 -65
- data/spec/controllers/spotlight/contact_forms_controller_spec.rb +0 -38
- data/spec/controllers/spotlight/contacts_controller_spec.rb +0 -103
- data/spec/controllers/spotlight/custom_fields_controller_spec.rb +0 -62
- data/spec/controllers/spotlight/custom_search_fields_controller_spec.rb +0 -62
- data/spec/controllers/spotlight/dashboards_controller_spec.rb +0 -68
- data/spec/controllers/spotlight/exhibits_controller_spec.rb +0 -216
- data/spec/controllers/spotlight/feature_pages_controller_spec.rb +0 -251
- data/spec/controllers/spotlight/featured_images_controller_spec.rb +0 -77
- data/spec/controllers/spotlight/filters_controller_spec.rb +0 -72
- data/spec/controllers/spotlight/groups_controller_spec.rb +0 -103
- data/spec/controllers/spotlight/home_pages_controller_spec.rb +0 -126
- data/spec/controllers/spotlight/job_trackers_controller_spec.rb +0 -37
- data/spec/controllers/spotlight/languages_controller_spec.rb +0 -70
- data/spec/controllers/spotlight/metadata_configurations_controller_spec.rb +0 -93
- data/spec/controllers/spotlight/pages_controller_spec.rb +0 -50
- data/spec/controllers/spotlight/resources/csv_upload_controller_spec.rb +0 -71
- data/spec/controllers/spotlight/resources/upload_controller_spec.rb +0 -55
- data/spec/controllers/spotlight/resources_controller_spec.rb +0 -85
- data/spec/controllers/spotlight/roles_controller_spec.rb +0 -141
- data/spec/controllers/spotlight/search_configurations_controller_spec.rb +0 -141
- data/spec/controllers/spotlight/searches_controller_spec.rb +0 -195
- data/spec/controllers/spotlight/sites_controller_spec.rb +0 -67
- data/spec/controllers/spotlight/solr_controller_spec.rb +0 -116
- data/spec/controllers/spotlight/tags_controller_spec.rb +0 -56
- data/spec/controllers/spotlight/translations_controller_spec.rb +0 -132
- data/spec/controllers/spotlight/versions_controller_spec.rb +0 -56
- data/spec/controllers/spotlight/view_configurations_controller_spec.rb +0 -35
- data/spec/examples.txt +0 -1506
- data/spec/factories/bulk_updates.rb +0 -21
- data/spec/factories/contact_emails.rb +0 -8
- data/spec/factories/contact_images.rb +0 -8
- data/spec/factories/contacts.rb +0 -11
- data/spec/factories/custom_fields.rb +0 -9
- data/spec/factories/custom_search_fields.rb +0 -9
- data/spec/factories/exhibit_thumbnails.rb +0 -8
- data/spec/factories/exhibits.rb +0 -17
- data/spec/factories/featured_images.rb +0 -16
- data/spec/factories/group.rb +0 -17
- data/spec/factories/job_trackers.rb +0 -11
- data/spec/factories/language.rb +0 -8
- data/spec/factories/main_navigation.rb +0 -9
- data/spec/factories/pages.rb +0 -34
- data/spec/factories/resources.rb +0 -14
- data/spec/factories/roles.rb +0 -9
- data/spec/factories/searches.rb +0 -33
- data/spec/factories/tags.rb +0 -14
- data/spec/factories/translation.rb +0 -8
- data/spec/factories/users.rb +0 -50
- data/spec/features/about_page_spec.rb +0 -46
- data/spec/features/add_contacts_spec.rb +0 -63
- data/spec/features/add_custom_field_metadata_spec.rb +0 -88
- data/spec/features/add_iiif_manifest_spec.rb +0 -46
- data/spec/features/add_items_spec.rb +0 -135
- data/spec/features/autocomplete_typeahead_spec.rb +0 -88
- data/spec/features/browse_category_admin_spec.rb +0 -163
- data/spec/features/browse_category_navigation_spec.rb +0 -44
- data/spec/features/browse_category_spec.rb +0 -158
- data/spec/features/bulk_actions_spec.rb +0 -72
- data/spec/features/catalog_spec.rb +0 -57
- data/spec/features/confirm_email_spec.rb +0 -21
- data/spec/features/create_exhibit_spec.rb +0 -65
- data/spec/features/create_page_spec.rb +0 -21
- data/spec/features/dashboard_spec.rb +0 -34
- data/spec/features/edit_contact_spec.rb +0 -21
- data/spec/features/edit_search_fields_spec.rb +0 -79
- data/spec/features/exhibit_masthead_spec.rb +0 -112
- data/spec/features/exhibit_themes_spec.rb +0 -28
- data/spec/features/exhibits/add_tags_spec.rb +0 -35
- data/spec/features/exhibits/administration_spec.rb +0 -141
- data/spec/features/exhibits/custom_metadata_fields_spec.rb +0 -97
- data/spec/features/exhibits/custom_search_fields_spec.rb +0 -55
- data/spec/features/exhibits/edit_metadata_fields_spec.rb +0 -49
- data/spec/features/exhibits/language_create_edit_spec.rb +0 -59
- data/spec/features/exhibits/translation_editing_spec.rb +0 -463
- data/spec/features/exhibits_index_spec.rb +0 -55
- data/spec/features/feature_page_spec.rb +0 -155
- data/spec/features/home_page_spec.rb +0 -102
- data/spec/features/import_exhibit_spec.rb +0 -58
- data/spec/features/item_admin_spec.rb +0 -59
- data/spec/features/javascript/about_page_admin_spec.rb +0 -21
- data/spec/features/javascript/block_controls_spec.rb +0 -42
- data/spec/features/javascript/blocks/browse_group_categories_block_spec.rb +0 -64
- data/spec/features/javascript/blocks/featured_browse_categories_block_spec.rb +0 -46
- data/spec/features/javascript/blocks/featured_pages_block_spec.rb +0 -61
- data/spec/features/javascript/blocks/link_to_search_block_spec.rb +0 -46
- data/spec/features/javascript/blocks/rule_block_spec.rb +0 -23
- data/spec/features/javascript/blocks/search_result_block_spec.rb +0 -47
- data/spec/features/javascript/blocks/solr_documents_block_spec.rb +0 -230
- data/spec/features/javascript/blocks/solr_documents_carousel_block_spec.rb +0 -29
- data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +0 -94
- data/spec/features/javascript/browse_group_admin_spec.rb +0 -45
- data/spec/features/javascript/edit_in_place_spec.rb +0 -93
- data/spec/features/javascript/feature_page_admin_spec.rb +0 -140
- data/spec/features/javascript/home_page_edit_spec.rb +0 -34
- data/spec/features/javascript/locale_selector_spec.rb +0 -66
- data/spec/features/javascript/metadata_admin_spec.rb +0 -41
- data/spec/features/javascript/multi_image_select_spec.rb +0 -50
- data/spec/features/javascript/reindex_monitor_spec.rb +0 -23
- data/spec/features/javascript/roles_admin_spec.rb +0 -38
- data/spec/features/javascript/search_config_admin_spec.rb +0 -140
- data/spec/features/javascript/search_context_spec.rb +0 -88
- data/spec/features/main_navigation_spec.rb +0 -96
- data/spec/features/metadata_admin_spec.rb +0 -18
- data/spec/features/report_a_problem_spec.rb +0 -62
- data/spec/features/site_masthead_spec.rb +0 -91
- data/spec/features/site_users_management_spec.rb +0 -74
- data/spec/features/slideshow_spec.rb +0 -21
- data/spec/features/translation_scope_spec.rb +0 -27
- data/spec/fixtures/800x600.png +0 -0
- data/spec/fixtures/avatar.png +0 -0
- data/spec/fixtures/bulk-update-template.csv +0 -57
- data/spec/fixtures/csv-upload-fixture.csv +0 -4
- data/spec/fixtures/gk446cj2442-manifest.json +0 -58
- data/spec/fixtures/iiif_responses.rb +0 -312
- data/spec/fixtures/json-upload-fixture.json +0 -3
- data/spec/fixtures/sample_solr_documents.yml +0 -9385
- data/spec/fixtures/updated-bulk-update-template-no-cols.csv +0 -4
- data/spec/fixtures/updated-bulk-update-template-w-tags.csv +0 -4
- data/spec/fixtures/updated-bulk-update-template.csv +0 -4
- data/spec/helpers/spotlight/application_helper_spec.rb +0 -196
- data/spec/helpers/spotlight/browse_helper_spec.rb +0 -13
- data/spec/helpers/spotlight/crop_helper_spec.rb +0 -11
- data/spec/helpers/spotlight/crud_link_helpers_spec.rb +0 -163
- data/spec/helpers/spotlight/languages_helper_spec.rb +0 -79
- data/spec/helpers/spotlight/main_app_helpers_spec.rb +0 -101
- data/spec/helpers/spotlight/masthead_helper_spec.rb +0 -51
- data/spec/helpers/spotlight/meta_helper_spec.rb +0 -33
- data/spec/helpers/spotlight/navbar_helper_spec.rb +0 -24
- data/spec/helpers/spotlight/pages_helper_spec.rb +0 -123
- data/spec/helpers/spotlight/roles_helper_spec.rb +0 -7
- data/spec/helpers/spotlight/search_configurations_helper_spec.rb +0 -23
- data/spec/helpers/spotlight/title_helper_spec.rb +0 -64
- data/spec/helpers/spotlight/translations_helper_spec.rb +0 -16
- data/spec/i18n_spec.rb +0 -28
- data/spec/jobs/spotlight/add_tags_job_spec.rb +0 -34
- data/spec/jobs/spotlight/add_uploads_from_csv_spec.rb +0 -58
- data/spec/jobs/spotlight/change_visibility_job_spec.rb +0 -30
- data/spec/jobs/spotlight/default_thumbnail_job_spec.rb +0 -14
- data/spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb +0 -86
- data/spec/jobs/spotlight/reindex_exhibit_job_spec.rb +0 -43
- data/spec/jobs/spotlight/reindex_job_spec.rb +0 -79
- data/spec/jobs/spotlight/remove_tags_job_spec.rb +0 -39
- data/spec/jobs/spotlight/rename_sidecar_field_job_spec.rb +0 -33
- data/spec/lib/migration/iiif_spec.rb +0 -91
- data/spec/lib/migration/page_language_spec.rb +0 -25
- data/spec/lib/spotlight/catalog_spec.rb +0 -0
- data/spec/lib/spotlight/controller_spec.rb +0 -102
- data/spec/lib/spotlight/upload_field_config_spec.rb +0 -40
- data/spec/mailers/spotlight/indexing_complete_mailer_spec.rb +0 -42
- data/spec/models/sir_trevor_rails/blocks/browse_block_spec.rb +0 -42
- data/spec/models/sir_trevor_rails/blocks/browse_group_categories_block_spec.rb +0 -41
- data/spec/models/sir_trevor_rails/blocks/featured_pages_block_spec.rb +0 -50
- data/spec/models/sir_trevor_rails/blocks/search_results_block_spec.rb +0 -23
- data/spec/models/sir_trevor_rails/blocks/solr_documents_block_spec.rb +0 -59
- data/spec/models/sir_trevor_rails/blocks/textable_spec.rb +0 -42
- data/spec/models/solr_document_spec.rb +0 -214
- data/spec/models/spotlight/ability_spec.rb +0 -118
- data/spec/models/spotlight/about_page_spec.rb +0 -19
- data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +0 -82
- data/spec/models/spotlight/analytics/ga_spec.rb +0 -22
- data/spec/models/spotlight/background_job_progress_spec.rb +0 -137
- data/spec/models/spotlight/blacklight_configuration_spec.rb +0 -649
- data/spec/models/spotlight/browse_category_search_builder_spec.rb +0 -49
- data/spec/models/spotlight/contact_email_spec.rb +0 -48
- data/spec/models/spotlight/contact_form_spec.rb +0 -94
- data/spec/models/spotlight/contact_image_spec.rb +0 -11
- data/spec/models/spotlight/contact_spec.rb +0 -38
- data/spec/models/spotlight/custom_field_spec.rb +0 -204
- data/spec/models/spotlight/custom_search_field_spec.rb +0 -56
- data/spec/models/spotlight/custom_translation_extension_spec.rb +0 -24
- data/spec/models/spotlight/exhibit_spec.rb +0 -383
- data/spec/models/spotlight/exhibit_thumbnail_spec.rb +0 -10
- data/spec/models/spotlight/feature_page_spec.rb +0 -87
- data/spec/models/spotlight/featured_image_spec.rb +0 -110
- data/spec/models/spotlight/field_metadata_spec.rb +0 -58
- data/spec/models/spotlight/filter_spec.rb +0 -19
- data/spec/models/spotlight/group_spec.rb +0 -19
- data/spec/models/spotlight/home_page_spec.rb +0 -38
- data/spec/models/spotlight/language_spec.rb +0 -42
- data/spec/models/spotlight/main_navigation_spec.rb +0 -19
- data/spec/models/spotlight/masthead_spec.rb +0 -45
- data/spec/models/spotlight/page_configurations_spec.rb +0 -45
- data/spec/models/spotlight/page_spec.rb +0 -303
- data/spec/models/spotlight/resource_spec.rb +0 -137
- data/spec/models/spotlight/resources/iiif_harvester_spec.rb +0 -52
- data/spec/models/spotlight/resources/iiif_manifest_spec.rb +0 -178
- data/spec/models/spotlight/resources/iiif_service_spec.rb +0 -57
- data/spec/models/spotlight/resources/upload_spec.rb +0 -71
- data/spec/models/spotlight/resources/web_spec.rb +0 -25
- data/spec/models/spotlight/role_spec.rb +0 -51
- data/spec/models/spotlight/search_spec.rb +0 -125
- data/spec/models/spotlight/site_spec.rb +0 -9
- data/spec/models/spotlight/sitemap_spec.rb +0 -113
- data/spec/models/spotlight/solr_document/atomic_updates_spec.rb +0 -56
- data/spec/models/spotlight/solr_document/uploaded_resource_spec.rb +0 -38
- data/spec/models/spotlight/solr_document_sidecar_spec.rb +0 -48
- data/spec/models/spotlight/user_spec.rb +0 -26
- data/spec/models/translation_spec.rb +0 -14
- data/spec/presenters/spotlight/iiif_manifest_presenter_spec.rb +0 -132
- data/spec/routing/spotlight/exhibit_catalog_spec.rb +0 -34
- data/spec/routing/spotlight/featured_images_spec.rb +0 -23
- data/spec/routing/spotlight/pages_routing_spec.rb +0 -42
- data/spec/services/spotlight/bulk_updates_csv_template_service_spec.rb +0 -26
- data/spec/services/spotlight/carrierwave_file_resolver_spec.rb +0 -16
- data/spec/services/spotlight/clone_translated_page_from_locale_spec.rb +0 -30
- data/spec/services/spotlight/etl/context_spec.rb +0 -66
- data/spec/services/spotlight/etl/executor_spec.rb +0 -149
- data/spec/services/spotlight/etl/pipeline_spec.rb +0 -22
- data/spec/services/spotlight/etl/solr_loader_spec.rb +0 -76
- data/spec/services/spotlight/etl/step_spec.rb +0 -70
- data/spec/services/spotlight/exhibit_import_export_service_spec.rb +0 -569
- data/spec/services/spotlight/iiif_resource_resolver_spec.rb +0 -94
- data/spec/services/spotlight/invite_users_service_spec.rb +0 -47
- data/spec/spec_helper.rb +0 -147
- data/spec/support/controllers/engine_helpers.rb +0 -9
- data/spec/support/disable_friendly_id_deprecation_warnings.rb +0 -11
- data/spec/support/features/capybara_default_max_wait_metadata_helper.rb +0 -20
- data/spec/support/features/test_features_helpers.rb +0 -92
- data/spec/support/helpers/controller_level_helpers.rb +0 -25
- data/spec/support/stub_iiif_response.rb +0 -26
- data/spec/support/views/test_view_helpers.rb +0 -20
- data/spec/test_app_templates/Gemfile.extra +0 -2
- data/spec/test_app_templates/carrierwave.rb +0 -8
- data/spec/test_app_templates/catalog_controller.rb +0 -108
- data/spec/test_app_templates/fixture.css +0 -0
- data/spec/test_app_templates/fixture.png +0 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -69
- data/spec/test_app_templates/spotlight_test.rake +0 -14
- data/spec/uploaders/spotlight/attachment_uploader_spec.rb +0 -27
- data/spec/uploaders/spotlight/featured_image_uploader_spec.rb +0 -33
- data/spec/views/shared/_analytics.html.erb_spec.rb +0 -17
- data/spec/views/shared/_exhibit_navbar.html.erb_spec.rb +0 -127
- data/spec/views/shared/_header_navbar.html.erb_spec.rb +0 -12
- data/spec/views/shared/_masthead.html.erb_spec.rb +0 -91
- data/spec/views/shared/_user_util_links.html.erb_spec.rb +0 -102
- data/spec/views/spotlight/about_pages/_empty.html.erb_spec.rb +0 -28
- data/spec/views/spotlight/about_pages/_sidebar.html.erb_spec.rb +0 -24
- data/spec/views/spotlight/about_pages/index.html.erb_spec.rb +0 -69
- data/spec/views/spotlight/browse/_search.html.erb_spec.rb +0 -30
- data/spec/views/spotlight/browse/index.html.erb_spec.rb +0 -22
- data/spec/views/spotlight/browse/show.html.erb_spec.rb +0 -65
- data/spec/views/spotlight/catalog/_edit_default.html.erb_spec.rb +0 -63
- data/spec/views/spotlight/catalog/admin.html.erb_spec.rb +0 -39
- data/spec/views/spotlight/catalog/edit.html.erb_spec.rb +0 -20
- data/spec/views/spotlight/contacts/edit.html.erb_spec.rb +0 -43
- data/spec/views/spotlight/dashboards/_analytics.html.erb_spec.rb +0 -45
- data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +0 -94
- data/spec/views/spotlight/dashboards/analytics.html.erb_spec.rb +0 -33
- data/spec/views/spotlight/exhibits/_exhibit_card.html.erb_spec.rb +0 -46
- data/spec/views/spotlight/exhibits/_form.html.erb_spec.rb +0 -38
- data/spec/views/spotlight/exhibits/edit.html.erb_spec.rb +0 -29
- data/spec/views/spotlight/exhibits/index.html.erb_spec.rb +0 -140
- data/spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb +0 -28
- data/spec/views/spotlight/feature_pages/_sidebar.html.erb_spec.rb +0 -45
- data/spec/views/spotlight/featured_images/_form.html.erb_spec.rb +0 -32
- data/spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb +0 -32
- data/spec/views/spotlight/home_pages/_empty.html.erb_spec.rb +0 -28
- data/spec/views/spotlight/home_pages/_sidebar.html.erb_spec.rb +0 -12
- data/spec/views/spotlight/job_trackers/show.html.erb_spec.rb +0 -65
- data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +0 -30
- data/spec/views/spotlight/metadata_configurations/edit.html.erb_spec.rb +0 -23
- data/spec/views/spotlight/pages/_form.html.erb_spec.rb +0 -20
- data/spec/views/spotlight/pages/edit.html.erb_spec.rb +0 -68
- data/spec/views/spotlight/pages/index.html.erb_spec.rb +0 -42
- data/spec/views/spotlight/pages/new.html.erb_spec.rb +0 -21
- data/spec/views/spotlight/pages/show.html.erb_spec.rb +0 -84
- data/spec/views/spotlight/resources/_external_resources_form.html.erb_spec.rb +0 -36
- data/spec/views/spotlight/resources/new.html.erb_spec.rb +0 -30
- data/spec/views/spotlight/roles/index.html.erb_spec.rb +0 -30
- data/spec/views/spotlight/search_configurations/_facet_metadata.html.erb_spec.rb +0 -32
- data/spec/views/spotlight/search_configurations/_facets.html.erb_spec.rb +0 -54
- data/spec/views/spotlight/search_configurations/_search_fields.html.erb_spec.rb +0 -54
- data/spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb +0 -40
- data/spec/views/spotlight/searches/_search.html.erb_spec.rb +0 -37
- data/spec/views/spotlight/searches/edit.html.erb_spec.rb +0 -40
- data/spec/views/spotlight/searches/index.html.erb_spec.rb +0 -33
- data/spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb +0 -20
- data/spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb +0 -20
- data/spec/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb_spec.rb +0 -20
- data/spec/views/spotlight/sir_trevor/blocks/_rule_block.html.erb_spec.rb +0 -10
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb_spec.rb +0 -43
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb +0 -34
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb_spec.rb +0 -53
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb_spec.rb +0 -54
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb_spec.rb +0 -42
- data/spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb +0 -25
- data/spec/views/spotlight/tags/index.html.erb_spec.rb +0 -28
- data/spec/views/spotlight/translations/_import.html.erb_spec.rb +0 -24
- data/spec/views/spotlight/translations/_page.html.erb_spec.rb +0 -76
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dafde1a36e1a3f3e608fd0af0c1fe94a8a19b37fcb026647cd01680bf3d6b02
|
4
|
+
data.tar.gz: b06879821f191b68bf252bca5f433ca74b11d030b0871890bbf1afdca990c1f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ea08929fec9c1f9381163ab0f8de5c4aa6c979ee5931be1f31095bc8f1b2197971b50a839d6d0ce15ad4a35dd444f9065921e2fdc9a36a5a530fd7992da9bd7
|
7
|
+
data.tar.gz: bb2d68c6f2d9ea92b5eba3f86e2dd3e5ba4368e31cf265200a32bf501370c2c4b72956605b7242a56d970f8d8fbfc3d7b27fd22e6aa0df62af6900dafae4aa88
|
data/README.md
CHANGED
@@ -9,8 +9,8 @@ Read more about what Spotlight is, our motivations for creating it, and how to i
|
|
9
9
|
|
10
10
|
## Requirements
|
11
11
|
|
12
|
-
1. Ruby (2.
|
13
|
-
2. Rails (5.
|
12
|
+
1. Ruby (2.7 or greater)
|
13
|
+
2. Rails (5.2 or greater)
|
14
14
|
3. Java (7 or greater) *for Solr*
|
15
15
|
4. ImageMagick (http://www.imagemagick.org/script/index.php) due to [carrierwave](https://github.com/carrierwaveuploader/carrierwave#adding-versions)
|
16
16
|
|
@@ -25,7 +25,7 @@ module Spotlight
|
|
25
25
|
|
26
26
|
html_class = 'active' if current
|
27
27
|
|
28
|
-
@context.content_tag(:li, class: "breadcrumb-item #{html_class}") do
|
28
|
+
@context.content_tag(:li, class: "breadcrumb-item truncated-value #{html_class}") do
|
29
29
|
@context.link_to_unless(current, element_label(element), compute_path(element), element.options&.except(:current))
|
30
30
|
end
|
31
31
|
end
|
@@ -33,7 +33,7 @@ module Spotlight
|
|
33
33
|
private
|
34
34
|
|
35
35
|
def element_label(element)
|
36
|
-
@context.content_tag(:span
|
36
|
+
@context.content_tag(:span) { compute_name(element) }
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
@@ -67,38 +67,39 @@ module Spotlight
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
-
def search_action_url(*args)
|
70
|
+
def search_action_url(*args, **kwargs)
|
71
71
|
if current_exhibit
|
72
|
-
exhibit_search_action_url(*args)
|
72
|
+
exhibit_search_action_url(*args, **kwargs)
|
73
73
|
else
|
74
|
-
main_app.search_catalog_url(*args)
|
74
|
+
main_app.search_catalog_url(*args, **kwargs)
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
-
def search_facet_path(*args)
|
78
|
+
def search_facet_path(*args, **kwargs)
|
79
79
|
if current_exhibit
|
80
|
-
exhibit_search_facet_path(*args)
|
80
|
+
exhibit_search_facet_path(*args, **kwargs)
|
81
81
|
else
|
82
|
-
main_app.catalog_facet_url(*args)
|
82
|
+
main_app.catalog_facet_url(*args, **kwargs)
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
-
def exhibit_search_action_url(*args)
|
86
|
+
def exhibit_search_action_url(*args, **kwargs)
|
87
87
|
options = args.extract_options!
|
88
|
+
options = options.merge(kwargs)
|
88
89
|
only_path = options[:only_path]
|
89
90
|
options.except! :exhibit_id, :only_path
|
90
91
|
|
91
92
|
if only_path
|
92
|
-
spotlight.search_exhibit_catalog_path(current_exhibit, *args, options)
|
93
|
+
spotlight.search_exhibit_catalog_path(current_exhibit, *args, **options)
|
93
94
|
else
|
94
|
-
spotlight.search_exhibit_catalog_url(current_exhibit, *args, options)
|
95
|
+
spotlight.search_exhibit_catalog_url(current_exhibit, *args, **options)
|
95
96
|
end
|
96
97
|
end
|
97
98
|
|
98
|
-
def exhibit_search_facet_path(*args)
|
99
|
+
def exhibit_search_facet_path(*args, **kwargs)
|
99
100
|
options = args.extract_options!
|
100
|
-
options = Blacklight::Parameters.sanitize(params.to_unsafe_h.with_indifferent_access).merge(options).except(:exhibit_id, :only_path)
|
101
|
-
spotlight.facet_exhibit_catalog_url(current_exhibit, *args, options)
|
101
|
+
options = Blacklight::Parameters.sanitize(params.to_unsafe_h.with_indifferent_access).merge(options).merge(kwargs).except(:exhibit_id, :only_path)
|
102
|
+
spotlight.facet_exhibit_catalog_url(current_exhibit, *args, **options&.symbolize_keys)
|
102
103
|
end
|
103
104
|
end
|
104
105
|
end
|
@@ -57,7 +57,7 @@ module Spotlight
|
|
57
57
|
add_breadcrumb t(:'spotlight.configuration.sidebar.search_configuration'), edit_exhibit_search_configuration_path(@exhibit)
|
58
58
|
end
|
59
59
|
|
60
|
-
# Only allow
|
60
|
+
# Only allow trusted parameters through.
|
61
61
|
def custom_search_field_params
|
62
62
|
params.require(:custom_search_field).permit(:slug, :field, :label)
|
63
63
|
end
|
@@ -35,7 +35,7 @@ module Spotlight
|
|
35
35
|
|
36
36
|
# GET /pages/1
|
37
37
|
def show
|
38
|
-
fresh_when([@page.exhibit, @page
|
38
|
+
fresh_when([@page.exhibit, @page])
|
39
39
|
end
|
40
40
|
|
41
41
|
def preview
|
@@ -189,7 +189,7 @@ module Spotlight
|
|
189
189
|
add_breadcrumb t(key, title: current_exhibit.title), spotlight.exhibit_root_path(current_exhibit)
|
190
190
|
end
|
191
191
|
|
192
|
-
# Only allow
|
192
|
+
# Only allow trusted parameters through.
|
193
193
|
def page_params
|
194
194
|
params.require(controller_name.singularize).permit(allowed_page_params)
|
195
195
|
end
|
@@ -7,7 +7,7 @@ module Spotlight
|
|
7
7
|
class RolesController < Spotlight::ApplicationController
|
8
8
|
before_action :authenticate_user!
|
9
9
|
load_and_authorize_resource :exhibit, class: Spotlight::Exhibit
|
10
|
-
load_and_authorize_resource through: :exhibit, except: [
|
10
|
+
load_and_authorize_resource through: :exhibit, except: %i[index update_all]
|
11
11
|
|
12
12
|
def index
|
13
13
|
role = @exhibit.roles.build
|
@@ -117,9 +117,14 @@ module Spotlight
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def query_params
|
120
|
-
params.to_unsafe_h.with_indifferent_access.except(:exhibit_id, :search, *
|
120
|
+
params.to_unsafe_h.with_indifferent_access.except(:exhibit_id, :search, *excluded_search_session_params).reject { |_k, v| v.blank? }
|
121
121
|
end
|
122
122
|
|
123
|
+
def excluded_search_session_params
|
124
|
+
blacklisted_search_session_params
|
125
|
+
end
|
126
|
+
|
127
|
+
# @deprecated
|
123
128
|
def blacklisted_search_session_params
|
124
129
|
%i[id commit counter total search_id page per_page authenticity_token utf8 action controller]
|
125
130
|
end
|
@@ -162,7 +162,7 @@ module Spotlight
|
|
162
162
|
if current_exhibit_theme && current_exhibit.theme != 'default'
|
163
163
|
stylesheet_link_tag "#{tag}_#{current_exhibit_theme}"
|
164
164
|
else
|
165
|
-
Rails.logger.warn "Exhibit theme '#{current_exhibit_theme}' not in
|
165
|
+
Rails.logger.warn "Exhibit theme '#{current_exhibit_theme}' not in the list of available themes: #{current_exhibit.themes}"
|
166
166
|
stylesheet_link_tag(tag)
|
167
167
|
end
|
168
168
|
end
|
@@ -40,7 +40,7 @@ module Spotlight
|
|
40
40
|
if current_exhibit_theme && current_exhibit&.theme != 'default'
|
41
41
|
stylesheet_link_tag "#{tag}_#{current_exhibit_theme}"
|
42
42
|
else
|
43
|
-
Rails.logger.warn "Exhibit theme '#{current_exhibit_theme}' not in
|
43
|
+
Rails.logger.warn "Exhibit theme '#{current_exhibit_theme}' not in the list of available themes: #{current_exhibit&.themes}"
|
44
44
|
stylesheet_link_tag(tag)
|
45
45
|
end
|
46
46
|
end
|
@@ -16,6 +16,18 @@ module Spotlight
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
def sir_trevor_format(text, format: :markdown)
|
20
|
+
if format.to_s.to_sym == :html
|
21
|
+
sir_trevor_html(text)
|
22
|
+
else
|
23
|
+
sir_trevor_markdown(text)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def sir_trevor_html(text)
|
28
|
+
sanitize(text, tags: %w[b i a br p sup])
|
29
|
+
end
|
30
|
+
|
19
31
|
##
|
20
32
|
# Override the default #sir_trevor_markdown so we can use
|
21
33
|
# a more complete markdown rendered
|
@@ -27,10 +27,8 @@ module Spotlight
|
|
27
27
|
content_tag(:h1, html_content, class: 'page-header')
|
28
28
|
end
|
29
29
|
|
30
|
-
# rubocop:disable Naming/AccessorMethodName
|
31
30
|
def set_html_page_title(title = nil)
|
32
31
|
@page_title = strip_tags(t(:'spotlight.html_title', title: title || t(:'.title', default: :'.header'), application_name: application_name)).html_safe
|
33
32
|
end
|
34
|
-
# rubocop:enable Naming/AccessorMethodName
|
35
33
|
end
|
36
34
|
end
|
@@ -6,8 +6,9 @@ module Spotlight
|
|
6
6
|
class ConfirmationMailer < ActionMailer::Base
|
7
7
|
include Devise::Mailers::Helpers
|
8
8
|
|
9
|
-
def confirmation_instructions(record, token, opts)
|
9
|
+
def confirmation_instructions(record, token, opts, exhibit: nil)
|
10
10
|
@token = token
|
11
|
+
@exhibit = exhibit
|
11
12
|
initialize_from_record(record)
|
12
13
|
mail headers_for(:confirmation_instructions, opts)
|
13
14
|
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'ostruct'
|
4
|
+
|
5
|
+
module SirTrevorRails
|
6
|
+
# Forked from (former) upstream sir-trevor-rails 0.6.2 gem:
|
7
|
+
# https://github.com/madebymany/sir-trevor-rails/blob/931b9554f5268158b4da8817477cdc82e4e2e69c/lib/sir_trevor_rails/block.rb
|
8
|
+
# Copyright (c) 2013-2014 by ITV plc - http://www.itv.com
|
9
|
+
class Block < OpenStruct
|
10
|
+
DEFAULT_FORMAT = :markdown
|
11
|
+
|
12
|
+
def self.from_hash(hash, parent = nil)
|
13
|
+
hash = hash.deep_dup.with_indifferent_access
|
14
|
+
type_klass(hash).new(hash, parent)
|
15
|
+
end
|
16
|
+
|
17
|
+
def format
|
18
|
+
send(:[], :format).present? ? send(:[], :format).to_sym : DEFAULT_FORMAT
|
19
|
+
end
|
20
|
+
|
21
|
+
# Sets a list of custom block types to speed up lookup at runtime.
|
22
|
+
def self.custom_block_types
|
23
|
+
# You can define your custom block types directly here or in your engine config.
|
24
|
+
Spotlight::Engine.config.sir_trevor_widgets
|
25
|
+
end
|
26
|
+
|
27
|
+
def initialize(hash, parent)
|
28
|
+
@raw_data = hash
|
29
|
+
@parent = parent
|
30
|
+
@type = hash[:type].to_sym
|
31
|
+
super(hash[:data])
|
32
|
+
end
|
33
|
+
|
34
|
+
attr_reader :parent, :type
|
35
|
+
|
36
|
+
def to_partial_path
|
37
|
+
"sir_trevor/blocks/#{self.class.name.demodulize.underscore}"
|
38
|
+
end
|
39
|
+
|
40
|
+
def as_json(*_attrs)
|
41
|
+
{
|
42
|
+
type: @type.to_s,
|
43
|
+
data: marshal_dump
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Infers the block class.
|
48
|
+
# Safe lookup that tries to identify user created block class.
|
49
|
+
#
|
50
|
+
# @param [Symbol] type
|
51
|
+
def self.block_class(type)
|
52
|
+
type_name = type.to_s.camelize
|
53
|
+
block_name = "#{type_name}Block"
|
54
|
+
if custom_block_types.include?(type_name)
|
55
|
+
begin
|
56
|
+
block_name.constantize
|
57
|
+
rescue NameError
|
58
|
+
block_class!(block_name)
|
59
|
+
end
|
60
|
+
else
|
61
|
+
block_class!(block_name)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Infers the block class.
|
66
|
+
# Failover from block_class.
|
67
|
+
# Safe lookup against the SirTevor::Blocks namespace
|
68
|
+
# If no block is found, create one with given name and inherit from Block class
|
69
|
+
#
|
70
|
+
# @param [Constant] block_name
|
71
|
+
def self.block_class!(block_name)
|
72
|
+
SirTrevorRails::Blocks.const_get(block_name)
|
73
|
+
rescue NameError
|
74
|
+
SirTrevorRails::Blocks.const_set(block_name, Class.new(Block))
|
75
|
+
end
|
76
|
+
|
77
|
+
def self.type_klass(hash)
|
78
|
+
if self == Block
|
79
|
+
block_class(hash[:type].to_sym)
|
80
|
+
else
|
81
|
+
self
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -33,7 +33,7 @@ module Spotlight
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def send_devise_notification(notification, *args)
|
36
|
-
notice = notification_mailer.send(notification, self, *args)
|
36
|
+
notice = notification_mailer.send(notification, self, *args, exhibit: exhibit)
|
37
37
|
if notice.respond_to? :deliver_now
|
38
38
|
notice.deliver_now
|
39
39
|
else
|
@@ -5,12 +5,21 @@ module Spotlight
|
|
5
5
|
# Sir-Trevor created content
|
6
6
|
class SirTrevor
|
7
7
|
def self.parse(page, attribute)
|
8
|
-
|
9
|
-
|
8
|
+
blocks = page.read_attribute(attribute)
|
9
|
+
blocks ||= [].to_json
|
10
10
|
|
11
|
-
return
|
11
|
+
return [] if blocks.blank?
|
12
12
|
|
13
|
-
|
13
|
+
blocks = JSON.parse(blocks, symbolize_names: true) if blocks.is_a?(String)
|
14
|
+
|
15
|
+
if blocks.is_a?(Hash)
|
16
|
+
blocks = blocks[:data] || blocks['data'] or
|
17
|
+
raise IndexError, 'No block data found'
|
18
|
+
end
|
19
|
+
|
20
|
+
blocks.map do |obj|
|
21
|
+
SirTrevorRails::Block.from_hash(obj, page)
|
22
|
+
end
|
14
23
|
end
|
15
24
|
end
|
16
25
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
unless defined?(Translation)
|
4
|
+
Translation = I18n::Backend::ActiveRecord::Translation
|
5
|
+
Translation.include Spotlight::CustomTranslationExtension
|
6
|
+
|
7
|
+
# Work-around for https://github.com/svenfuchs/i18n-active_record/pull/133
|
8
|
+
if Translation.respond_to?(:to_hash)
|
9
|
+
class << Translation
|
10
|
+
alias to_h to_hash
|
11
|
+
remove_method :to_hash
|
12
|
+
end
|
13
|
+
|
14
|
+
I18n::Backend::ActiveRecord.define_method(:init_translations) do
|
15
|
+
@translations = Translation.to_h
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -49,7 +49,7 @@ module Spotlight
|
|
49
49
|
deserialize_featured_image(exhibit, :masthead, hash[:masthead]) if hash[:masthead]
|
50
50
|
deserialize_featured_image(exhibit, :thumbnail, hash[:thumbnail]) if hash[:thumbnail]
|
51
51
|
|
52
|
-
exhibit.blacklight_configuration.update hash[:blacklight_configuration].
|
52
|
+
exhibit.blacklight_configuration.update hash[:blacklight_configuration].with_indifferent_access if hash[:blacklight_configuration]
|
53
53
|
|
54
54
|
hash[:main_navigations].each do |attr|
|
55
55
|
ar = exhibit.main_navigations.find_or_initialize_by(nav_type: attr[:nav_type])
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<li class="nav-item"><%= link_to t(:'spotlight.sites.edit.page_title'), spotlight.edit_site_path, class: 'nav-link' %></li>
|
8
8
|
<% end %>
|
9
9
|
|
10
|
-
<% if can? :
|
10
|
+
<% if can? :manage, Spotlight::Exhibit %>
|
11
11
|
<li class="nav-item"><%= link_to t(:'spotlight.sites.edit_exhibits.page_title'), spotlight.edit_site_exhibits_path, class: 'nav-link' %></li>
|
12
12
|
<li class="nav-item"><%= link_to t(:'spotlight.admin_users.index.page_title'), spotlight.admin_users_path, class: 'nav-link' %></li>
|
13
13
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<p><%= t(:'.welcome', email: @email) %></p>
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
<br /><br />
|
3
|
+
<%= simple_format t(:'.instructions', exhibit_title: @exhibit&.title) %>
|
4
|
+
<br /><br />
|
5
5
|
<p><%= link_to t(:'.confirm'), spotlight.contact_email_confirmation_url(:confirmation_token => @token) %></p>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<p class="instructions"><%= t :'.instructions' %></p>
|
5
5
|
<div class="form-group">
|
6
6
|
<%= file_field_tag :file, class: 'form-control' %>
|
7
|
-
<%= hidden_field_tag :tab, 'import' %>
|
7
|
+
<%= hidden_field_tag :tab, 'import', id: nil %>
|
8
8
|
</div>
|
9
9
|
<div class="form-actions">
|
10
10
|
<div class="primary-actions">
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= bootstrap_form_for [current_exhibit, Spotlight::Language.new], layout: :horizontal, html: { class: 'row' }, label_col: "col-sm-3", control_col: "col-sm-9" do |f| %>
|
5
5
|
<div class='col-sm-6'>
|
6
6
|
<%= f.select('locale', add_exhibit_language_dropdown_options, prompt: t('.selection_prompt')) %>
|
7
|
-
<%= hidden_field_tag :tab, 'language' %>
|
7
|
+
<%= hidden_field_tag :tab, 'language', id: nil %>
|
8
8
|
</div>
|
9
9
|
<div class='col-sm-6'>
|
10
10
|
<%= f.submit nil, class: 'btn btn-primary' %>
|
@@ -48,7 +48,7 @@
|
|
48
48
|
</div>
|
49
49
|
<div class="form-actions">
|
50
50
|
<div class="primary-actions">
|
51
|
-
<%= hidden_field_tag :tab, 'language' %>
|
51
|
+
<%= hidden_field_tag :tab, 'language', id: nil %>
|
52
52
|
<%= f.submit nil, class: 'btn btn-primary' %>
|
53
53
|
</div>
|
54
54
|
</div>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<% end %>
|
12
12
|
<div class="form-actions">
|
13
13
|
<div class="primary-actions">
|
14
|
-
<%= hidden_field_tag :tab, 'upload' %>
|
14
|
+
<%= hidden_field_tag :tab, 'upload', id: nil %>
|
15
15
|
<%= cancel_link @resource, :back, class: 'btn-sizing' %>
|
16
16
|
<%= f.submit t('.add_item_and_continue'), name: 'add-and-continue', class: 'btn btn-secondary' %>
|
17
17
|
<%= f.submit t('.add_item'), class: 'btn btn-primary' %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= f.form_group :document_index_view_types, label: {text: t(:'.label'), class: 'pt-0'} do %>
|
2
2
|
<%= f.fields_for :document_index_view_types, @blacklight_configuration.document_index_view_types_selected_hash do |vt| %>
|
3
3
|
<% @blacklight_configuration.default_blacklight_config.view.select { |_k, v| v.if != false }.each do |key, view| %>
|
4
|
-
<%= vt.check_box key, label: view.display_label
|
4
|
+
<%= vt.check_box key, label: view.display_label %>
|
5
5
|
<% end %>
|
6
6
|
<% end %>
|
7
7
|
<% end %>
|
@@ -1,8 +1,10 @@
|
|
1
1
|
<%= content_tag :span, t(:'.document_count', count: metadata[:document_count]) %>
|
2
2
|
<% if metadata[:document_count] > 0 %>
|
3
3
|
•
|
4
|
-
<%
|
5
|
-
|
4
|
+
<% limit = field_config&.limit || Spotlight::FieldMetadata::FACET_LIMIT %>
|
5
|
+
<% limit = blacklight_config.default_facet_limit if limit == true %>
|
6
|
+
<% if metadata[:value_count] >= limit %>
|
7
|
+
<%= content_tag :span, t(:'.too_many_values_count', count: limit) %>
|
6
8
|
<% else %>
|
7
9
|
<%= content_tag :span, t(:'.value_count', count: metadata[:value_count]) %>
|
8
10
|
<% end %>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
</div>
|
17
17
|
<% when :additional_options %>
|
18
18
|
<div class="facet-metadata mr-3">
|
19
|
-
<%= render partial: 'facet_metadata', locals: { metadata: metadata } %>
|
19
|
+
<%= render partial: 'facet_metadata', locals: { blacklight_config: @blacklight_configuration.blacklight_config, field_config: config, metadata: metadata } %>
|
20
20
|
</div>
|
21
21
|
<% else %>
|
22
22
|
<% end %>
|
@@ -40,7 +40,7 @@
|
|
40
40
|
<% end %>
|
41
41
|
<%= f.form_group label: { text: t(:".default_index_view_type"), class: 'pt-0' } do %>
|
42
42
|
<% available_document_index_views.each do |key, view| %>
|
43
|
-
<%= f.radio_button :default_index_view_type, key, label: view.display_label
|
43
|
+
<%= f.radio_button :default_index_view_type, key, label: view.display_label %>
|
44
44
|
<% end %>
|
45
45
|
<% end %>
|
46
46
|
<% unless @search.query_params.blank? %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= bootstrap_form_for current_exhibit, url: spotlight.exhibit_translations_path(current_exhibit), layout: :horizontal do |f| %>
|
3
3
|
<% # Add hidden fields for the language and tab so the redirect knows how to come back here %>
|
4
4
|
<%= hidden_field_tag :language, @language %>
|
5
|
-
<%= hidden_field_tag :tab, 'browse' %>
|
5
|
+
<%= hidden_field_tag :tab, 'browse', id: nil %>
|
6
6
|
<div class="row">
|
7
7
|
<div class="col-4 text-right">
|
8
8
|
<span class="browse-translations-header">
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= bootstrap_form_for current_exhibit, url: spotlight.exhibit_translations_path(current_exhibit), layout: :horizontal do |f| %>
|
3
3
|
<% # Add hidden fields for the language and tab so the redirect knows how to come back here %>
|
4
4
|
<%= hidden_field_tag :language, @language %>
|
5
|
-
<%= hidden_field_tag :tab, 'groups' %>
|
5
|
+
<%= hidden_field_tag :tab, 'groups', id: nil %>
|
6
6
|
|
7
7
|
<% current_exhibit.groups.each do |group| %>
|
8
8
|
<% title_translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "#{group.slug}.title", locale: @language) %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
<div class="input-group col px-0">
|
10
10
|
<%= file_field_tag :file, class: 'form-control' %>
|
11
|
-
<%= hidden_field_tag :tab, 'import' %>
|
11
|
+
<%= hidden_field_tag :tab, 'import', id: nil %>
|
12
12
|
<div class="input-group-append">
|
13
13
|
<%= f.submit t(:'.import_submit'), class: 'btn btn-primary' %>
|
14
14
|
</div>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= bootstrap_form_for current_exhibit, url: spotlight.exhibit_translations_path(current_exhibit), layout: :horizontal do |f| %>
|
3
3
|
<% # Add a hidden field for the language so the redirect knows how to come back here %>
|
4
4
|
<%= hidden_field_tag :language, @language %>
|
5
|
-
<%= hidden_field_tag :tab, 'metadata' %>
|
5
|
+
<%= hidden_field_tag :tab, 'metadata', id: nil %>
|
6
6
|
|
7
7
|
<% non_custom_metadata_fields.each do |key, field_config| %>
|
8
8
|
<% translation = Translation.find_or_initialize_by(exhibit: current_exhibit, key: "blacklight.search.fields.#{key}", locale: @language) %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= bootstrap_form_for current_exhibit, url: spotlight.exhibit_translations_path(current_exhibit), layout: :horizontal do |f| %>
|
3
3
|
<% # Add hidden fields for the language and tab so the redirect knows how to come back here %>
|
4
4
|
<%= hidden_field_tag :language, @language %>
|
5
|
-
<%= hidden_field_tag :tab, 'search_fields' %>
|
5
|
+
<%= hidden_field_tag :tab, 'search_fields', id: nil %>
|
6
6
|
|
7
7
|
<div class='translation-field-based-search-fields'>
|
8
8
|
<h2 class='translation-subheading'>
|
data/config/i18n-tasks.yml
CHANGED
@@ -65,6 +65,7 @@ ignore_unused:
|
|
65
65
|
- helpers.action.{edit,edit_long,new,view} # app/helpers/spotlight/crud_link_helpers.rb
|
66
66
|
- helpers.action.spotlight/search.edit_long # app/views/spotlight/searches/_search.html.erb
|
67
67
|
- spotlight.about_pages.page_options.published # app/views/spotlight/about_pages/_page_options.html.erb
|
68
|
+
- spotlight.job_trackers.show.messages.status.{completed,enqueued,failed,missing,pending} # app/views/spotlight/job_trackers/show.html.erb
|
68
69
|
- helpers.submit.contact_form.create # app/views/spotlight/shared/_report_a_problem.html.erb
|
69
70
|
- activerecord.help.spotlight/exhibit.tag_list # app/views/spotlight/exhibits/_form.html.erb
|
70
71
|
- helpers.label.solr_document.exhibit_tag_list # app/views/spotlight/catalog/_edit_default.html.erb
|
@@ -77,7 +78,7 @@ ignore_unused:
|
|
77
78
|
# TODO Look into these as its unclear
|
78
79
|
- activerecord.models.spotlight.page
|
79
80
|
#- # perhaps removed here? https://github.com/projectblacklight/spotlight/commit/d4fdf04565ab3d648f0cb2a1238d84f262509fcd
|
80
|
-
- devise.mailer
|
81
|
+
- devise.mailer.*.* # Does this even work? https://github.com/projectblacklight/spotlight/blob/master/app/mailers/spotlight/invitation_mailer.rb#L16
|
81
82
|
- helpers.submit.solr_document.{batch_error,batch_updated,create,created,destroyed,submit,update,updated} # Do we need this?
|
82
83
|
- helpers.submit.user.{batch_error,batch_updated,create,created,destroyed,submit,update,updated} # Do we need this?
|
83
84
|
- helpers.action.destroy # no idea here
|