blacklight-spotlight 3.0.0.rc4 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (215) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/blacklight/close.svg +1 -0
  3. data/app/assets/images/blacklight/zoom_in.svg +1 -0
  4. data/app/assets/images/blacklight/zoom_out.svg +1 -0
  5. data/app/assets/javascripts/spotlight/admin/blocks/uploaded_items_block.js +8 -1
  6. data/app/assets/javascripts/spotlight/admin/catalog_edit.js +13 -47
  7. data/app/assets/javascripts/spotlight/admin/exhibit_tag_autocomplete.js +37 -0
  8. data/app/assets/javascripts/spotlight/admin/{reindex_monitor.js → progress_monitor.js} +25 -4
  9. data/app/assets/javascripts/spotlight/admin/sir-trevor/locales.js +1 -1
  10. data/app/assets/javascripts/spotlight/user/zpr_links.js.erb +29 -14
  11. data/app/assets/stylesheets/spotlight/_browse.scss +8 -0
  12. data/app/assets/stylesheets/spotlight/_catalog.scss +30 -4
  13. data/app/assets/stylesheets/spotlight/_exhibit_admin.scss +9 -0
  14. data/app/assets/stylesheets/spotlight/_modals.scss +3 -0
  15. data/app/assets/stylesheets/spotlight/_nestable.scss +8 -0
  16. data/app/assets/stylesheets/spotlight/_spotlight.scss +2 -0
  17. data/app/assets/stylesheets/spotlight/_view_larger.scss +22 -0
  18. data/app/assets/stylesheets/spotlight/typeahead.css +23 -23
  19. data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +4 -2
  20. data/app/controllers/concerns/spotlight/base.rb +1 -1
  21. data/app/controllers/concerns/spotlight/catalog.rb +7 -1
  22. data/app/controllers/spotlight/browse_controller.rb +9 -15
  23. data/app/controllers/spotlight/bulk_actions_controller.rb +62 -0
  24. data/app/controllers/spotlight/bulk_updates_controller.rb +67 -0
  25. data/app/controllers/spotlight/catalog_controller.rb +12 -12
  26. data/app/controllers/spotlight/dashboards_controller.rb +5 -4
  27. data/app/controllers/spotlight/featured_images_controller.rb +1 -1
  28. data/app/controllers/spotlight/job_trackers_controller.rb +17 -0
  29. data/app/controllers/spotlight/pages_controller.rb +6 -7
  30. data/app/controllers/spotlight/tags_controller.rb +39 -5
  31. data/app/helpers/spotlight/application_helper.rb +1 -1
  32. data/app/helpers/spotlight/job_trackers_helper.rb +31 -0
  33. data/app/helpers/spotlight/main_app_helpers.rb +3 -4
  34. data/app/helpers/spotlight/meta_helper.rb +2 -2
  35. data/app/helpers/spotlight/pages_helper.rb +0 -7
  36. data/app/helpers/spotlight/roles_helper.rb +1 -1
  37. data/app/helpers/spotlight/searches_helper.rb +1 -1
  38. data/app/jobs/concerns/spotlight/gather_documents.rb +35 -0
  39. data/app/jobs/concerns/spotlight/job_tracking.rb +40 -23
  40. data/app/jobs/spotlight/add_tags_job.rb +31 -0
  41. data/app/jobs/spotlight/add_uploads_from_csv.rb +2 -4
  42. data/app/jobs/spotlight/change_visibility_job.rb +33 -0
  43. data/app/jobs/spotlight/process_bulk_updates_csv_job.rb +82 -0
  44. data/app/jobs/spotlight/reindex_exhibit_job.rb +5 -2
  45. data/app/jobs/spotlight/reindex_job.rb +35 -23
  46. data/app/jobs/spotlight/remove_tags_job.rb +31 -0
  47. data/app/jobs/spotlight/rename_sidecar_field_job.rb +1 -0
  48. data/app/jobs/spotlight/rename_tags_job.rb +33 -0
  49. data/app/models/concerns/spotlight/browse_category_search_builder.rb +59 -0
  50. data/app/models/concerns/spotlight/exhibit_analytics.rb +2 -6
  51. data/app/models/concerns/spotlight/exhibit_documents.rb +2 -2
  52. data/app/models/concerns/spotlight/resources/web.rb +1 -1
  53. data/app/models/concerns/spotlight/search_builder.rb +11 -0
  54. data/app/models/concerns/spotlight/solr_document.rb +1 -1
  55. data/app/models/concerns/spotlight/solr_document/atomic_updates.rb +2 -2
  56. data/app/models/concerns/spotlight/user.rb +5 -1
  57. data/app/models/sir_trevor_rails/blocks/browse_block.rb +1 -1
  58. data/app/models/sir_trevor_rails/blocks/featured_pages_block.rb +1 -1
  59. data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +9 -0
  60. data/app/models/sir_trevor_rails/blocks/uploaded_items_block.rb +4 -0
  61. data/app/models/spotlight/ability.rb +6 -2
  62. data/app/models/spotlight/attachment.rb +1 -1
  63. data/app/models/spotlight/{reindex_progress.rb → background_job_progress.rb} +8 -7
  64. data/app/models/spotlight/blacklight_configuration.rb +26 -6
  65. data/app/models/spotlight/bulk_update.rb +8 -0
  66. data/app/models/spotlight/exhibit.rb +2 -1
  67. data/app/models/spotlight/feature_page.rb +0 -2
  68. data/app/models/spotlight/featured_image.rb +40 -1
  69. data/app/models/spotlight/field_metadata.rb +4 -8
  70. data/app/models/spotlight/job_tracker.rb +11 -2
  71. data/app/models/spotlight/page.rb +1 -3
  72. data/app/models/spotlight/page_configurations.rb +10 -9
  73. data/app/models/spotlight/resource.rb +4 -4
  74. data/app/models/spotlight/resources/iiif_harvester.rb +2 -2
  75. data/app/models/spotlight/resources/iiif_service.rb +8 -1
  76. data/app/models/spotlight/resources/upload.rb +2 -2
  77. data/app/models/spotlight/role.rb +1 -2
  78. data/app/presenters/spotlight/iiif_manifest_presenter.rb +2 -2
  79. data/app/services/spotlight/bulk_updates_csv_template_service.rb +93 -0
  80. data/app/services/spotlight/etl/executor.rb +1 -3
  81. data/app/services/spotlight/iiif_resource_resolver.rb +1 -1
  82. data/app/uploaders/spotlight/bulk_updates_uploader.rb +7 -0
  83. data/app/uploaders/spotlight/featured_image_uploader.rb +1 -1
  84. data/app/views/catalog/_add_tags.html.erb +28 -0
  85. data/app/views/catalog/_bulk_actions.html.erb +12 -0
  86. data/app/views/catalog/_change_visibility.html.erb +35 -0
  87. data/app/views/catalog/_curator_actions.html.erb +3 -0
  88. data/app/views/catalog/_remove_tags.html.erb +37 -0
  89. data/app/views/catalog/_save_search.html.erb +1 -1
  90. data/app/views/spotlight/about_pages/_sidebar.html.erb +2 -2
  91. data/app/views/spotlight/browse/_search.html.erb +3 -3
  92. data/app/views/spotlight/browse/_search_box.html.erb +9 -9
  93. data/app/views/spotlight/browse/_search_title.html.erb +1 -1
  94. data/app/views/spotlight/bulk_updates/_download.html.erb +23 -0
  95. data/app/views/spotlight/bulk_updates/_overview.html.erb +1 -0
  96. data/app/views/spotlight/bulk_updates/_progress_panel.html.erb +19 -0
  97. data/app/views/spotlight/bulk_updates/_upload.html.erb +12 -0
  98. data/app/views/spotlight/bulk_updates/edit.html.erb +37 -0
  99. data/app/views/spotlight/catalog/_admin_header.html.erb +1 -1
  100. data/app/views/spotlight/catalog/_admin_index_header_default.html.erb +1 -1
  101. data/app/views/spotlight/catalog/_admin_thumbnail_default.html.erb +3 -2
  102. data/app/views/spotlight/catalog/_edit_default.html.erb +2 -2
  103. data/app/views/spotlight/catalog/_reindex_progress_panel.html.erb +1 -1
  104. data/app/views/spotlight/catalog/index.iiif_json.jbuilder +1 -1
  105. data/app/views/spotlight/custom_fields/_form.html.erb +1 -1
  106. data/app/views/spotlight/custom_search_fields/_form.html.erb +1 -1
  107. data/app/views/spotlight/dashboards/_reindexing_activity.html.erb +1 -1
  108. data/app/views/spotlight/exhibits/_exhibit_card.html.erb +1 -1
  109. data/app/views/spotlight/feature_pages/_sidebar.html.erb +1 -1
  110. data/app/views/spotlight/featured_images/_form.html.erb +1 -1
  111. data/app/views/spotlight/job_trackers/show.html.erb +79 -0
  112. data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +2 -2
  113. data/app/views/spotlight/pages/_form.html.erb +2 -2
  114. data/app/views/spotlight/pages/_order_pages.html.erb +2 -2
  115. data/app/views/spotlight/pages/_view_type_group.html.erb +3 -3
  116. data/app/views/spotlight/pages/show.html.erb +1 -1
  117. data/app/views/spotlight/resources/_form.html.erb +1 -1
  118. data/app/views/spotlight/resources/csv_upload/_form.html.erb +1 -1
  119. data/app/views/spotlight/resources/iiif/_form.html.erb +1 -1
  120. data/app/views/spotlight/resources/json_upload/_form.html.erb +2 -2
  121. data/app/views/spotlight/resources/upload/_form.html.erb +1 -1
  122. data/app/views/spotlight/search_configurations/_document_index_view_types.html.erb +2 -2
  123. data/app/views/spotlight/searches/_form.html.erb +2 -2
  124. data/app/views/spotlight/shared/_curation_sidebar.html.erb +3 -0
  125. data/app/views/spotlight/sir_trevor/blocks/_browse_group_categories_block.html.erb +3 -3
  126. data/app/views/spotlight/sir_trevor/blocks/_search_results_block.html.erb +1 -1
  127. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +8 -8
  128. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +7 -7
  129. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +9 -7
  130. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +5 -5
  131. data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +4 -0
  132. data/app/views/spotlight/tags/_tag.html.erb +24 -0
  133. data/app/views/spotlight/tags/index.html.erb +12 -16
  134. data/app/views/spotlight/translations/show.yaml.yamlbuilder +6 -0
  135. data/config/i18n-tasks.yml +1 -0
  136. data/config/locales/spotlight.en.yml +169 -10
  137. data/config/routes.rb +29 -1
  138. data/db/migrate/20210126123041_create_events.rb +1 -1
  139. data/db/migrate/20210305070001_remove_class_from_sirtrevor_image_blocks.rb +20 -0
  140. data/db/migrate/20210305171150_create_bulk_updates.rb +9 -0
  141. data/db/migrate/20210308090000_migrate_caption_values_for_title_key.rb +29 -0
  142. data/db/migrate/20210506070809_add_indexes_for_featured_images.rb +9 -0
  143. data/lib/generators/spotlight/install_generator.rb +2 -2
  144. data/lib/generators/spotlight/templates/config/initializers/riiif.rb +7 -5
  145. data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +1 -1
  146. data/lib/generators/spotlight/templates/solr/config/schema.xml +1 -1
  147. data/lib/migration/iiif.rb +3 -3
  148. data/lib/spotlight/engine.rb +14 -0
  149. data/lib/spotlight/version.rb +1 -1
  150. data/spec/controllers/spotlight/browse_controller_spec.rb +0 -6
  151. data/spec/controllers/spotlight/bulk_actions_controller_spec.rb +124 -0
  152. data/spec/controllers/spotlight/bulk_updates_controller_spec.rb +77 -0
  153. data/spec/controllers/spotlight/catalog_controller_spec.rb +12 -12
  154. data/spec/controllers/spotlight/featured_images_controller_spec.rb +3 -3
  155. data/spec/controllers/spotlight/job_trackers_controller_spec.rb +37 -0
  156. data/spec/controllers/spotlight/tags_controller_spec.rb +5 -1
  157. data/spec/examples.txt +1496 -1442
  158. data/spec/factories/bulk_updates.rb +15 -0
  159. data/spec/factories/exhibits.rb +4 -0
  160. data/spec/factories/job_trackers.rb +2 -0
  161. data/spec/factories/users.rb +27 -8
  162. data/spec/features/add_items_spec.rb +1 -1
  163. data/spec/features/bulk_actions_spec.rb +72 -0
  164. data/spec/features/catalog_spec.rb +1 -0
  165. data/spec/features/import_exhibit_spec.rb +5 -1
  166. data/spec/features/javascript/blocks/solr_documents_block_spec.rb +4 -4
  167. data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +27 -1
  168. data/spec/features/site_users_management_spec.rb +4 -4
  169. data/spec/fixtures/bulk-update-template.csv +57 -0
  170. data/spec/fixtures/updated-bulk-update-template-w-tags.csv +4 -0
  171. data/spec/fixtures/updated-bulk-update-template.csv +4 -0
  172. data/spec/helpers/spotlight/application_helper_spec.rb +5 -6
  173. data/spec/helpers/spotlight/pages_helper_spec.rb +0 -15
  174. data/spec/helpers/spotlight/roles_helper_spec.rb +1 -1
  175. data/spec/i18n_spec.rb +1 -0
  176. data/spec/jobs/spotlight/add_tags_job_spec.rb +34 -0
  177. data/spec/jobs/spotlight/add_uploads_from_csv_spec.rb +4 -1
  178. data/spec/jobs/spotlight/change_visibility_job_spec.rb +30 -0
  179. data/spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb +78 -0
  180. data/spec/jobs/spotlight/reindex_job_spec.rb +4 -1
  181. data/spec/jobs/spotlight/remove_tags_job_spec.rb +39 -0
  182. data/spec/lib/migration/iiif_spec.rb +1 -1
  183. data/spec/models/spotlight/ability_spec.rb +27 -0
  184. data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +1 -2
  185. data/spec/models/spotlight/{reindex_progress_spec.rb → background_job_progress_spec.rb} +15 -2
  186. data/spec/models/spotlight/blacklight_configuration_spec.rb +22 -17
  187. data/spec/models/spotlight/browse_category_search_builder_spec.rb +49 -0
  188. data/spec/models/spotlight/exhibit_spec.rb +1 -1
  189. data/spec/models/spotlight/featured_image_spec.rb +13 -1
  190. data/spec/models/spotlight/resource_spec.rb +23 -0
  191. data/spec/models/spotlight/solr_document/atomic_updates_spec.rb +10 -0
  192. data/spec/presenters/spotlight/iiif_manifest_presenter_spec.rb +1 -1
  193. data/spec/services/spotlight/bulk_updates_csv_template_service_spec.rb +26 -0
  194. data/spec/test_app_templates/Gemfile.extra +1 -0
  195. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  196. data/spec/uploaders/spotlight/featured_image_uploader_spec.rb +2 -2
  197. data/spec/views/spotlight/catalog/_edit_default.html.erb_spec.rb +1 -1
  198. data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +2 -0
  199. data/spec/views/spotlight/job_trackers/show.html.erb_spec.rb +65 -0
  200. data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +3 -4
  201. data/spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb +1 -1
  202. data/spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb +1 -1
  203. data/spec/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb_spec.rb +1 -1
  204. data/spec/views/spotlight/sir_trevor/blocks/_rule_block.html.erb_spec.rb +1 -1
  205. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb_spec.rb +8 -4
  206. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb +7 -2
  207. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb_spec.rb +8 -5
  208. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb_spec.rb +3 -2
  209. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb_spec.rb +9 -4
  210. data/spec/views/spotlight/tags/index.html.erb_spec.rb +5 -2
  211. metadata +90 -21
  212. data/app/assets/images/blacklight/add_circle.svg +0 -1
  213. data/app/assets/images/blacklight/custom_fullscreen.svg +0 -1
  214. data/app/assets/images/blacklight/remove_circle.svg +0 -1
  215. data/app/assets/images/blacklight/resize_small.svg +0 -1
