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.
Files changed (352) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/app/assets/stylesheets/spotlight/_breadcrumbs.scss +2 -4
  4. data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +2 -2
  5. data/app/controllers/concerns/spotlight/controller.rb +13 -12
  6. data/app/controllers/spotlight/attachments_controller.rb +1 -1
  7. data/app/controllers/spotlight/custom_search_fields_controller.rb +1 -1
  8. data/app/controllers/spotlight/pages_controller.rb +2 -2
  9. data/app/controllers/spotlight/roles_controller.rb +1 -1
  10. data/app/controllers/spotlight/searches_controller.rb +6 -1
  11. data/app/helpers/spotlight/application_helper.rb +1 -1
  12. data/app/helpers/spotlight/main_app_helpers.rb +1 -1
  13. data/app/helpers/spotlight/pages_helper.rb +12 -0
  14. data/app/helpers/spotlight/title_helper.rb +0 -2
  15. data/app/mailers/spotlight/confirmation_mailer.rb +2 -1
  16. data/app/models/sir_trevor_rails/block.rb +85 -0
  17. data/app/models/sir_trevor_rails/blocks/displayable.rb +1 -1
  18. data/app/models/spotlight/contact_email.rb +1 -1
  19. data/app/models/spotlight/page_configurations.rb +1 -1
  20. data/app/models/spotlight/page_content/sir_trevor.rb +13 -4
  21. data/app/models/translation.rb +18 -0
  22. data/app/services/spotlight/exhibit_import_export_service.rb +1 -1
  23. data/app/views/shared/_site_sidebar.html.erb +1 -1
  24. data/app/views/spotlight/catalog/admin.html.erb +1 -1
  25. data/app/views/spotlight/confirmation_mailer/confirmation_instructions.html.erb +3 -3
  26. data/app/views/spotlight/exhibits/_import.html.erb +1 -1
  27. data/app/views/spotlight/exhibits/_languages.html.erb +2 -2
  28. data/app/views/spotlight/filters/_form.html.erb +1 -1
  29. data/app/views/spotlight/resources/upload/_form.html.erb +1 -1
  30. data/app/views/spotlight/search_configurations/_document_index_view_types.html.erb +1 -1
  31. data/app/views/spotlight/search_configurations/_facet_metadata.html.erb +4 -2
  32. data/app/views/spotlight/search_configurations/_facets.html.erb +1 -1
  33. data/app/views/spotlight/searches/_form.html.erb +1 -1
  34. data/app/views/spotlight/sir_trevor/blocks/_video_block.html.erb +5 -0
  35. data/app/views/spotlight/translations/_browse_categories.html.erb +1 -1
  36. data/app/views/spotlight/translations/_groups.html.erb +1 -1
  37. data/app/views/spotlight/translations/_import.html.erb +1 -1
  38. data/app/views/spotlight/translations/_metadata.html.erb +1 -1
  39. data/app/views/spotlight/translations/_search_fields.html.erb +1 -1
  40. data/config/i18n-tasks.yml +2 -1
  41. data/config/locales/spotlight.de.yml +40 -0
  42. data/config/locales/spotlight.en.yml +12 -3
  43. data/lib/generators/spotlight/install_generator.rb +40 -2
  44. data/lib/generators/spotlight/templates/config/initializers/translation.rb +15 -13
  45. data/lib/generators/spotlight/templates/solr/config/schema.xml +32 -50
  46. data/lib/generators/spotlight/templates/solr/config/solrconfig.xml +14 -12
  47. data/lib/spotlight/engine.rb +4 -2
  48. data/lib/spotlight/version.rb +1 -1
  49. data/lib/tasks/spotlight_tasks.rake +40 -5
  50. metadata +110 -621
  51. data/lib/generators/spotlight/templates/config/initializers/sir_trevor_rails.rb +0 -10
  52. data/spec/controllers/application_controller_spec.rb +0 -30
  53. data/spec/controllers/spotlight/about_pages_controller_spec.rb +0 -241
  54. data/spec/controllers/spotlight/admin_users_controller_spec.rb +0 -53
  55. data/spec/controllers/spotlight/appearances_controller_spec.rb +0 -88
  56. data/spec/controllers/spotlight/application_controller_spec.rb +0 -11
  57. data/spec/controllers/spotlight/attachments_controller_spec.rb +0 -28
  58. data/spec/controllers/spotlight/browse_controller_spec.rb +0 -133
  59. data/spec/controllers/spotlight/bulk_actions_controller_spec.rb +0 -124
  60. data/spec/controllers/spotlight/bulk_updates_controller_spec.rb +0 -77
  61. data/spec/controllers/spotlight/catalog_controller_spec.rb +0 -552
  62. data/spec/controllers/spotlight/confirmations_controller_spec.rb +0 -38
  63. data/spec/controllers/spotlight/contact_email_controller_spec.rb +0 -65
  64. data/spec/controllers/spotlight/contact_forms_controller_spec.rb +0 -38
  65. data/spec/controllers/spotlight/contacts_controller_spec.rb +0 -103
  66. data/spec/controllers/spotlight/custom_fields_controller_spec.rb +0 -62
  67. data/spec/controllers/spotlight/custom_search_fields_controller_spec.rb +0 -62
  68. data/spec/controllers/spotlight/dashboards_controller_spec.rb +0 -68
  69. data/spec/controllers/spotlight/exhibits_controller_spec.rb +0 -216
  70. data/spec/controllers/spotlight/feature_pages_controller_spec.rb +0 -251
  71. data/spec/controllers/spotlight/featured_images_controller_spec.rb +0 -77
  72. data/spec/controllers/spotlight/filters_controller_spec.rb +0 -72
  73. data/spec/controllers/spotlight/groups_controller_spec.rb +0 -103
  74. data/spec/controllers/spotlight/home_pages_controller_spec.rb +0 -126
  75. data/spec/controllers/spotlight/job_trackers_controller_spec.rb +0 -37
  76. data/spec/controllers/spotlight/languages_controller_spec.rb +0 -70
  77. data/spec/controllers/spotlight/metadata_configurations_controller_spec.rb +0 -93
  78. data/spec/controllers/spotlight/pages_controller_spec.rb +0 -50
  79. data/spec/controllers/spotlight/resources/csv_upload_controller_spec.rb +0 -71
  80. data/spec/controllers/spotlight/resources/upload_controller_spec.rb +0 -55
  81. data/spec/controllers/spotlight/resources_controller_spec.rb +0 -85
  82. data/spec/controllers/spotlight/roles_controller_spec.rb +0 -141
  83. data/spec/controllers/spotlight/search_configurations_controller_spec.rb +0 -141
  84. data/spec/controllers/spotlight/searches_controller_spec.rb +0 -195
  85. data/spec/controllers/spotlight/sites_controller_spec.rb +0 -67
  86. data/spec/controllers/spotlight/solr_controller_spec.rb +0 -116
  87. data/spec/controllers/spotlight/tags_controller_spec.rb +0 -56
  88. data/spec/controllers/spotlight/translations_controller_spec.rb +0 -132
  89. data/spec/controllers/spotlight/versions_controller_spec.rb +0 -56
  90. data/spec/controllers/spotlight/view_configurations_controller_spec.rb +0 -35
  91. data/spec/examples.txt +0 -1506
  92. data/spec/factories/bulk_updates.rb +0 -21
  93. data/spec/factories/contact_emails.rb +0 -8
  94. data/spec/factories/contact_images.rb +0 -8
  95. data/spec/factories/contacts.rb +0 -11
  96. data/spec/factories/custom_fields.rb +0 -9
  97. data/spec/factories/custom_search_fields.rb +0 -9
  98. data/spec/factories/exhibit_thumbnails.rb +0 -8
  99. data/spec/factories/exhibits.rb +0 -17
  100. data/spec/factories/featured_images.rb +0 -16
  101. data/spec/factories/group.rb +0 -17
  102. data/spec/factories/job_trackers.rb +0 -11
  103. data/spec/factories/language.rb +0 -8
  104. data/spec/factories/main_navigation.rb +0 -9
  105. data/spec/factories/pages.rb +0 -34
  106. data/spec/factories/resources.rb +0 -14
  107. data/spec/factories/roles.rb +0 -9
  108. data/spec/factories/searches.rb +0 -33
  109. data/spec/factories/tags.rb +0 -14
  110. data/spec/factories/translation.rb +0 -8
  111. data/spec/factories/users.rb +0 -50
  112. data/spec/features/about_page_spec.rb +0 -46
  113. data/spec/features/add_contacts_spec.rb +0 -63
  114. data/spec/features/add_custom_field_metadata_spec.rb +0 -88
  115. data/spec/features/add_iiif_manifest_spec.rb +0 -46
  116. data/spec/features/add_items_spec.rb +0 -135
  117. data/spec/features/autocomplete_typeahead_spec.rb +0 -88
  118. data/spec/features/browse_category_admin_spec.rb +0 -163
  119. data/spec/features/browse_category_navigation_spec.rb +0 -44
  120. data/spec/features/browse_category_spec.rb +0 -158
  121. data/spec/features/bulk_actions_spec.rb +0 -72
  122. data/spec/features/catalog_spec.rb +0 -57
  123. data/spec/features/confirm_email_spec.rb +0 -21
  124. data/spec/features/create_exhibit_spec.rb +0 -65
  125. data/spec/features/create_page_spec.rb +0 -21
  126. data/spec/features/dashboard_spec.rb +0 -34
  127. data/spec/features/edit_contact_spec.rb +0 -21
  128. data/spec/features/edit_search_fields_spec.rb +0 -79
  129. data/spec/features/exhibit_masthead_spec.rb +0 -112
  130. data/spec/features/exhibit_themes_spec.rb +0 -28
  131. data/spec/features/exhibits/add_tags_spec.rb +0 -35
  132. data/spec/features/exhibits/administration_spec.rb +0 -141
  133. data/spec/features/exhibits/custom_metadata_fields_spec.rb +0 -97
  134. data/spec/features/exhibits/custom_search_fields_spec.rb +0 -55
  135. data/spec/features/exhibits/edit_metadata_fields_spec.rb +0 -49
  136. data/spec/features/exhibits/language_create_edit_spec.rb +0 -59
  137. data/spec/features/exhibits/translation_editing_spec.rb +0 -463
  138. data/spec/features/exhibits_index_spec.rb +0 -55
  139. data/spec/features/feature_page_spec.rb +0 -155
  140. data/spec/features/home_page_spec.rb +0 -102
  141. data/spec/features/import_exhibit_spec.rb +0 -58
  142. data/spec/features/item_admin_spec.rb +0 -59
  143. data/spec/features/javascript/about_page_admin_spec.rb +0 -21
  144. data/spec/features/javascript/block_controls_spec.rb +0 -42
  145. data/spec/features/javascript/blocks/browse_group_categories_block_spec.rb +0 -64
  146. data/spec/features/javascript/blocks/featured_browse_categories_block_spec.rb +0 -46
  147. data/spec/features/javascript/blocks/featured_pages_block_spec.rb +0 -61
  148. data/spec/features/javascript/blocks/link_to_search_block_spec.rb +0 -46
  149. data/spec/features/javascript/blocks/rule_block_spec.rb +0 -23
  150. data/spec/features/javascript/blocks/search_result_block_spec.rb +0 -47
  151. data/spec/features/javascript/blocks/solr_documents_block_spec.rb +0 -230
  152. data/spec/features/javascript/blocks/solr_documents_carousel_block_spec.rb +0 -29
  153. data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +0 -94
  154. data/spec/features/javascript/browse_group_admin_spec.rb +0 -45
  155. data/spec/features/javascript/edit_in_place_spec.rb +0 -93
  156. data/spec/features/javascript/feature_page_admin_spec.rb +0 -140
  157. data/spec/features/javascript/home_page_edit_spec.rb +0 -34
  158. data/spec/features/javascript/locale_selector_spec.rb +0 -66
  159. data/spec/features/javascript/metadata_admin_spec.rb +0 -41
  160. data/spec/features/javascript/multi_image_select_spec.rb +0 -50
  161. data/spec/features/javascript/reindex_monitor_spec.rb +0 -23
  162. data/spec/features/javascript/roles_admin_spec.rb +0 -38
  163. data/spec/features/javascript/search_config_admin_spec.rb +0 -140
  164. data/spec/features/javascript/search_context_spec.rb +0 -88
  165. data/spec/features/main_navigation_spec.rb +0 -96
  166. data/spec/features/metadata_admin_spec.rb +0 -18
  167. data/spec/features/report_a_problem_spec.rb +0 -62
  168. data/spec/features/site_masthead_spec.rb +0 -91
  169. data/spec/features/site_users_management_spec.rb +0 -74
  170. data/spec/features/slideshow_spec.rb +0 -21
  171. data/spec/features/translation_scope_spec.rb +0 -27
  172. data/spec/fixtures/800x600.png +0 -0
  173. data/spec/fixtures/avatar.png +0 -0
  174. data/spec/fixtures/bulk-update-template.csv +0 -57
  175. data/spec/fixtures/csv-upload-fixture.csv +0 -4
  176. data/spec/fixtures/gk446cj2442-manifest.json +0 -58
  177. data/spec/fixtures/iiif_responses.rb +0 -312
  178. data/spec/fixtures/json-upload-fixture.json +0 -3
  179. data/spec/fixtures/sample_solr_documents.yml +0 -9385
  180. data/spec/fixtures/updated-bulk-update-template-no-cols.csv +0 -4
  181. data/spec/fixtures/updated-bulk-update-template-w-tags.csv +0 -4
  182. data/spec/fixtures/updated-bulk-update-template.csv +0 -4
  183. data/spec/helpers/spotlight/application_helper_spec.rb +0 -196
  184. data/spec/helpers/spotlight/browse_helper_spec.rb +0 -13
  185. data/spec/helpers/spotlight/crop_helper_spec.rb +0 -11
  186. data/spec/helpers/spotlight/crud_link_helpers_spec.rb +0 -163
  187. data/spec/helpers/spotlight/languages_helper_spec.rb +0 -79
  188. data/spec/helpers/spotlight/main_app_helpers_spec.rb +0 -101
  189. data/spec/helpers/spotlight/masthead_helper_spec.rb +0 -51
  190. data/spec/helpers/spotlight/meta_helper_spec.rb +0 -33
  191. data/spec/helpers/spotlight/navbar_helper_spec.rb +0 -24
  192. data/spec/helpers/spotlight/pages_helper_spec.rb +0 -123
  193. data/spec/helpers/spotlight/roles_helper_spec.rb +0 -7
  194. data/spec/helpers/spotlight/search_configurations_helper_spec.rb +0 -23
  195. data/spec/helpers/spotlight/title_helper_spec.rb +0 -64
  196. data/spec/helpers/spotlight/translations_helper_spec.rb +0 -16
  197. data/spec/i18n_spec.rb +0 -28
  198. data/spec/jobs/spotlight/add_tags_job_spec.rb +0 -34
  199. data/spec/jobs/spotlight/add_uploads_from_csv_spec.rb +0 -58
  200. data/spec/jobs/spotlight/change_visibility_job_spec.rb +0 -30
  201. data/spec/jobs/spotlight/default_thumbnail_job_spec.rb +0 -14
  202. data/spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb +0 -86
  203. data/spec/jobs/spotlight/reindex_exhibit_job_spec.rb +0 -43
  204. data/spec/jobs/spotlight/reindex_job_spec.rb +0 -79
  205. data/spec/jobs/spotlight/remove_tags_job_spec.rb +0 -39
  206. data/spec/jobs/spotlight/rename_sidecar_field_job_spec.rb +0 -33
  207. data/spec/lib/migration/iiif_spec.rb +0 -91
  208. data/spec/lib/migration/page_language_spec.rb +0 -25
  209. data/spec/lib/spotlight/catalog_spec.rb +0 -0
  210. data/spec/lib/spotlight/controller_spec.rb +0 -102
  211. data/spec/lib/spotlight/upload_field_config_spec.rb +0 -40
  212. data/spec/mailers/spotlight/indexing_complete_mailer_spec.rb +0 -42
  213. data/spec/models/sir_trevor_rails/blocks/browse_block_spec.rb +0 -42
  214. data/spec/models/sir_trevor_rails/blocks/browse_group_categories_block_spec.rb +0 -41
  215. data/spec/models/sir_trevor_rails/blocks/featured_pages_block_spec.rb +0 -50
  216. data/spec/models/sir_trevor_rails/blocks/search_results_block_spec.rb +0 -23
  217. data/spec/models/sir_trevor_rails/blocks/solr_documents_block_spec.rb +0 -59
  218. data/spec/models/sir_trevor_rails/blocks/textable_spec.rb +0 -42
  219. data/spec/models/solr_document_spec.rb +0 -214
  220. data/spec/models/spotlight/ability_spec.rb +0 -118
  221. data/spec/models/spotlight/about_page_spec.rb +0 -19
  222. data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +0 -82
  223. data/spec/models/spotlight/analytics/ga_spec.rb +0 -22
  224. data/spec/models/spotlight/background_job_progress_spec.rb +0 -137
  225. data/spec/models/spotlight/blacklight_configuration_spec.rb +0 -649
  226. data/spec/models/spotlight/browse_category_search_builder_spec.rb +0 -49
  227. data/spec/models/spotlight/contact_email_spec.rb +0 -48
  228. data/spec/models/spotlight/contact_form_spec.rb +0 -94
  229. data/spec/models/spotlight/contact_image_spec.rb +0 -11
  230. data/spec/models/spotlight/contact_spec.rb +0 -38
  231. data/spec/models/spotlight/custom_field_spec.rb +0 -204
  232. data/spec/models/spotlight/custom_search_field_spec.rb +0 -56
  233. data/spec/models/spotlight/custom_translation_extension_spec.rb +0 -24
  234. data/spec/models/spotlight/exhibit_spec.rb +0 -383
  235. data/spec/models/spotlight/exhibit_thumbnail_spec.rb +0 -10
  236. data/spec/models/spotlight/feature_page_spec.rb +0 -87
  237. data/spec/models/spotlight/featured_image_spec.rb +0 -110
  238. data/spec/models/spotlight/field_metadata_spec.rb +0 -58
  239. data/spec/models/spotlight/filter_spec.rb +0 -19
  240. data/spec/models/spotlight/group_spec.rb +0 -19
  241. data/spec/models/spotlight/home_page_spec.rb +0 -38
  242. data/spec/models/spotlight/language_spec.rb +0 -42
  243. data/spec/models/spotlight/main_navigation_spec.rb +0 -19
  244. data/spec/models/spotlight/masthead_spec.rb +0 -45
  245. data/spec/models/spotlight/page_configurations_spec.rb +0 -45
  246. data/spec/models/spotlight/page_spec.rb +0 -303
  247. data/spec/models/spotlight/resource_spec.rb +0 -137
  248. data/spec/models/spotlight/resources/iiif_harvester_spec.rb +0 -52
  249. data/spec/models/spotlight/resources/iiif_manifest_spec.rb +0 -178
  250. data/spec/models/spotlight/resources/iiif_service_spec.rb +0 -57
  251. data/spec/models/spotlight/resources/upload_spec.rb +0 -71
  252. data/spec/models/spotlight/resources/web_spec.rb +0 -25
  253. data/spec/models/spotlight/role_spec.rb +0 -51
  254. data/spec/models/spotlight/search_spec.rb +0 -125
  255. data/spec/models/spotlight/site_spec.rb +0 -9
  256. data/spec/models/spotlight/sitemap_spec.rb +0 -113
  257. data/spec/models/spotlight/solr_document/atomic_updates_spec.rb +0 -56
  258. data/spec/models/spotlight/solr_document/uploaded_resource_spec.rb +0 -38
  259. data/spec/models/spotlight/solr_document_sidecar_spec.rb +0 -48
  260. data/spec/models/spotlight/user_spec.rb +0 -26
  261. data/spec/models/translation_spec.rb +0 -14
  262. data/spec/presenters/spotlight/iiif_manifest_presenter_spec.rb +0 -132
  263. data/spec/routing/spotlight/exhibit_catalog_spec.rb +0 -34
  264. data/spec/routing/spotlight/featured_images_spec.rb +0 -23
  265. data/spec/routing/spotlight/pages_routing_spec.rb +0 -42
  266. data/spec/services/spotlight/bulk_updates_csv_template_service_spec.rb +0 -26
  267. data/spec/services/spotlight/carrierwave_file_resolver_spec.rb +0 -16
  268. data/spec/services/spotlight/clone_translated_page_from_locale_spec.rb +0 -30
  269. data/spec/services/spotlight/etl/context_spec.rb +0 -66
  270. data/spec/services/spotlight/etl/executor_spec.rb +0 -149
  271. data/spec/services/spotlight/etl/pipeline_spec.rb +0 -22
  272. data/spec/services/spotlight/etl/solr_loader_spec.rb +0 -76
  273. data/spec/services/spotlight/etl/step_spec.rb +0 -70
  274. data/spec/services/spotlight/exhibit_import_export_service_spec.rb +0 -569
  275. data/spec/services/spotlight/iiif_resource_resolver_spec.rb +0 -94
  276. data/spec/services/spotlight/invite_users_service_spec.rb +0 -47
  277. data/spec/spec_helper.rb +0 -147
  278. data/spec/support/controllers/engine_helpers.rb +0 -9
  279. data/spec/support/disable_friendly_id_deprecation_warnings.rb +0 -11
  280. data/spec/support/features/capybara_default_max_wait_metadata_helper.rb +0 -20
  281. data/spec/support/features/test_features_helpers.rb +0 -92
  282. data/spec/support/helpers/controller_level_helpers.rb +0 -25
  283. data/spec/support/stub_iiif_response.rb +0 -26
  284. data/spec/support/views/test_view_helpers.rb +0 -20
  285. data/spec/test_app_templates/Gemfile.extra +0 -2
  286. data/spec/test_app_templates/carrierwave.rb +0 -8
  287. data/spec/test_app_templates/catalog_controller.rb +0 -108
  288. data/spec/test_app_templates/fixture.css +0 -0
  289. data/spec/test_app_templates/fixture.png +0 -0
  290. data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -69
  291. data/spec/test_app_templates/spotlight_test.rake +0 -14
  292. data/spec/uploaders/spotlight/attachment_uploader_spec.rb +0 -27
  293. data/spec/uploaders/spotlight/featured_image_uploader_spec.rb +0 -33
  294. data/spec/views/shared/_analytics.html.erb_spec.rb +0 -17
  295. data/spec/views/shared/_exhibit_navbar.html.erb_spec.rb +0 -127
  296. data/spec/views/shared/_header_navbar.html.erb_spec.rb +0 -12
  297. data/spec/views/shared/_masthead.html.erb_spec.rb +0 -91
  298. data/spec/views/shared/_user_util_links.html.erb_spec.rb +0 -102
  299. data/spec/views/spotlight/about_pages/_empty.html.erb_spec.rb +0 -28
  300. data/spec/views/spotlight/about_pages/_sidebar.html.erb_spec.rb +0 -24
  301. data/spec/views/spotlight/about_pages/index.html.erb_spec.rb +0 -69
  302. data/spec/views/spotlight/browse/_search.html.erb_spec.rb +0 -30
  303. data/spec/views/spotlight/browse/index.html.erb_spec.rb +0 -22
  304. data/spec/views/spotlight/browse/show.html.erb_spec.rb +0 -65
  305. data/spec/views/spotlight/catalog/_edit_default.html.erb_spec.rb +0 -63
  306. data/spec/views/spotlight/catalog/admin.html.erb_spec.rb +0 -39
  307. data/spec/views/spotlight/catalog/edit.html.erb_spec.rb +0 -20
  308. data/spec/views/spotlight/contacts/edit.html.erb_spec.rb +0 -43
  309. data/spec/views/spotlight/dashboards/_analytics.html.erb_spec.rb +0 -45
  310. data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +0 -94
  311. data/spec/views/spotlight/dashboards/analytics.html.erb_spec.rb +0 -33
  312. data/spec/views/spotlight/exhibits/_exhibit_card.html.erb_spec.rb +0 -46
  313. data/spec/views/spotlight/exhibits/_form.html.erb_spec.rb +0 -38
  314. data/spec/views/spotlight/exhibits/edit.html.erb_spec.rb +0 -29
  315. data/spec/views/spotlight/exhibits/index.html.erb_spec.rb +0 -140
  316. data/spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb +0 -28
  317. data/spec/views/spotlight/feature_pages/_sidebar.html.erb_spec.rb +0 -45
  318. data/spec/views/spotlight/featured_images/_form.html.erb_spec.rb +0 -32
  319. data/spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb +0 -32
  320. data/spec/views/spotlight/home_pages/_empty.html.erb_spec.rb +0 -28
  321. data/spec/views/spotlight/home_pages/_sidebar.html.erb_spec.rb +0 -12
  322. data/spec/views/spotlight/job_trackers/show.html.erb_spec.rb +0 -65
  323. data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +0 -30
  324. data/spec/views/spotlight/metadata_configurations/edit.html.erb_spec.rb +0 -23
  325. data/spec/views/spotlight/pages/_form.html.erb_spec.rb +0 -20
  326. data/spec/views/spotlight/pages/edit.html.erb_spec.rb +0 -68
  327. data/spec/views/spotlight/pages/index.html.erb_spec.rb +0 -42
  328. data/spec/views/spotlight/pages/new.html.erb_spec.rb +0 -21
  329. data/spec/views/spotlight/pages/show.html.erb_spec.rb +0 -84
  330. data/spec/views/spotlight/resources/_external_resources_form.html.erb_spec.rb +0 -36
  331. data/spec/views/spotlight/resources/new.html.erb_spec.rb +0 -30
  332. data/spec/views/spotlight/roles/index.html.erb_spec.rb +0 -30
  333. data/spec/views/spotlight/search_configurations/_facet_metadata.html.erb_spec.rb +0 -32
  334. data/spec/views/spotlight/search_configurations/_facets.html.erb_spec.rb +0 -54
  335. data/spec/views/spotlight/search_configurations/_search_fields.html.erb_spec.rb +0 -54
  336. data/spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb +0 -40
  337. data/spec/views/spotlight/searches/_search.html.erb_spec.rb +0 -37
  338. data/spec/views/spotlight/searches/edit.html.erb_spec.rb +0 -40
  339. data/spec/views/spotlight/searches/index.html.erb_spec.rb +0 -33
  340. data/spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb +0 -20
  341. data/spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb +0 -20
  342. data/spec/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb_spec.rb +0 -20
  343. data/spec/views/spotlight/sir_trevor/blocks/_rule_block.html.erb_spec.rb +0 -10
  344. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb_spec.rb +0 -43
  345. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb +0 -34
  346. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb_spec.rb +0 -53
  347. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb_spec.rb +0 -54
  348. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb_spec.rb +0 -42
  349. data/spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb +0 -25
  350. data/spec/views/spotlight/tags/index.html.erb_spec.rb +0 -28
  351. data/spec/views/spotlight/translations/_import.html.erb_spec.rb +0 -24
  352. 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: 56b89965ba03cecc57a91706bab8ab9d93033988608116063650459bebd4182c
