blacklight-spotlight 0.18.0 → 0.19.0
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 -9
- data/app/assets/javascripts/spotlight/blocks/browse_block.js +1 -0
- data/app/assets/stylesheets/spotlight/_bootstrap_overrides.scss +1 -1
- data/app/assets/stylesheets/spotlight/_multi_up_item_grid.scss +2 -0
- data/app/assets/stylesheets/spotlight/_pages.scss +7 -1
- data/app/controllers/spotlight/contact_forms_controller.rb +1 -5
- data/app/controllers/spotlight/searches_controller.rb +7 -1
- data/app/helpers/spotlight/browse_helper.rb +16 -1
- data/app/helpers/spotlight/searches_helper.rb +8 -0
- data/app/mailers/spotlight/contact_mailer.rb +9 -0
- data/app/models/spotlight/analytics/ga.rb +14 -16
- data/app/models/spotlight/blacklight_configuration.rb +6 -6
- data/app/models/spotlight/contact_form.rb +12 -10
- data/app/services/spotlight/carrierwave_file_resolver.rb +8 -0
- data/app/views/spotlight/browse/show.html.erb +5 -1
- data/app/views/spotlight/contact_mailer/report_problem.html.erb +14 -0
- data/app/views/spotlight/dashboards/analytics.html.erb +1 -3
- data/app/views/spotlight/searches/_form.html.erb +5 -0
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +4 -3
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +3 -2
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +3 -2
- data/config/locales/spotlight.en.yml +1 -0
- data/db/migrate/20160711121314_add_default_view_to_spotlight_searches.rb +5 -0
- data/lib/generators/spotlight/install_generator.rb +6 -0
- data/lib/generators/spotlight/templates/config/initializers/riiif.rb +7 -0
- data/lib/spotlight/version.rb +1 -1
- data/spec/controllers/application_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/about_pages_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/admin_users_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/appearances_controller_spec.rb +0 -1
- data/spec/controllers/spotlight/application_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/attachments_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/browse_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/catalog_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/confirmations_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/contact_forms_controller_spec.rb +5 -2
- data/spec/controllers/spotlight/contacts_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/custom_fields_controller_spec.rb +0 -1
- data/spec/controllers/spotlight/dashboards_controller_spec.rb +0 -1
- data/spec/controllers/spotlight/exhibits_controller_spec.rb +1 -1
- data/spec/controllers/spotlight/feature_pages_controller_spec.rb +0 -1
- data/spec/controllers/spotlight/filters_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/home_pages_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/metadata_configurations_controller_spec.rb +0 -1
- data/spec/controllers/spotlight/resources_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/roles_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/search_configurations_controller_spec.rb +0 -1
- data/spec/controllers/spotlight/searches_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/sites_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/solr_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/tags_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/versions_controller_spec.rb +0 -2
- data/spec/controllers/spotlight/view_configurations_controller_spec.rb +0 -1
- data/spec/features/about_page_spec.rb +0 -2
- data/spec/features/add_contacts_spec.rb +0 -2
- data/spec/features/add_custom_field_metadata_spec.rb +0 -2
- data/spec/features/add_items_spec.rb +0 -2
- data/spec/features/browse_category_admin_spec.rb +13 -2
- data/spec/features/browse_category_spec.rb +27 -2
- data/spec/features/catalog_spec.rb +0 -2
- data/spec/features/confirm_email_spec.rb +0 -2
- data/spec/features/create_exhibit_spec.rb +0 -2
- data/spec/features/create_page_spec.rb +0 -2
- data/spec/features/curator_items.rb +0 -3
- data/spec/features/dashboard_spec.rb +0 -2
- data/spec/features/edit_contact_spec.rb +0 -3
- data/spec/features/edit_search_fields_spec.rb +0 -2
- data/spec/features/exhibit_masthead_spec.rb +0 -2
- data/spec/features/exhibits/add_tags_spec.rb +0 -1
- data/spec/features/exhibits/administration_spec.rb +0 -1
- data/spec/features/exhibits/custom_metadata_fields_spec.rb +0 -1
- data/spec/features/exhibits/edit_metadata_fields_spec.rb +0 -1
- data/spec/features/exhibits_index_spec.rb +0 -2
- data/spec/features/feature_page_spec.rb +0 -2
- data/spec/features/home_page_spec.rb +0 -1
- data/spec/features/import_exhibit_spec.rb +0 -1
- data/spec/features/item_admin_spec.rb +0 -2
- data/spec/features/javascript/about_page_admin_spec.rb +0 -2
- data/spec/features/javascript/block_controls_spec.rb +0 -2
- data/spec/features/javascript/blocks/featured_browse_categories_block_spec.rb +8 -0
- data/spec/features/javascript/edit_in_place_spec.rb +0 -2
- data/spec/features/javascript/feature_page_admin_spec.rb +0 -2
- data/spec/features/javascript/home_page_edit_spec.rb +0 -2
- data/spec/features/javascript/metadata_admin_spec.rb +0 -2
- data/spec/features/javascript/multi_image_select_spec.rb +0 -2
- data/spec/features/javascript/preview_block_spec.rb +0 -2
- data/spec/features/javascript/reindex_monitor_spec.rb +0 -2
- data/spec/features/javascript/roles_admin_spec.rb +0 -2
- data/spec/features/javascript/rule_block_spec.rb +0 -2
- data/spec/features/javascript/search_config_admin_spec.rb +0 -2
- data/spec/features/javascript/search_context_spec.rb +0 -2
- data/spec/features/main_navigation_spec.rb +0 -2
- data/spec/features/metadata_admin_spec.rb +0 -2
- data/spec/features/report_a_problem_spec.rb +0 -2
- data/spec/features/site_admin_management_spec.rb +0 -2
- data/spec/features/site_masthead_spec.rb +0 -6
- data/spec/features/slideshow_spec.rb +0 -2
- data/spec/features/tags_admin_spec.rb +0 -2
- data/spec/features/user_admin_spec.rb +0 -2
- data/spec/helpers/spotlight/application_helper_spec.rb +0 -1
- data/spec/helpers/spotlight/browse_helper_spec.rb +0 -1
- data/spec/helpers/spotlight/crud_link_helpers_spec.rb +0 -1
- data/spec/helpers/spotlight/jcrop_helper_spec.rb +0 -1
- data/spec/helpers/spotlight/main_app_helpers_spec.rb +0 -1
- data/spec/helpers/spotlight/navbar_helper_spec.rb +0 -1
- data/spec/helpers/spotlight/pages_helper_spec.rb +0 -1
- data/spec/helpers/spotlight/roles_helper_spec.rb +0 -1
- data/spec/helpers/spotlight/search_configurations_helper_spec.rb +0 -1
- data/spec/helpers/spotlight/title_helper_spec.rb +0 -1
- data/spec/jobs/spotlight/default_thumbnail_job_spec.rb +0 -1
- data/spec/jobs/spotlight/reindex_job_spec.rb +0 -1
- data/spec/jobs/spotlight/rename_sidecar_field_job_spec.rb +0 -1
- data/spec/lib/spotlight/controller_spec.rb +0 -1
- data/spec/mailers/spotlight/indexing_complete_mailer_spec.rb +0 -1
- data/spec/models/solr_document_spec.rb +0 -2
- data/spec/models/spotlight/ability_spec.rb +0 -1
- data/spec/models/spotlight/about_page_spec.rb +0 -2
- data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +0 -2
- data/spec/models/spotlight/blacklight_configuration_spec.rb +10 -2
- data/spec/models/spotlight/contact_email_spec.rb +0 -8
- data/spec/models/spotlight/contact_form_spec.rb +0 -2
- data/spec/models/spotlight/contact_spec.rb +0 -2
- data/spec/models/spotlight/custom_field_spec.rb +0 -1
- data/spec/models/spotlight/default_thumbnailable_concern_spec.rb +0 -2
- data/spec/models/spotlight/exhibit_spec.rb +0 -2
- data/spec/models/spotlight/feature_page_spec.rb +0 -2
- data/spec/models/spotlight/featured_image_spec.rb +0 -2
- data/spec/models/spotlight/field_metadata_spec.rb +0 -2
- data/spec/models/spotlight/filter_spec.rb +0 -2
- data/spec/models/spotlight/home_page_spec.rb +0 -2
- data/spec/models/spotlight/image_derivatives_spec.rb +0 -2
- data/spec/models/spotlight/main_navigation_spec.rb +0 -2
- data/spec/models/spotlight/masthead_spec.rb +0 -2
- data/spec/models/spotlight/page_spec.rb +0 -2
- data/spec/models/spotlight/reindex_progress_spec.rb +0 -2
- data/spec/models/spotlight/resource_spec.rb +0 -2
- data/spec/models/spotlight/role_spec.rb +0 -2
- data/spec/models/spotlight/search_spec.rb +0 -2
- data/spec/models/spotlight/site_spec.rb +0 -2
- data/spec/models/spotlight/sitemap_spec.rb +0 -1
- data/spec/models/spotlight/solr_document_sidecar_spec.rb +0 -2
- data/spec/models/spotlight/user_spec.rb +0 -2
- data/spec/routing/spotlight/exhibit_catalog_spec.rb +0 -1
- data/spec/routing/spotlight/pages_routing_spec.rb +30 -34
- data/spec/serializers/spotlight/exhibit_export_serializer_spec.rb +0 -2
- data/spec/services/spotlight/carrierwave_file_resolver_spec.rb +14 -0
- data/spec/spec_helper.rb +8 -2
- data/spec/uploaders/spotlight/item_uploader_spec.rb +0 -1
- data/spec/views/_user_util_links.html.erb_spec.rb +70 -74
- data/spec/views/shared/_analytics.html.erb_spec.rb +10 -15
- data/spec/views/shared/_exhibit_navbar.html.erb_spec.rb +0 -2
- data/spec/views/shared/_footer.html.erb_spec.rb +15 -19
- data/spec/views/shared/_header_navbar.html.erb_spec.rb +7 -12
- data/spec/views/shared/_masthead.html.erb_spec.rb +0 -13
- data/spec/views/spotlight/roles/index.html.erb_spec.rb +6 -5
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb +1 -1
- metadata +37 -30
- data/app/views/spotlight/contact_forms/show.html.erb +0 -4
@@ -33,4 +33,12 @@ describe 'Featured Browse Category Block', type: :feature, js: true do
|
|
33
33
|
expect(page).to have_css('.category-title', text: search2.title)
|
34
34
|
expect(page).to have_css('.item-count', text: /\d+ items/i)
|
35
35
|
end
|
36
|
+
|
37
|
+
it 'allows the curator to omit document counts' do
|
38
|
+
uncheck 'Include item counts?'
|
39
|
+
fill_in_typeahead_field with: 'Title1'
|
40
|
+
save_page
|
41
|
+
|
42
|
+
expect(page).not_to have_css('.item-count', text: /\d+ items/i)
|
43
|
+
end
|
36
44
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
1
|
describe 'Add and update the site masthead', type: :feature do
|
4
2
|
let(:user) { FactoryGirl.create(:site_admin) }
|
5
3
|
|
@@ -60,9 +58,7 @@ describe 'Add and update the site masthead', type: :feature do
|
|
60
58
|
end
|
61
59
|
|
62
60
|
click_button 'Save changes'
|
63
|
-
|
64
61
|
expect(page).to have_content('The site was successfully updated.')
|
65
|
-
|
66
62
|
expect(page).to have_css('.image-masthead .background-container')
|
67
63
|
end
|
68
64
|
it 'does not display an uploaded masthead if configured to not display' do
|
@@ -77,9 +73,7 @@ describe 'Add and update the site masthead', type: :feature do
|
|
77
73
|
end
|
78
74
|
|
79
75
|
click_button 'Save changes'
|
80
|
-
|
81
76
|
expect(page).to have_content('The site was successfully updated.')
|
82
|
-
|
83
77
|
expect(page).to_not have_css('.image-masthead .background-container')
|
84
78
|
end
|
85
79
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
1
|
describe Spotlight::BlacklightConfiguration, type: :model do
|
4
2
|
subject { described_class.new }
|
5
3
|
let(:blacklight_config) { Blacklight::Configuration.new }
|
@@ -79,6 +77,11 @@ describe Spotlight::BlacklightConfiguration, type: :model do
|
|
79
77
|
expect(subject.blacklight_config.facet_fields['b'].sort).to eq 'index'
|
80
78
|
end
|
81
79
|
|
80
|
+
it 'respects upstream configuration that disables the field entirely' do
|
81
|
+
blacklight_config.add_facet_field 'a', if: false
|
82
|
+
expect(subject.blacklight_config.facet_fields['a'].if).to eq false
|
83
|
+
end
|
84
|
+
|
82
85
|
context 'custom fields' do
|
83
86
|
it 'includes any custom fields' do
|
84
87
|
allow(subject).to receive_messages(custom_facet_fields: { 'a' => double(if: nil, :if= => true, merge!: true, validate!: true, normalize!: true) })
|
@@ -346,6 +349,11 @@ describe Spotlight::BlacklightConfiguration, type: :model do
|
|
346
349
|
expect(subject.blacklight_config.search_fields.select { |_k, v| v.enabled == true }).to include('a', 'c')
|
347
350
|
expect(subject.blacklight_config.search_fields.select { |_k, v| v.enabled == true }).not_to include('b', 'd')
|
348
351
|
end
|
352
|
+
|
353
|
+
it 'respects upstream configuration that disables the field entirely' do
|
354
|
+
blacklight_config.add_search_field 'a', if: false
|
355
|
+
expect(subject.blacklight_config.search_fields['a'].if).to eq false
|
356
|
+
end
|
349
357
|
end
|
350
358
|
|
351
359
|
describe 'per page' do
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
1
|
describe Spotlight::ContactEmail, type: :model do
|
4
2
|
let(:exhibit) { FactoryGirl.create(:exhibit) }
|
5
3
|
subject { described_class.new(exhibit: exhibit) }
|
@@ -18,12 +16,6 @@ describe Spotlight::ContactEmail, type: :model do
|
|
18
16
|
before { subject.email = 'foo@example.com' }
|
19
17
|
it { is_expected.to be_valid }
|
20
18
|
|
21
|
-
describe 'when saved' do
|
22
|
-
it 'sends a confirmation' do
|
23
|
-
expect(subject).to receive(:send_devise_notification)
|
24
|
-
subject.save
|
25
|
-
end
|
26
|
-
end
|
27
19
|
describe '#send_devise_notification' do
|
28
20
|
it 'sends stuff' do
|
29
21
|
expect do
|