@@ -37,6 +37,16 @@ describe Spotlight::SolrDocument::AtomicUpdates, type: :model do
37
37
  subject.reindex
38
38
  end
39
39
 
40
+ it 'update parameters can be specified to modify commitWithin' do
41
+ expected = {
42
+ params: { commitWithin: 5001 },
43
+ data: [{ id: 'doc_id', a: { set: 1 }, b: { set: 2 }, timestamp: { set: nil } }].to_json,
44
+ headers: { 'Content-Type' => 'application/json' }
45
+ }
46
+ expect(blacklight_solr).to receive(:update).with(expected)
47
+ subject.reindex(update_params: { commitWithin: 5001 })
48
+ end
49
+
40
50
  it 'cowardlies refuse to index a document if the only value is an id' do
41
51
  allow(subject).to receive_messages(to_solr: { id: 'doc_id' }, timestamp: { set: nil })
42
52
  expect(blacklight_solr).not_to receive(:update)
@@ -16,7 +16,7 @@ describe Spotlight::IiifManifestPresenter do
16
16
  end
17
17
 
18
18
  describe 'public methods' do
19
- let(:helpers) { double(show_presenter: presenter) }
19
+ let(:helpers) { double(document_presenter: presenter) }
20
20
  let(:presenter) { instance_double(Blacklight::ShowPresenter, heading: title_field_value) }