4
- data.tar.gz: 9600146cf5c35a2d763c144d936ffd7e5bfc27a0f519e356dfba500696cbb8f1
3
+ metadata.gz: 8dafde1a36e1a3f3e608fd0af0c1fe94a8a19b37fcb026647cd01680bf3d6b02
4
+ data.tar.gz: b06879821f191b68bf252bca5f433ca74b11d030b0871890bbf1afdca990c1f7
5
5
  SHA512:
6
- metadata.gz: 40df9ad1c5506195ee5601834532b10e0551e362ad546e6594e88e1f4f00bd59b23b58b788b2c0541de8f907d1cfee87ef5d37131a75a208fa0e903817061a2b
7
- data.tar.gz: 8cb8bc71aa03bd906b2bdea4c51b0783d5c7be866ce0dd6ac25ac34f54c65ae106f271bd84762061c10adb795082c5cc0f358d51fcff24b947e1060b7704707d
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.5.0 or greater)
13
- 2. Rails (5.1 or greater)
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
 
@@ -1,8 +1,6 @@
1
- .breadcrumb-item {
2
- .truncated-value {
1
+ .truncated-value {
3
2
  overflow: hidden;
4
3
  text-overflow: ellipsis;
5
4
  white-space: nowrap;
6
- width: 30ex;
7
- }
5
+ max-width: 30ex;
8
6
  }
@@ -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, class: 'truncated-value') { compute_name(element) }
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
@@ -17,7 +17,7 @@ module Spotlight
17
17
 
18
18
  private
19
19
 
20
- # Only allow a trusted parameter "white list" through.
20
+ # Only allow trusted parameters through.
21
21
  def attachment_params
22
22
  params.require(:attachment).permit(:name, :file, :uid)
23
23
  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 a trusted parameter "white list" through.
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, request.query_parameters.to_query])
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 a trusted parameter "white list" through.
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: [:update_all]
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, *blacklisted_search_session_params).reject { |_k, v| v.blank? }
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 white-list of available themes: #{current_exhibit.themes}"
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 white-list of available themes: #{current_exhibit&.themes}"
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
@@ -14,7 +14,7 @@ module SirTrevorRails
14
14
  end
15
15
 
16
16
  def ordered_items
17
- items.sort_by { |x| x[:weight] }.map { |x| x[:id] }
17
+ items.sort_by { |x| x[:weight].to_i }.map { |x| x[:id] }
18
18
  end
19
19
 
20
20
  private
@@ -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
@@ -57,7 +57,7 @@ module Spotlight
57
57
  end
58
58
 
59
59
  def available_view_configs
60
- available_view_fields.map { |k, v| { key: k, label: v.display_label(k) } }
60
+ available_view_fields.map { |k, v| { key: k, label: v.display_label } }
61
61
  end
62
62
 