21
21
 
22
22
  let(:iiif_url) { 'https://iiif.test/images/1-1' }
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe Spotlight::BulkUpdatesCsvTemplateService do
6
+ subject(:service) { described_class.new(exhibit: exhibit) }
7
+
8
+ let(:exhibit) { FactoryBot.create(:exhibit) }
9
+ let!(:tag1) { FactoryBot.create(:tagging, tagger: exhibit, taggable: exhibit) }
10
+ let!(:tag2) { FactoryBot.create(:tagging, tagger: exhibit, taggable: exhibit) }
11
+
12
+ describe '#template' do
13
+ let(:view_context) { double('ViewContext', document_presenter: double('DocumentPresenter', heading: 'Document Title')) }
14
+
15
+ it 'has a row for every document (+ the header)' do
16
+ template = CSV.parse(service.template(view_context: view_context).to_a.join)
17
+ expect(template).to have_at_least(56).items
18
+ expect(template[0].join(',')).to match(/Item ID,Item Title,Visibility,Tag: tagging\d,Tag: tagging\d/)
19
+ end
20
+
21
+ it 'only has requested columns' do
22
+ template = CSV.parse(service.template(view_context: view_context, tags: false).to_a.join)
23
+ expect(template[0].join(',')).to eq 'Item ID,Item Title,Visibility'
24
+ end
25
+ end
26
+ end
@@ -1 +1,2 @@
1
1
  gem 'sprockets', '< 4' if ENV['RAILS_VERSION'] && ENV['RAILS_VERSION'] < '6'
2
+ gem 'view_component', '!= 2.26.0'
@@ -10,7 +10,7 @@ class TestAppGenerator < Rails::Generators::Base
10
10
  end
11
11
 
12
12
  def add_gems
13
- gem 'blacklight', '~> 7.0'
13
+ gem 'blacklight', '~> 7.17'
14
14
  gem 'blacklight-gallery', '~> 3.0'
15
15
  Bundler.with_clean_env do
16
16
  run 'bundle install'
@@ -5,9 +5,9 @@ describe Spotlight::FeaturedImageUploader do
5
5
 
6
6
  let(:mounter) { FactoryBot.create(:featured_image) }
7
7
 
8
- describe '#extension_whitelist' do
8
+ describe '#extension_allowlist' do
9
9
  it 'is the configured array of approved extension to be uploaded' do
10
- expect(featured_image_uploader.extension_whitelist).to eq Spotlight::Engine.config.allowed_upload_extensions
10
+ expect(featured_image_uploader.extension_allowlist).to eq Spotlight::Engine.config.allowed_upload_extensions
11
11
  end
12
12
  end
13
13
 
@@ -25,7 +25,7 @@ describe 'spotlight/catalog/_edit_default.html.erb', type: :view do
25
25
  it 'has a edit tag form' do
26
26
  render
27
27
  expect(rendered).to have_field 'solr_document_exhibit_tag_list'
28
- expect(rendered).to have_selector '#solr_document_exhibit_tag_list[@data-autocomplete_url="autocomplete-path.json"]'
28
+ expect(rendered).to have_selector '#solr_document_exhibit_tag_list[@data-autocomplete-url="autocomplete-path.json"]'
29
29
  end
30
30
 
31
31
  it 'does not have special metadata editing fields for non-uploaded resources' do
@@ -2,9 +2,11 @@
2
2
 
3
3
  describe 'spotlight/dashboards/_reindexing_activity.html.erb', type: :view do
4
4
  let(:p) { 'spotlight/dashboards/reindexing_activity' }
5
+ let(:exhibit) { FactoryBot.build(:exhibit) }
5
6
 
6
7
  before do
7
8
  assign(:recent_reindexing, recent_reindexing)
9
+ allow(view).to receive(:current_exhibit).and_return(exhibit)
8
10
  end
9
11
 
10
12
  context 'the reindexing log is empty' do
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ describe 'spotlight/job_trackers/show', type: :view do
4
+ let(:exhibit) { FactoryBot.create(:exhibit) }
5
+ let(:job_tracker) { FactoryBot.create(:job_tracker, job_class: 'Spotlight::ReindexExhibitJob', on: exhibit, user: user) }
6
+ let(:user) { FactoryBot.create(:user) }
7
+
8
+ before do
9
+ assign(:exhibit, exhibit)
10
+ assign(:job_tracker, job_tracker)
11
+
12
+ allow(view).to receive_messages(current_exhibit: exhibit)
13
+ end
14
+
15
+ it 'displays the type of job' do
16
+ render
17
+ expect(rendered).to have_selector 'h2', text: 'Spotlight::ReindexExhibitJob'
18
+ end
19
+
20
+ it 'displays the job status for enqueued jobs' do
21
+ job_tracker.update(status: 'enqueued')
22
+ render
23
+ expect(rendered).to have_content '⏱'
24
+ end
25
+
26
+ it 'displays the job status for failed jobs' do
27
+ job_tracker.update(status: 'failed')
28
+ render
29
+ expect(rendered).to have_content '🟥'
30
+ expect(rendered).to have_content 'job failed'
31
+ end
32
+
33
+ it 'displays the job status for successful jobs' do
34
+ job_tracker.update(status: 'completed')
35
+ render
36
+ expect(rendered).to have_content '✅'
37
+ expect(rendered).to have_content 'job completed'
38
+ end
39
+
40
+ it 'display job started events' do
41
+ render
42
+ expect(rendered).to have_selector 'tr', text: '1 job started', normalize_ws: true
43
+ end
44
+
45
+ it 'records who started the job' do
46
+ render
47
+ expect(rendered).to have_selector 'tr', text: "2 job created by #{user.email}", normalize_ws: true
48
+ end
49
+
50
+ it 'displays logged messages' do
51
+ job_tracker.events.create(data: { message: 'this is a useful log message' })
52
+ job_tracker.events.create(data: { message: 'and so is this' })
53
+
54
+ render
55
+ expect(rendered).to have_selector 'tr', text: 'this is a useful log message'
56
+ expect(rendered).to have_selector 'tr', text: 'and so is this'
57
+ end
58
+
59
+ it 'displays job progress information' do
60
+ allow(job_tracker).to receive_messages(progress: 37, total: 51)
61
+
62
+ render
63
+ expect(rendered).to have_content 'processed 37 / 51'
64
+ end
65
+ end
@@ -2,9 +2,9 @@
2
2
 
3
3
  describe 'spotlight/metadata_configurations/_metadata_field', type: :view do
4
4
  let(:exhibit) { FactoryBot.create(:exhibit) }