63
63
  def attachment_endpoint
@@ -5,12 +5,21 @@ module Spotlight
5
5
  # Sir-Trevor created content
6
6
  class SirTrevor
7
7
  def self.parse(page, attribute)
8
- content = page.read_attribute(attribute)
9
- content ||= [].to_json
8
+ blocks = page.read_attribute(attribute)
9
+ blocks ||= [].to_json
10
10
 
11
- return SirTrevorRails::BlockArray.new if content.blank?
11
+ return [] if blocks.blank?
12
12
 
13
- SirTrevorRails::BlockArray.from_json(content, page)
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].deep_stringify_keys if 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? :manange, Spotlight::Exhibit %>
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 %>
@@ -10,7 +10,7 @@
10
10
  <%- if @response.empty? %>
11
11
  <%= render "zero_results" %>
12
12
  <%- else %>
13
- <%= render_document_index %>
13
+ <%= render_document_index(@response.documents) %>
14
14
  <%- end %>
15
15
 
16
16
  <%= render 'results_pagination' %>
@@ -1,5 +1,5 @@
1
1
  <p><%= t(:'.welcome', email: @email) %></p>
2
-
3
- <p><%= t(:'.instructions') %></p>
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>
@@ -4,7 +4,7 @@
4
4
 
5
5
  <%= f.text_field :field %>
6
6
  <%= f.text_field :value %>
7
- <%= hidden_field_tag :tab, 'filter' %>
7
+ <%= hidden_field_tag :tab, 'filter', id: nil %>
8
8
 
9
9
  <div class="form-actions">
10
10
  <div class="primary-actions">
@@ -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(key) %>
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
- <% if metadata[:value_count] > Spotlight::FieldMetadata::FACET_LIMIT %>
5
- <%= content_tag :span, t(:'.too_many_values_count', count: Spotlight::FieldMetadata::FACET_LIMIT) %>
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(key) %>
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? %>
@@ -0,0 +1,5 @@
1
+ <% if video.source == 'vimeo' %>
2
+ <%= render partial: '/spotlight/sir_trevor/blocks/videos/vimeo', vimeo: video %>
3
+ <% elsif video.source == 'youtube' %>
4
+ <%= render partial: '/spotlight/sir_trevor/blocks/videos/youtube', youtube: video %>
5
+ <% end %>
@@ -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'>
@@ -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.invitation_instructions.subject # Does this even work? https://github.com/projectblacklight/spotlight/blob/master/app/mailers/spotlight/invitation_mailer.rb#L16
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