5
- let(:field) { Blacklight::Configuration::Field.new immutable: OpenStruct.new(another_view_type: false) }
5
+ let(:field) { Blacklight::Configuration::Field.new label: 'Some label', immutable: OpenStruct.new(another_view_type: false) }
6
6
  let(:builder) { ActionView::Helpers::FormBuilder.new 'z', nil, view, {} }
7
- let(:p) { 'spotlight/metadata_configurations/metadata_field.html.erb' }
7
+ let(:p) { 'spotlight/metadata_configurations/metadata_field' }
8
8
 
9
9
  before do
10
10
  assign(:exhibit, exhibit)
@@ -17,8 +17,7 @@ describe 'spotlight/metadata_configurations/_metadata_field', type: :view do
17
17
  )
18
18
  end
19
19
 
20
- it 'uses the index_field_label helper to render the label' do
21
- allow(view).to receive(:index_field_label).with(anything, 'some_key').and_return 'Some label'
20
+ it 'uses the metadata field label' do
22
21
  render partial: p, locals: { key: 'some_key', config: field, f: builder }
23
22
  expect(rendered).to have_selector '.field-label', text: 'Some label'
24
23
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_browse_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/browse_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/browse_block' }
5
5
  let(:page) { double('Page', display_sidebar?: true) }
6
6
  let(:search) { FactoryBot.create(:search) }
7
7
  let(:block) do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_iframe_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/iframe_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/iframe_block' }
5
5
  let(:block) do
6
6
  OpenStruct.new
7
7
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_link_to_search_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/link_to_search_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/link_to_search_block' }
5
5
  let(:page) { double('Page', display_sidebar?: true) }
6
6
  let(:search) { FactoryBot.create(:search, query_params: { a: 1 }) }
7
7
  let(:block) do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_rule_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/rule_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/rule_block' }
5
5
 
6
6
  it 'has an hr' do
7
7
  render partial: p
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_solr_documents_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_block' }
5
5
  let(:page) { double('Page') }
6
6
  let(:block) do
7
7
  SirTrevorRails::Blocks::SolrDocumentsBlock.new({ type: 'block', data: { title: 'Some title', text: 'Some text', 'text-align' => 'right' } }, page)
@@ -9,10 +9,14 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_block.html.erb', type: :vi
9
9
  let(:doc) { blacklight_config.document_model.new(id: 1) }
10
10
  let(:blacklight_config) do
11
11
  Blacklight::Configuration.new do |config|
12
- config.view.embed.partials = %w[a b c]
13
- config.view.embed.locals = { a: 1 }
12
+ config.view.embed(partials: %w[a b c], locals: { a: 1 })
14
13
  end
15
14
  end
15
+ let(:stub_presenter) do
16
+ instance_double(Blacklight::DocumentPresenter, heading: 'blah', thumbnail: thumbnail_presenter)
17
+ end
18
+
19
+ let(:thumbnail_presenter) { instance_double(Blacklight::ThumbnailPresenter, exists?: true, thumbnail_tag: 'thumb') }
16
20
 
17
21
  before do
18
22
  allow(block).to receive(:each_document).and_yield({}, doc)
@@ -21,7 +25,7 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_block.html.erb', type: :vi
21
25
 
22
26
  before do
23
27
  allow(view).to receive(:blacklight_config).and_return(blacklight_config)
24
- allow(view).to receive_messages(has_thumbnail?: true, render_thumbnail_tag: 'thumb', document_link_params: {})
28
+ allow(view).to receive_messages(document_presenter: stub_presenter, document_link_params: {})
25
29
  end
26
30
 
27
31
  context 'with a multi-image object' do
@@ -1,10 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_carousel_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_carousel_block' }
5
5
  let(:block) do
6
6
  SirTrevorRails::Blocks::SolrDocumentsCarouselBlock.new({ type: 'block', data: {} }, page)
7
7
  end
8
+ let(:stub_presenter) do
9
+ instance_double(Blacklight::DocumentPresenter, heading: 'blah', thumbnail: thumbnail_presenter)
10
+ end
11
+
12
+ let(:thumbnail_presenter) { instance_double(Blacklight::ThumbnailPresenter, exists?: true, thumbnail_tag: 'thumb') }
8
13
 
9
14
  before do
10
15
  allow(block).to receive(:each_document).and_return([
@@ -14,7 +19,7 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb',
14
19
  ])
15
20
  allow(block).to receive_messages(documents?: true)
16
21
  allow(view).to receive_messages(solr_documents_carousel_block: block)
17
- allow(view).to receive_messages(has_thumbnail?: true, render_thumbnail_tag: 'thumb', blacklight_config: Blacklight::Configuration.new)
22
+ allow(view).to receive_messages(document_presenter: stub_presenter, blacklight_config: Blacklight::Configuration.new)
18
23
  end
19
24
 
20
25
  it 'has a slideshow block' do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_embed_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_embed_block' }
5
5
  let(:page) { double('Page') }
6
6
  let(:block) do
7
7
  SirTrevorRails::Blocks::SolrDocumentsEmbedBlock.new({ type: 'block', data: { title: 'Some title', text: 'Some text', 'text-align' => 'right' } }, page)
@@ -9,10 +9,14 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb', typ
9
9
  let(:doc) { blacklight_config.document_model.new(id: 1) }
10
10
  let(:blacklight_config) do
11
11
  Blacklight::Configuration.new do |config|
12
- config.view.embed.partials = %w[a b c]
13
- config.view.embed.locals = { a: 1 }
12
+ config.view.embed(partials: %w[a b c], locals: { a: 1 })
14
13
  end
15
14
  end
15
+ let(:stub_presenter) do
16
+ instance_double(Blacklight::DocumentPresenter, heading: 'blah', thumbnail: thumbnail_presenter)
17
+ end
18
+
19
+ let(:thumbnail_presenter) { instance_double(Blacklight::ThumbnailPresenter, exists?: true, thumbnail_tag: 'thumb') }
16
20
 
17
21
  before do
18
22
  allow(block).to receive(:each_document).and_yield({}, doc)
@@ -20,8 +24,7 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb', typ
20
24
  end
21
25
 
22
26
  before do
23
- allow(view).to receive(:blacklight_config).and_return(blacklight_config)
24
- allow(view).to receive_messages(has_thumbnail?: true, render_thumbnail_tag: 'thumb')
27
+ allow(view).to receive_messages(blacklight_config: blacklight_config, document_presenter: stub_presenter)
25
28
  end
26
29
 
27
30
  it 'has a embed block' do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_features_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_features_block' }
5
5
  let(:block) do
6
6
  SirTrevorRails::Blocks::SolrDocumentsFeaturesBlock.new({ type: 'block', data: { 'show-primary-caption' => true, 'primary-caption-field' => 'x' } }, page)
7
7
  end
@@ -19,7 +19,8 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb',
19
19
  allow(block).to receive(:each_document).and_return([doc1, doc2, doc3])
20
20
  allow(block).to receive_messages(documents?: true)
21
21
  allow(view).to receive_messages(solr_documents_features_block: block)
22
- allow(view).to receive_messages(has_thumbnail?: true, render_thumbnail_tag: 'thumb', blacklight_config: blacklight_config)
22
+ allow(view).to receive_messages(blacklight_config: blacklight_config)
23
+ allow_any_instance_of(Blacklight::ThumbnailPresenter).to receive_messages(exists?: true, thumbnail_tag: 'thumb')
23
24
  end
24
25
 
25
26
  it 'has a slideshow block' do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- describe 'spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_grid_block.html.erb' }
3
+ describe 'spotlight/sir_trevor/blocks/_solr_documents_grid_block', type: :view do
4
+ let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_grid_block' }
5
5
  let(:page) { double('Page') }
6
6
  let(:block) do
7
7
  SirTrevorRails::Blocks::SolrDocumentsGridBlock.new({ type: 'block', data: { title: 'Some title', text: 'Some text', 'text-align' => 'right' } }, page)
@@ -10,6 +10,12 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb', type
10
10
  Blacklight::Configuration.new
11
11
  end
12
12
 
13
+ let(:stub_presenter) do
14
+ instance_double(Blacklight::DocumentPresenter, heading: 'blah', thumbnail: thumbnail_presenter)
15
+ end
16
+
17
+ let(:thumbnail_presenter) { instance_double(Blacklight::ThumbnailPresenter, exists?: true, thumbnail_tag: 'thumb') }
18
+
13
19
  before do
14
20
  allow(block).to receive(:each_document).and_return([
15
21
  [{}, SolrDocument.new(id: 1)],
@@ -21,8 +27,7 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb', type
21
27
  before do
22
28
  allow(view).to receive_messages(
23
29
  blacklight_config: blacklight_config,
24
- has_thumbnail?: true,
25
- render_thumbnail_tag: 'thumb'
30
+ document_presenter: stub_presenter
26
31
  )
27
32
  end
28
33
 
@@ -11,14 +11,17 @@ describe 'spotlight/tags/index.html.erb', type: :view do
11
11
  allow(view).to receive_messages(exhibit_tag_path: '/tags')
12
12
  allow(view).to receive(:current_exhibit).and_return(exhibit)
13
13
  allow(view).to receive(:url_to_tag_facet, &:first)
14
+ allow(view).to receive_messages(update_all_exhibit_tags_path: '/update_all')
15
+ allow(view).to receive(:exhibit_path)
14
16
  end
15
17
 
16
18
  describe 'Tags' do
17
19
  it 'is displayed' do
18
20
  render
21
+ puts rendered
19
22
  [tag1.tag.name, tag2.tag.name].each do |name|
20
- expect(rendered).to have_css('td', text: name)
21
- expect(rendered).to have_link(name, href: 't')
23
+ expect(rendered).to have_css('h4', text: name)
24
+ expect(rendered).to have_link(name, href: '#edit-in-place')
22
25
  end
23
26
  end
24
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc4
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-02-04 00:00:00.000000000 Z
14
+ date: 2021-05-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activejob-status
@@ -67,14 +67,14 @@ dependencies:
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: '7.0'
70
+ version: '7.18'
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '7.0'
77
+ version: '7.18'
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: bootstrap_form
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -93,16 +93,22 @@ dependencies:
93
93
  name: breadcrumbs_on_rails
94
94
  requirement: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - "~>"
96
+ - - ">="
97
97
  - !ruby/object:Gem::Version
98
98
  version: '3.0'
99
+ - - "<"
100
+ - !ruby/object:Gem::Version
101
+ version: '5'
99
102
  type: :runtime
100
103
  prerelease: false
101
104
  version_requirements: !ruby/object:Gem::Requirement
102
105
  requirements:
103
- - - "~>"
106
+ - - ">="
104
107
  - !ruby/object:Gem::Version
105
108
  version: '3.0'
109
+ - - "<"
110
+ - !ruby/object:Gem::Version
111
+ version: '5'
106
112
  - !ruby/object:Gem::Dependency
107
113
  name: cancancan
108
114
  requirement: !ruby/object:Gem::Requirement
@@ -121,16 +127,16 @@ dependencies:
121
127
  name: carrierwave
122
128
  requirement: !ruby/object:Gem::Requirement
123
129
  requirements:
124
- - - ">="
130
+ - - "~>"
125
131
  - !ruby/object:Gem::Version
126
- version: '0'
132
+ version: '2.2'
127
133
  type: :runtime
128
134
  prerelease: false
129
135
  version_requirements: !ruby/object:Gem::Requirement
130
136
  requirements:
131
- - - ">="
137
+ - - "~>"
132
138
  - !ruby/object:Gem::Version
133
- version: '0'
139
+ version: '2.2'
134
140
  - !ruby/object:Gem::Dependency
135
141
  name: clipboard-rails
136
142
  requirement: !ruby/object:Gem::Requirement
@@ -871,7 +877,6 @@ files:
871
877
  - LICENSE
872
878
  - README.md
873
879
  - Rakefile
874
- - app/assets/images/blacklight/add_circle.svg
875
880
  - app/assets/images/blacklight/arrow-alt-circle-left.svg
876
881
  - app/assets/images/blacklight/arrow-alt-circle-right.svg
877
882
  - app/assets/images/blacklight/arrow_back_ios.svg
@@ -879,14 +884,14 @@ files:
879
884
  - app/assets/images/blacklight/check.svg
880
885
  - app/assets/images/blacklight/check_circle.svg
881
886
  - app/assets/images/blacklight/chevron_right.svg
882
- - app/assets/images/blacklight/custom_fullscreen.svg
887
+ - app/assets/images/blacklight/close.svg
883
888
  - app/assets/images/blacklight/edit.svg
884
889
  - app/assets/images/blacklight/error.svg
885
890
  - app/assets/images/blacklight/highlight_off.svg
886
891
  - app/assets/images/blacklight/info.svg
887
- - app/assets/images/blacklight/remove_circle.svg
888
- - app/assets/images/blacklight/resize_small.svg
889
892
  - app/assets/images/blacklight/warning.svg
893
+ - app/assets/images/blacklight/zoom_in.svg
894
+ - app/assets/images/blacklight/zoom_out.svg
890
895
  - app/assets/images/spotlight/blocks/sir-trevor-icons.svg
891
896
  - app/assets/images/spotlight/default_browse_thumbnail.jpg
892
897
  - app/assets/images/spotlight/default_thumbnail.jpg
@@ -921,6 +926,7 @@ files:
921
926
  - app/assets/javascripts/spotlight/admin/crop.es6
922
927
  - app/assets/javascripts/spotlight/admin/croppable.js
923
928
  - app/assets/javascripts/spotlight/admin/edit_in_place.js
929
+ - app/assets/javascripts/spotlight/admin/exhibit_tag_autocomplete.js
924
930
  - app/assets/javascripts/spotlight/admin/exhibits.js
925
931
  - app/assets/javascripts/spotlight/admin/form_observer.js
926
932
  - app/assets/javascripts/spotlight/admin/iiif.es6
@@ -928,8 +934,8 @@ files:
928
934
  - app/assets/javascripts/spotlight/admin/locks.js
929
935
  - app/assets/javascripts/spotlight/admin/multi_image_selector.js
930
936
  - app/assets/javascripts/spotlight/admin/pages.js.erb
937
+ - app/assets/javascripts/spotlight/admin/progress_monitor.js
931
938
  - app/assets/javascripts/spotlight/admin/readonly_checkbox.js
932
- - app/assets/javascripts/spotlight/admin/reindex_monitor.js
933
939
  - app/assets/javascripts/spotlight/admin/search_typeahead.js
934
940
  - app/assets/javascripts/spotlight/admin/select_related_input.js
935
941
  - app/assets/javascripts/spotlight/admin/sir-trevor/block_controls.js
@@ -968,6 +974,7 @@ files:
968
974
  - app/assets/stylesheets/spotlight/_header.scss
969
975
  - app/assets/stylesheets/spotlight/_item_text_block.scss
970
976
  - app/assets/stylesheets/spotlight/_mixins.scss
977
+ - app/assets/stylesheets/spotlight/_modals.scss
971
978
  - app/assets/stylesheets/spotlight/_multi_image_selector.scss
972
979
  - app/assets/stylesheets/spotlight/_multi_up_item_grid.scss
973
980
  - app/assets/stylesheets/spotlight/_nestable.scss
@@ -982,6 +989,7 @@ files:
982
989
  - app/assets/stylesheets/spotlight/_utilities.scss
983
990
  - app/assets/stylesheets/spotlight/_variables.scss
984
991
  - app/assets/stylesheets/spotlight/_variables_bootstrap.scss
992
+ - app/assets/stylesheets/spotlight/_view_larger.scss
985
993
  - app/assets/stylesheets/spotlight/browse_group_categories_block.scss
986
994
  - app/assets/stylesheets/spotlight/typeahead.css
987
995
  - app/builders/spotlight/bootstrap_breadcrumbs_builder.rb
@@ -996,6 +1004,8 @@ files:
996
1004
  - app/controllers/spotlight/application_controller.rb
997
1005
  - app/controllers/spotlight/attachments_controller.rb
998
1006
  - app/controllers/spotlight/browse_controller.rb
1007
+ - app/controllers/spotlight/bulk_actions_controller.rb
1008
+ - app/controllers/spotlight/bulk_updates_controller.rb
999
1009
  - app/controllers/spotlight/catalog_controller.rb
1000
1010
  - app/controllers/spotlight/concerns/application_controller.rb
1001
1011
  - app/controllers/spotlight/concerns/catalog_search_context.rb
@@ -1012,6 +1022,7 @@ files:
1012
1022
  - app/controllers/spotlight/filters_controller.rb
1013
1023
  - app/controllers/spotlight/groups_controller.rb
1014
1024
  - app/controllers/spotlight/home_pages_controller.rb
1025
+ - app/controllers/spotlight/job_trackers_controller.rb
1015
1026
  - app/controllers/spotlight/languages_controller.rb
1016
1027
  - app/controllers/spotlight/lock_controller.rb
1017
1028
  - app/controllers/spotlight/metadata_configurations_controller.rb
@@ -1033,6 +1044,7 @@ files:
1033
1044
  - app/helpers/spotlight/browse_helper.rb
1034
1045
  - app/helpers/spotlight/crop_helper.rb
1035
1046
  - app/helpers/spotlight/crud_link_helpers.rb
1047
+ - app/helpers/spotlight/job_trackers_helper.rb
1036
1048
  - app/helpers/spotlight/languages_helper.rb
1037
1049
  - app/helpers/spotlight/main_app_helpers.rb
1038
1050
  - app/helpers/spotlight/masthead_helper.rb
@@ -1045,15 +1057,21 @@ files:
1045
1057
  - app/helpers/spotlight/searches_helper.rb
1046
1058
  - app/helpers/spotlight/title_helper.rb
1047
1059
  - app/helpers/spotlight/translations_helper.rb
1060
+ - app/jobs/concerns/spotlight/gather_documents.rb
1048
1061
  - app/jobs/concerns/spotlight/job_tracking.rb
1049
1062
  - app/jobs/concerns/spotlight/limit_concurrency.rb
1063
+ - app/jobs/spotlight/add_tags_job.rb
1050
1064
  - app/jobs/spotlight/add_uploads_from_csv.rb
1051
1065
  - app/jobs/spotlight/application_job.rb
1066
+ - app/jobs/spotlight/change_visibility_job.rb
1052
1067
  - app/jobs/spotlight/cleanup_job_trackers_job.rb
1053
1068
  - app/jobs/spotlight/default_thumbnail_job.rb
1069
+ - app/jobs/spotlight/process_bulk_updates_csv_job.rb
1054
1070
  - app/jobs/spotlight/reindex_exhibit_job.rb
1055
1071
  - app/jobs/spotlight/reindex_job.rb
1072
+ - app/jobs/spotlight/remove_tags_job.rb
1056
1073
  - app/jobs/spotlight/rename_sidecar_field_job.rb
1074
+ - app/jobs/spotlight/rename_tags_job.rb
1057
1075
  - app/jobs/spotlight/update_job_trackers_job.rb
1058
1076
  - app/mailers/spotlight/confirmation_mailer.rb
1059
1077
  - app/mailers/spotlight/contact_mailer.rb
@@ -1062,11 +1080,13 @@ files:
1062
1080
  - app/models/ability.rb
1063
1081
  - app/models/concerns/spotlight/access_controls_enforcement_search_builder.rb
1064
1082
  - app/models/concerns/spotlight/blacklight_configuration_defaults.rb
1083
+ - app/models/concerns/spotlight/browse_category_search_builder.rb
1065
1084
  - app/models/concerns/spotlight/custom_translation_extension.rb
1066
1085
  - app/models/concerns/spotlight/exhibit_analytics.rb
1067
1086
  - app/models/concerns/spotlight/exhibit_defaults.rb
1068
1087
  - app/models/concerns/spotlight/exhibit_documents.rb
1069
1088
  - app/models/concerns/spotlight/resources/web.rb
1089
+ - app/models/concerns/spotlight/search_builder.rb
1070
1090
  - app/models/concerns/spotlight/sitemap.rb
1071
1091
  - app/models/concerns/spotlight/solr_document.rb
1072
1092
  - app/models/concerns/spotlight/solr_document/atomic_updates.rb
@@ -1093,7 +1113,9 @@ files:
1093
1113
  - app/models/spotlight/analytics/ga.rb
1094
1114
  - app/models/spotlight/analytics/ga_model.rb
1095
1115
  - app/models/spotlight/attachment.rb
1116
+ - app/models/spotlight/background_job_progress.rb
1096
1117
  - app/models/spotlight/blacklight_configuration.rb
1118
+ - app/models/spotlight/bulk_update.rb
1097
1119
  - app/models/spotlight/contact.rb
1098
1120
  - app/models/spotlight/contact_email.rb
1099
1121
  - app/models/spotlight/contact_form.rb
@@ -1119,7 +1141,6 @@ files:
1119
1141
  - app/models/spotlight/page_configurations.rb
1120
1142
  - app/models/spotlight/page_content.rb
1121
1143
  - app/models/spotlight/page_content/sir_trevor.rb
1122
- - app/models/spotlight/reindex_progress.rb
1123
1144
  - app/models/spotlight/resource.rb
1124
1145
  - app/models/spotlight/resources/csv_upload.rb
1125
1146
  - app/models/spotlight/resources/iiif_harvester.rb
@@ -1133,6 +1154,7 @@ files:
1133
1154
  - app/models/spotlight/solr_document_sidecar.rb
1134
1155
  - app/models/spotlight/temporary_image.rb
1135
1156
  - app/presenters/spotlight/iiif_manifest_presenter.rb
1157
+ - app/services/spotlight/bulk_updates_csv_template_service.rb
1136
1158
  - app/services/spotlight/carrierwave_file_resolver.rb
1137
1159
  - app/services/spotlight/clone_translated_page_from_locale.rb
1138
1160
  - app/services/spotlight/etl.rb
@@ -1149,12 +1171,18 @@ files:
1149
1171
  - app/services/spotlight/invite_users_service.rb
1150
1172
  - app/services/spotlight/validity_checker.rb
1151
1173
  - app/uploaders/spotlight/attachment_uploader.rb
1174
+ - app/uploaders/spotlight/bulk_updates_uploader.rb
1152
1175
  - app/uploaders/spotlight/featured_image_uploader.rb
1153
1176
  - app/values/custom_field_name.rb
1154
1177
  - app/views/blacklight/nav/_bookmark.html.erb
1155
1178
  - app/views/blacklight/nav/_saved_searches.html.erb
1156
1179
  - app/views/blacklight/nav/_search_history.html.erb
1180
+ - app/views/catalog/_add_tags.html.erb
1181
+ - app/views/catalog/_bulk_actions.html.erb
1182
+ - app/views/catalog/_change_visibility.html.erb
1183
+ - app/views/catalog/_curator_actions.html.erb
1157
1184
  - app/views/catalog/_image_default.html.erb
1185
+ - app/views/catalog/_remove_tags.html.erb
1158
1186
  - app/views/catalog/_save_search.html.erb
1159
1187
  - app/views/devise/confirmations/new.html.erb
1160
1188
  - app/views/devise/mailer/invitation_instructions.html.erb
@@ -1189,6 +1217,11 @@ files:
1189
1217
  - app/views/spotlight/browse/_tophat.html.erb
1190
1218
  - app/views/spotlight/browse/index.html.erb
1191
1219
  - app/views/spotlight/browse/show.html.erb
1220
+ - app/views/spotlight/bulk_updates/_download.html.erb
1221
+ - app/views/spotlight/bulk_updates/_overview.html.erb
1222
+ - app/views/spotlight/bulk_updates/_progress_panel.html.erb
1223
+ - app/views/spotlight/bulk_updates/_upload.html.erb
1224
+ - app/views/spotlight/bulk_updates/edit.html.erb
1192
1225
  - app/views/spotlight/catalog/_admin_header.html.erb
1193
1226
  - app/views/spotlight/catalog/_admin_index_header_default.html.erb
1194
1227
  - app/views/spotlight/catalog/_admin_thumbnail_default.html.erb
@@ -1256,6 +1289,7 @@ files:
1256
1289
  - app/views/spotlight/home_pages/_tophat.html.erb
1257
1290
  - app/views/spotlight/indexing_complete_mailer/documents_indexed.html.erb
1258
1291
  - app/views/spotlight/invitation_mailer/exhibit_invitation_notification.html.erb
1292
+ - app/views/spotlight/job_trackers/show.html.erb
1259
1293
  - app/views/spotlight/locks/_lock.html.erb
1260
1294
  - app/views/spotlight/metadata_configurations/_metadata_field.html.erb
1261
1295
  - app/views/spotlight/metadata_configurations/edit.html.erb
@@ -1327,6 +1361,7 @@ files:
1327
1361
  - app/views/spotlight/sites/_exhibit.html.erb
1328
1362
  - app/views/spotlight/sites/edit.html.erb
1329
1363
  - app/views/spotlight/sites/edit_exhibits.html.erb
1364
+ - app/views/spotlight/tags/_tag.html.erb
1330
1365
  - app/views/spotlight/tags/index.html.erb
1331
1366
  - app/views/spotlight/translations/_browse_categories.html.erb
1332
1367
  - app/views/spotlight/translations/_general.html.erb
@@ -1420,6 +1455,10 @@ files:
1420
1455
  - db/migrate/20210113092223_create_spotlight_groups.rb
1421
1456
  - db/migrate/20210122082032_create_job_trackers.rb
1422
1457
  - db/migrate/20210126123041_create_events.rb
1458
+ - db/migrate/20210305070001_remove_class_from_sirtrevor_image_blocks.rb
1459
+ - db/migrate/20210305171150_create_bulk_updates.rb
1460
+ - db/migrate/20210308090000_migrate_caption_values_for_title_key.rb
1461
+ - db/migrate/20210506070809_add_indexes_for_featured_images.rb
1423
1462
  - lib/blacklight/spotlight.rb
1424
1463
  - lib/generators/spotlight/install_generator.rb
1425
1464
  - lib/generators/spotlight/scaffold_resource_generator.rb
@@ -1449,6 +1488,8 @@ files:
1449
1488
  - spec/controllers/spotlight/application_controller_spec.rb
1450
1489
  - spec/controllers/spotlight/attachments_controller_spec.rb
1451
1490
  - spec/controllers/spotlight/browse_controller_spec.rb
1491
+ - spec/controllers/spotlight/bulk_actions_controller_spec.rb
1492
+ - spec/controllers/spotlight/bulk_updates_controller_spec.rb
1452
1493
  - spec/controllers/spotlight/catalog_controller_spec.rb
1453
1494
  - spec/controllers/spotlight/confirmations_controller_spec.rb
1454
1495
  - spec/controllers/spotlight/contact_email_controller_spec.rb
@@ -1463,6 +1504,7 @@ files:
1463
1504
  - spec/controllers/spotlight/filters_controller_spec.rb
1464
1505
  - spec/controllers/spotlight/groups_controller_spec.rb
1465
1506
  - spec/controllers/spotlight/home_pages_controller_spec.rb
1507
+ - spec/controllers/spotlight/job_trackers_controller_spec.rb
1466
1508
  - spec/controllers/spotlight/languages_controller_spec.rb
1467
1509
  - spec/controllers/spotlight/metadata_configurations_controller_spec.rb
1468
1510
  - spec/controllers/spotlight/pages_controller_spec.rb
@@ -1479,6 +1521,7 @@ files:
1479
1521
  - spec/controllers/spotlight/versions_controller_spec.rb
1480
1522
  - spec/controllers/spotlight/view_configurations_controller_spec.rb
1481
1523
  - spec/examples.txt
1524
+ - spec/factories/bulk_updates.rb
1482
1525
  - spec/factories/contact_emails.rb
1483
1526
  - spec/factories/contact_images.rb
1484
1527
  - spec/factories/contacts.rb
@@ -1507,6 +1550,7 @@ files:
1507
1550
  - spec/features/browse_category_admin_spec.rb
1508
1551
  - spec/features/browse_category_navigation_spec.rb
1509
1552
  - spec/features/browse_category_spec.rb
1553
+ - spec/features/bulk_actions_spec.rb
1510
1554
  - spec/features/catalog_spec.rb
1511
1555
  - spec/features/confirm_email_spec.rb
1512
1556
  - spec/features/create_exhibit_spec.rb
@@ -1559,11 +1603,14 @@ files:
1559
1603
  - spec/features/translation_scope_spec.rb
1560
1604
  - spec/fixtures/800x600.png
1561
1605
  - spec/fixtures/avatar.png
1606
+ - spec/fixtures/bulk-update-template.csv
1562
1607
  - spec/fixtures/csv-upload-fixture.csv
1563
1608
  - spec/fixtures/gk446cj2442-manifest.json
1564
1609
  - spec/fixtures/iiif_responses.rb
1565
1610
  - spec/fixtures/json-upload-fixture.json
1566
1611
  - spec/fixtures/sample_solr_documents.yml
1612
+ - spec/fixtures/updated-bulk-update-template-w-tags.csv
1613
+ - spec/fixtures/updated-bulk-update-template.csv
1567
1614
  - spec/helpers/spotlight/application_helper_spec.rb
1568
1615
  - spec/helpers/spotlight/browse_helper_spec.rb
1569
1616
  - spec/helpers/spotlight/crop_helper_spec.rb
@@ -1579,10 +1626,14 @@ files:
1579
1626
  - spec/helpers/spotlight/title_helper_spec.rb
1580
1627
  - spec/helpers/spotlight/translations_helper_spec.rb
1581
1628
  - spec/i18n_spec.rb
1629
+ - spec/jobs/spotlight/add_tags_job_spec.rb
1582
1630
  - spec/jobs/spotlight/add_uploads_from_csv_spec.rb
1631
+ - spec/jobs/spotlight/change_visibility_job_spec.rb
1583
1632
  - spec/jobs/spotlight/default_thumbnail_job_spec.rb
1633
+ - spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb
1584
1634
  - spec/jobs/spotlight/reindex_exhibit_job_spec.rb
1585
1635
  - spec/jobs/spotlight/reindex_job_spec.rb
1636
+ - spec/jobs/spotlight/remove_tags_job_spec.rb
1586
1637
  - spec/jobs/spotlight/rename_sidecar_field_job_spec.rb
1587
1638
  - spec/lib/migration/iiif_spec.rb
1588
1639
  - spec/lib/migration/page_language_spec.rb
@@ -1601,7 +1652,9 @@ files:
1601
1652
  - spec/models/spotlight/about_page_spec.rb
1602
1653
  - spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb
1603
1654
  - spec/models/spotlight/analytics/ga_spec.rb
1655
+ - spec/models/spotlight/background_job_progress_spec.rb
1604
1656
  - spec/models/spotlight/blacklight_configuration_spec.rb
1657
+ - spec/models/spotlight/browse_category_search_builder_spec.rb
1605
1658
  - spec/models/spotlight/contact_email_spec.rb
1606
1659
  - spec/models/spotlight/contact_form_spec.rb
1607
1660
  - spec/models/spotlight/contact_image_spec.rb
@@ -1622,7 +1675,6 @@ files:
1622
1675
  - spec/models/spotlight/masthead_spec.rb
1623
1676
  - spec/models/spotlight/page_configurations_spec.rb
1624
1677
  - spec/models/spotlight/page_spec.rb
1625
- - spec/models/spotlight/reindex_progress_spec.rb
1626
1678
  - spec/models/spotlight/resource_spec.rb
1627
1679
  - spec/models/spotlight/resources/iiif_harvester_spec.rb
1628
1680
  - spec/models/spotlight/resources/iiif_manifest_spec.rb
@@ -1642,6 +1694,7 @@ files:
1642
1694
  - spec/routing/spotlight/exhibit_catalog_spec.rb
1643
1695
  - spec/routing/spotlight/featured_images_spec.rb
1644
1696
  - spec/routing/spotlight/pages_routing_spec.rb
1697
+ - spec/services/spotlight/bulk_updates_csv_template_service_spec.rb
1645
1698
  - spec/services/spotlight/carrierwave_file_resolver_spec.rb
1646
1699
  - spec/services/spotlight/clone_translated_page_from_locale_spec.rb
1647
1700
  - spec/services/spotlight/etl/context_spec.rb
@@ -1698,6 +1751,7 @@ files:
1698
1751
  - spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
1699
1752
  - spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
1700
1753
  - spec/views/spotlight/home_pages/_sidebar.html.erb_spec.rb
1754
+ - spec/views/spotlight/job_trackers/show.html.erb_spec.rb
1701
1755
  - spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb
1702
1756
  - spec/views/spotlight/metadata_configurations/edit.html.erb_spec.rb
1703
1757
  - spec/views/spotlight/pages/_form.html.erb_spec.rb
@@ -1773,12 +1827,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
1773
1827
  requirements:
1774
1828
  - - ">="
1775
1829
  - !ruby/object:Gem::Version
1776
- version: '2.5'
1830
+ version: '2.6'
1777
1831
  required_rubygems_version: !ruby/object:Gem::Requirement
1778
1832
  requirements:
1779
- - - ">"
1833
+ - - ">="
1780
1834
  - !ruby/object:Gem::Version
1781
- version: 1.3.1
1835
+ version: '0'
1782
1836
  requirements: []
1783
1837
  rubygems_version: 3.2.3
1784
1838
  signing_key:
@@ -1793,6 +1847,8 @@ test_files:
1793
1847
  - spec/controllers/spotlight/application_controller_spec.rb
1794
1848
  - spec/controllers/spotlight/attachments_controller_spec.rb
1795
1849
  - spec/controllers/spotlight/browse_controller_spec.rb
1850
+ - spec/controllers/spotlight/bulk_actions_controller_spec.rb
1851
+ - spec/controllers/spotlight/bulk_updates_controller_spec.rb
1796
1852
  - spec/controllers/spotlight/catalog_controller_spec.rb
1797
1853
  - spec/controllers/spotlight/confirmations_controller_spec.rb
1798
1854
  - spec/controllers/spotlight/contact_email_controller_spec.rb
@@ -1807,6 +1863,7 @@ test_files:
1807
1863
  - spec/controllers/spotlight/filters_controller_spec.rb
1808
1864
  - spec/controllers/spotlight/groups_controller_spec.rb
1809
1865
  - spec/controllers/spotlight/home_pages_controller_spec.rb
1866
+ - spec/controllers/spotlight/job_trackers_controller_spec.rb
1810
1867
  - spec/controllers/spotlight/languages_controller_spec.rb
1811
1868
  - spec/controllers/spotlight/metadata_configurations_controller_spec.rb
1812
1869
  - spec/controllers/spotlight/pages_controller_spec.rb
@@ -1823,6 +1880,7 @@ test_files:
1823
1880
  - spec/controllers/spotlight/versions_controller_spec.rb
1824
1881
  - spec/controllers/spotlight/view_configurations_controller_spec.rb
1825
1882
  - spec/examples.txt
1883
+ - spec/factories/bulk_updates.rb
1826
1884
  - spec/factories/contact_emails.rb
1827
1885
  - spec/factories/contact_images.rb
1828
1886
  - spec/factories/contacts.rb
@@ -1851,6 +1909,7 @@ test_files:
1851
1909
  - spec/features/browse_category_admin_spec.rb
1852
1910
  - spec/features/browse_category_navigation_spec.rb
1853
1911
  - spec/features/browse_category_spec.rb
1912
+ - spec/features/bulk_actions_spec.rb
1854
1913
  - spec/features/catalog_spec.rb
1855
1914
  - spec/features/confirm_email_spec.rb
1856
1915
  - spec/features/create_exhibit_spec.rb
@@ -1903,11 +1962,14 @@ test_files:
1903
1962
  - spec/features/translation_scope_spec.rb
1904
1963
  - spec/fixtures/800x600.png
1905
1964
  - spec/fixtures/avatar.png
1965
+ - spec/fixtures/bulk-update-template.csv
1906
1966
  - spec/fixtures/csv-upload-fixture.csv
1907
1967
  - spec/fixtures/gk446cj2442-manifest.json
1908
1968
  - spec/fixtures/iiif_responses.rb
1909
1969
  - spec/fixtures/json-upload-fixture.json
1910
1970
  - spec/fixtures/sample_solr_documents.yml
1971
+ - spec/fixtures/updated-bulk-update-template-w-tags.csv
1972
+ - spec/fixtures/updated-bulk-update-template.csv
1911
1973
  - spec/helpers/spotlight/application_helper_spec.rb
1912
1974
  - spec/helpers/spotlight/browse_helper_spec.rb
1913
1975
  - spec/helpers/spotlight/crop_helper_spec.rb
@@ -1923,10 +1985,14 @@ test_files:
1923
1985
  - spec/helpers/spotlight/title_helper_spec.rb
1924
1986
  - spec/helpers/spotlight/translations_helper_spec.rb
1925
1987
  - spec/i18n_spec.rb
1988
+ - spec/jobs/spotlight/add_tags_job_spec.rb
1926
1989
  - spec/jobs/spotlight/add_uploads_from_csv_spec.rb
1990
+ - spec/jobs/spotlight/change_visibility_job_spec.rb
1927
1991
  - spec/jobs/spotlight/default_thumbnail_job_spec.rb
1992
+ - spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb
1928
1993
  - spec/jobs/spotlight/reindex_exhibit_job_spec.rb
1929
1994
  - spec/jobs/spotlight/reindex_job_spec.rb
1995
+ - spec/jobs/spotlight/remove_tags_job_spec.rb
1930
1996
  - spec/jobs/spotlight/rename_sidecar_field_job_spec.rb
1931
1997
  - spec/lib/migration/iiif_spec.rb
1932
1998
  - spec/lib/migration/page_language_spec.rb
@@ -1945,7 +2011,9 @@ test_files:
1945
2011
  - spec/models/spotlight/about_page_spec.rb
1946
2012
  - spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb
1947
2013
  - spec/models/spotlight/analytics/ga_spec.rb
2014
+ - spec/models/spotlight/background_job_progress_spec.rb
1948
2015
  - spec/models/spotlight/blacklight_configuration_spec.rb
2016
+ - spec/models/spotlight/browse_category_search_builder_spec.rb
1949
2017
  - spec/models/spotlight/contact_email_spec.rb
1950
2018
  - spec/models/spotlight/contact_form_spec.rb
1951
2019
  - spec/models/spotlight/contact_image_spec.rb
@@ -1966,7 +2034,6 @@ test_files:
1966
2034
  - spec/models/spotlight/masthead_spec.rb
1967
2035
  - spec/models/spotlight/page_configurations_spec.rb
1968
2036
  - spec/models/spotlight/page_spec.rb
1969
- - spec/models/spotlight/reindex_progress_spec.rb
1970
2037
  - spec/models/spotlight/resource_spec.rb
1971
2038
  - spec/models/spotlight/resources/iiif_harvester_spec.rb
1972
2039
  - spec/models/spotlight/resources/iiif_manifest_spec.rb
@@ -1986,6 +2053,7 @@ test_files:
1986
2053
  - spec/routing/spotlight/exhibit_catalog_spec.rb
1987
2054
  - spec/routing/spotlight/featured_images_spec.rb
1988
2055
  - spec/routing/spotlight/pages_routing_spec.rb
2056
+ - spec/services/spotlight/bulk_updates_csv_template_service_spec.rb
1989
2057
  - spec/services/spotlight/carrierwave_file_resolver_spec.rb
1990
2058
  - spec/services/spotlight/clone_translated_page_from_locale_spec.rb
1991
2059
  - spec/services/spotlight/etl/context_spec.rb
@@ -2042,6 +2110,7 @@ test_files:
2042
2110
  - spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
2043
2111
  - spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
2044
2112
  - spec/views/spotlight/home_pages/_sidebar.html.erb_spec.rb
2113
+ - spec/views/spotlight/job_trackers/show.html.erb_spec.rb
2045
2114
  - spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb
2046
2115
  - spec/views/spotlight/metadata_configurations/edit.html.erb_spec.rb
2047
2116
  - spec/views/spotlight/pages/_form.html.erb_spec.rb