blacklight-spotlight 2.13.0 → 3.0.0.alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/blacklight/add_circle.svg +1 -0
  3. data/app/assets/images/blacklight/arrow_back_ios.svg +1 -0
  4. data/app/assets/images/blacklight/arrow_forward_ios.svg +1 -0
  5. data/app/assets/images/blacklight/check.svg +1 -0
  6. data/app/assets/images/blacklight/check_circle.svg +1 -0
  7. data/app/assets/images/blacklight/chevron_right.svg +1 -0
  8. data/app/assets/images/blacklight/custom_fullscreen.svg +1 -0
  9. data/app/assets/images/blacklight/edit.svg +1 -0
  10. data/app/assets/images/blacklight/error.svg +1 -0
  11. data/app/assets/images/blacklight/info.svg +1 -0
  12. data/app/assets/images/blacklight/remove_circle.svg +1 -0
  13. data/app/assets/images/blacklight/remove_circle_outline.svg +1 -0
  14. data/app/assets/images/blacklight/resize_small.svg +1 -0
  15. data/app/assets/images/blacklight/warning.svg +1 -0
  16. data/app/assets/javascripts/spotlight/admin/block_mixins/autocompleteable.js +1 -1
  17. data/app/assets/javascripts/spotlight/admin/block_mixins/plustextable.js +2 -2
  18. data/app/assets/javascripts/spotlight/admin/blocks/browse_block.js +1 -1
  19. data/app/assets/javascripts/spotlight/admin/blocks/pages_block.js +1 -1
  20. data/app/assets/javascripts/spotlight/admin/blocks/resources_block.js +7 -7
  21. data/app/assets/javascripts/spotlight/admin/blocks/solr_documents_base_block.js +3 -3
  22. data/app/assets/javascripts/spotlight/admin/blocks/uploaded_items_block.js +7 -7
  23. data/app/assets/javascripts/spotlight/admin/catalog_edit.js +2 -2
  24. data/app/assets/javascripts/spotlight/admin/multi_image_selector.js +2 -2
  25. data/app/assets/javascripts/spotlight/admin/reindex_monitor.js +1 -1
  26. data/app/assets/javascripts/spotlight/admin/search_typeahead.js +2 -2
  27. data/app/assets/javascripts/spotlight/admin/sir-trevor/block_controls.js +1 -1
  28. data/app/assets/javascripts/spotlight/admin/users.js +1 -1
  29. data/app/assets/javascripts/spotlight/user/index.js +1 -0
  30. data/app/assets/javascripts/spotlight/user/zpr_links.js.erb +6 -6
  31. data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +44 -4
  32. data/app/assets/stylesheets/spotlight/_blacklight_overrides.scss +4 -8
  33. data/app/assets/stylesheets/spotlight/_bootstrap_overrides.scss +31 -14
  34. data/app/assets/stylesheets/spotlight/_browse.scss +16 -13
  35. data/app/assets/stylesheets/spotlight/_catalog.scss +13 -7
  36. data/app/assets/stylesheets/spotlight/_collapse_toggle.scss +10 -14
  37. data/app/assets/stylesheets/spotlight/_curation.scss +34 -32
  38. data/app/assets/stylesheets/spotlight/_exhibit_admin.scss +4 -29
  39. data/app/assets/stylesheets/spotlight/_exhibits_index.scss +16 -14
  40. data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +22 -20
  41. data/app/assets/stylesheets/spotlight/_footer.scss +2 -2
  42. data/app/assets/stylesheets/spotlight/_header.scss +18 -39
  43. data/app/assets/stylesheets/spotlight/_item_text_block.scss +1 -24
  44. data/app/assets/stylesheets/spotlight/_mixins.scss +3 -8
  45. data/app/assets/stylesheets/spotlight/_multi_up_item_grid.scss +1 -1
  46. data/app/assets/stylesheets/spotlight/_nestable.scss +1 -2
  47. data/app/assets/stylesheets/spotlight/_pages.scss +33 -54
  48. data/app/assets/stylesheets/spotlight/_report_a_problem.scss +7 -1
  49. data/app/assets/stylesheets/spotlight/_sir-trevor_overrides.scss +9 -9
  50. data/app/assets/stylesheets/spotlight/_slideshow_block.scss +13 -11
  51. data/app/assets/stylesheets/spotlight/_spotlight.scss +0 -1
  52. data/app/assets/stylesheets/spotlight/_translations.scss +12 -12
  53. data/app/assets/stylesheets/spotlight/_variables.scss +14 -15
  54. data/app/assets/stylesheets/spotlight/_variables_bootstrap.scss +7 -7
  55. data/app/assets/stylesheets/spotlight/typeahead.css +1 -1
  56. data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +3 -2
  57. data/app/controllers/concerns/spotlight/catalog.rb +1 -1
  58. data/app/controllers/concerns/spotlight/controller.rb +3 -3
  59. data/app/controllers/concerns/spotlight/search_helper.rb +23 -0
  60. data/app/controllers/spotlight/browse_controller.rb +18 -4
  61. data/app/controllers/spotlight/catalog_controller.rb +13 -17
  62. data/app/controllers/spotlight/dashboards_controller.rb +5 -1
  63. data/app/controllers/spotlight/exhibits_controller.rb +1 -1
  64. data/app/controllers/spotlight/home_pages_controller.rb +32 -3
  65. data/app/controllers/spotlight/pages_controller.rb +19 -1
  66. data/app/controllers/spotlight/search_configurations_controller.rb +3 -3
  67. data/app/controllers/spotlight/searches_controller.rb +4 -1
  68. data/app/controllers/spotlight/solr_controller.rb +1 -2
  69. data/app/helpers/spotlight/application_helper.rb +1 -1
  70. data/app/helpers/spotlight/browse_helper.rb +1 -1
  71. data/app/helpers/spotlight/crud_link_helpers.rb +19 -0
  72. data/app/helpers/spotlight/pages_helper.rb +1 -1
  73. data/app/mailers/spotlight/contact_mailer.rb +1 -1
  74. data/app/models/concerns/spotlight/access_controls_enforcement_search_builder.rb +2 -2
  75. data/app/models/concerns/spotlight/exhibit_analytics.rb +1 -3
  76. data/app/models/concerns/spotlight/exhibit_documents.rb +1 -1
  77. data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +11 -3
  78. data/app/models/spotlight/ability.rb +1 -1
  79. data/app/models/spotlight/analytics/ga.rb +25 -35
  80. data/app/models/spotlight/analytics/ga_model.rb +29 -0
  81. data/app/models/spotlight/blacklight_configuration.rb +5 -3
  82. data/app/models/spotlight/contact_form.rb +11 -4
  83. data/app/models/spotlight/exhibit.rb +0 -4
  84. data/app/models/spotlight/field_metadata.rb +3 -9
  85. data/app/models/spotlight/page.rb +0 -3
  86. data/app/models/spotlight/page_configurations.rb +1 -1
  87. data/app/models/spotlight/role.rb +0 -4
  88. data/app/models/spotlight/search.rb +3 -17
  89. data/app/presenters/spotlight/iiif_manifest_presenter.rb +5 -1
  90. data/app/serializers/spotlight/exhibit_export_serializer.rb +69 -28
  91. data/app/serializers/spotlight/page_representer.rb +1 -1
  92. data/app/views/catalog/_save_search.html.erb +6 -4
  93. data/app/views/devise/mailer/invitation_instructions.html.erb +1 -1
  94. data/app/views/layouts/spotlight/base.html.erb +48 -0
  95. data/app/views/layouts/spotlight/spotlight.html.erb +16 -54
  96. data/app/views/shared/_about_navbar.html.erb +2 -2
  97. data/app/views/shared/_browse_navbar.html.erb +2 -2
  98. data/app/views/shared/_curated_features_navbar.html.erb +4 -4
  99. data/app/views/shared/_exhibit_navbar.html.erb +5 -5
  100. data/app/views/shared/_header_navbar.html.erb +8 -13
  101. data/app/views/shared/_masthead.html.erb +1 -1
  102. data/app/views/shared/_site_sidebar.html.erb +6 -6
  103. data/app/views/shared/_user_util_links.html.erb +47 -0
  104. data/app/views/spotlight/about_pages/_contact.html.erb +3 -4
  105. data/app/views/spotlight/about_pages/_contacts.html.erb +1 -1
  106. data/app/views/spotlight/about_pages/_sidebar.html.erb +3 -5
  107. data/app/views/spotlight/about_pages/index.html.erb +7 -6
  108. data/app/views/spotlight/admin_users/index.html.erb +78 -79
  109. data/app/views/spotlight/appearances/edit.html.erb +26 -23
  110. data/app/views/spotlight/browse/_search.html.erb +2 -2
  111. data/app/views/spotlight/browse/_search_box.html.erb +9 -6
  112. data/app/views/spotlight/browse/_search_title.html.erb +1 -1
  113. data/app/views/spotlight/browse/_sort_and_per_page.html.erb +3 -5
  114. data/app/views/spotlight/browse/index.html.erb +4 -6
  115. data/app/views/spotlight/browse/show.html.erb +1 -1
  116. data/app/views/spotlight/catalog/_admin_header.html.erb +2 -2
  117. data/app/views/spotlight/catalog/_curation_mode_toggle_default.html.erb +1 -1
  118. data/app/views/spotlight/catalog/_document_admin_table.html.erb +4 -4
  119. data/app/views/spotlight/catalog/_edit_sidecar.html.erb +1 -1
  120. data/app/views/spotlight/catalog/_index_compact_default.html.erb +1 -2
  121. data/app/views/spotlight/catalog/_reindex_progress_panel.html.erb +3 -5
  122. data/app/views/spotlight/catalog/admin.html.erb +12 -12
  123. data/app/views/spotlight/contact_forms/new.html.erb +1 -3
  124. data/app/views/spotlight/contacts/edit.html.erb +6 -5
  125. data/app/views/spotlight/contacts/new.html.erb +6 -5
  126. data/app/views/spotlight/custom_fields/edit.html.erb +6 -5
  127. data/app/views/spotlight/custom_fields/new.html.erb +6 -5
  128. data/app/views/spotlight/dashboards/_analytics.html.erb +3 -3
  129. data/app/views/spotlight/dashboards/_page.html.erb +6 -6
  130. data/app/views/spotlight/dashboards/_page_activity.html.erb +5 -5
  131. data/app/views/spotlight/dashboards/_reindexing_activity.html.erb +12 -12
  132. data/app/views/spotlight/dashboards/analytics.html.erb +11 -11
  133. data/app/views/spotlight/dashboards/show.html.erb +13 -13
  134. data/app/views/spotlight/exhibits/_confirmation_status.html.erb +3 -4
  135. data/app/views/spotlight/exhibits/_contact.html.erb +3 -3
  136. data/app/views/spotlight/exhibits/_delete.html.erb +7 -5
  137. data/app/views/spotlight/exhibits/_exhibit_card.html.erb +2 -2
  138. data/app/views/spotlight/exhibits/_exhibit_card_front.html.erb +2 -2
  139. data/app/views/spotlight/exhibits/_form.html.erb +5 -5
  140. data/app/views/spotlight/exhibits/_languages.html.erb +2 -2
  141. data/app/views/spotlight/exhibits/_new_exhibit_form.html.erb +0 -2
  142. data/app/views/spotlight/exhibits/edit.html.erb +43 -42
  143. data/app/views/spotlight/exhibits/index.html.erb +40 -41
  144. data/app/views/spotlight/exhibits/new.html.erb +4 -5
  145. data/app/views/spotlight/feature_pages/_header.html.erb +12 -14
  146. data/app/views/spotlight/feature_pages/_sidebar.html.erb +2 -4
  147. data/app/views/spotlight/featured_images/_form.html.erb +4 -4
  148. data/app/views/spotlight/filters/_form.html.erb +1 -1
  149. data/app/views/spotlight/home_pages/_edit_page_link.html.erb +1 -1
  150. data/app/views/spotlight/home_pages/_sidebar.html.erb +1 -3
  151. data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +4 -4
  152. data/app/views/spotlight/metadata_configurations/edit.html.erb +5 -4
  153. data/app/views/spotlight/pages/_edit_page_link.html.erb +1 -1
  154. data/app/views/spotlight/pages/_form.html.erb +7 -7
  155. data/app/views/spotlight/pages/_order_pages.html.erb +2 -2
  156. data/app/views/spotlight/pages/_page.html.erb +11 -11
  157. data/app/views/spotlight/pages/_view_type_group.html.erb +1 -1
  158. data/app/views/spotlight/pages/edit.html.erb +2 -4
  159. data/app/views/spotlight/pages/index.html.erb +5 -4
  160. data/app/views/spotlight/pages/show.html.erb +5 -4
  161. data/app/views/spotlight/resources/_external_resources_form.html.erb +2 -2
  162. data/app/views/spotlight/resources/_form.html.erb +1 -1
  163. data/app/views/spotlight/resources/csv_upload/_form.html.erb +1 -1
  164. data/app/views/spotlight/resources/iiif/_form.html.erb +1 -1
  165. data/app/views/spotlight/resources/json_upload/_form.html.erb +1 -1
  166. data/app/views/spotlight/resources/new.html.erb +25 -23
  167. data/app/views/spotlight/resources/upload/_form.html.erb +2 -2
  168. data/app/views/spotlight/roles/index.html.erb +60 -57
  169. data/app/views/spotlight/search_configurations/_facet_metadata.html.erb +3 -1
  170. data/app/views/spotlight/search_configurations/_facets.html.erb +19 -18
  171. data/app/views/spotlight/search_configurations/_search_fields.html.erb +6 -6
  172. data/app/views/spotlight/search_configurations/_sort.html.erb +6 -6
  173. data/app/views/spotlight/search_configurations/edit.html.erb +42 -40
  174. data/app/views/spotlight/searches/_form.html.erb +15 -10
  175. data/app/views/spotlight/searches/_search.html.erb +29 -22
  176. data/app/views/spotlight/searches/edit.html.erb +6 -5
  177. data/app/views/spotlight/searches/index.html.erb +32 -31
  178. data/app/views/spotlight/shared/_configuration_sidebar.html.erb +6 -6
  179. data/app/views/spotlight/shared/_curation_sidebar.html.erb +8 -9
  180. data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +6 -8
  181. data/app/views/spotlight/shared/_locale_picker.html.erb +3 -3
  182. data/app/views/spotlight/shared/_report_a_problem.html.erb +2 -2
  183. data/app/views/spotlight/sir_trevor/blocks/_browse_block.html.erb +1 -1
  184. data/app/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb +1 -1
  185. data/app/views/spotlight/sir_trevor/blocks/_oembed_block.html.erb +2 -2
  186. data/app/views/spotlight/sir_trevor/blocks/_search_results_block.html.erb +2 -2
  187. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +8 -8
  188. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +8 -8
  189. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb +3 -4
  190. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +32 -31
  191. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +5 -5
  192. data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +8 -10
  193. data/app/views/spotlight/sites/edit.html.erb +31 -34
  194. data/app/views/spotlight/sites/edit_exhibits.html.erb +28 -29
  195. data/app/views/spotlight/tags/index.html.erb +25 -24
  196. data/app/views/spotlight/translations/_browse_categories.html.erb +20 -15
  197. data/app/views/spotlight/translations/_general.html.erb +69 -91
  198. data/app/views/spotlight/translations/_metadata.html.erb +18 -14
  199. data/app/views/spotlight/translations/_page.html.erb +2 -2
  200. data/app/views/spotlight/translations/_search_fields.html.erb +26 -20
  201. data/app/views/spotlight/translations/edit.html.erb +16 -14
  202. data/config/locales/spotlight.en.yml +3 -0
  203. data/config/routes.rb +1 -1
  204. data/lib/generators/spotlight/install_generator.rb +2 -2
  205. data/lib/generators/spotlight/scaffold_resource_generator.rb +1 -1
  206. data/lib/generators/spotlight/templates/spotlight.scss +0 -1
  207. data/lib/spotlight/engine.rb +12 -0
  208. data/lib/spotlight/version.rb +1 -1
  209. data/spec/controllers/application_controller_spec.rb +2 -2
  210. data/spec/controllers/spotlight/browse_controller_spec.rb +1 -1
  211. data/spec/controllers/spotlight/catalog_controller_spec.rb +13 -13
  212. data/spec/controllers/spotlight/dashboards_controller_spec.rb +2 -1
  213. data/spec/controllers/spotlight/search_configurations_controller_spec.rb +1 -1
  214. data/spec/examples.txt +50 -1489
  215. data/spec/features/add_items_spec.rb +2 -2
  216. data/spec/features/browse_category_admin_spec.rb +3 -3
  217. data/spec/features/browse_category_spec.rb +3 -3
  218. data/spec/features/catalog_spec.rb +1 -1
  219. data/spec/features/exhibits/translation_editing_spec.rb +21 -21
  220. data/spec/features/feature_page_spec.rb +1 -1
  221. data/spec/features/home_page_spec.rb +3 -3
  222. data/spec/features/javascript/blocks/featured_browse_categories_block_spec.rb +1 -1
  223. data/spec/features/javascript/blocks/link_to_search_block_spec.rb +1 -1
  224. data/spec/features/javascript/blocks/search_result_block_spec.rb +9 -4
  225. data/spec/features/javascript/blocks/solr_documents_block_spec.rb +23 -15
  226. data/spec/features/javascript/blocks/solr_documents_carousel_block_spec.rb +29 -0
  227. data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +2 -2
  228. data/spec/features/javascript/edit_in_place_spec.rb +1 -0
  229. data/spec/features/javascript/feature_page_admin_spec.rb +11 -11
  230. data/spec/features/javascript/locale_selector_spec.rb +0 -1
  231. data/spec/features/javascript/multi_image_select_spec.rb +3 -3
  232. data/spec/features/javascript/reindex_monitor_spec.rb +2 -2
  233. data/spec/features/javascript/roles_admin_spec.rb +2 -2
  234. data/spec/features/javascript/search_context_spec.rb +4 -6
  235. data/spec/features/site_users_management_spec.rb +1 -1
  236. data/spec/helpers/spotlight/application_helper_spec.rb +2 -1
  237. data/spec/helpers/spotlight/crud_link_helpers_spec.rb +19 -0
  238. data/spec/helpers/spotlight/languages_helper_spec.rb +1 -0
  239. data/spec/lib/spotlight/controller_spec.rb +2 -2
  240. data/spec/models/sir_trevor_rails/blocks/solr_documents_block_spec.rb +38 -0
  241. data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +7 -6
  242. data/spec/models/spotlight/analytics/ga_spec.rb +16 -1
  243. data/spec/models/spotlight/contact_form_spec.rb +37 -5
  244. data/spec/models/spotlight/exhibit_spec.rb +8 -4
  245. data/spec/presenters/spotlight/iiif_manifest_presenter_spec.rb +4 -0
  246. data/spec/routing/spotlight/exhibit_catalog_spec.rb +15 -11
  247. data/spec/serializers/spotlight/exhibit_export_serializer_spec.rb +60 -0
  248. data/spec/test_app_templates/Gemfile.extra +3 -0
  249. data/spec/test_app_templates/catalog_controller.rb +4 -0
  250. data/spec/test_app_templates/lib/generators/test_app_generator.rb +2 -2
  251. data/spec/views/shared/_header_navbar.html.erb_spec.rb +1 -1
  252. data/spec/views/shared/_masthead.html.erb_spec.rb +1 -1
  253. data/spec/views/{_user_util_links.html.erb_spec.rb → shared/_user_util_links.html.erb_spec.rb} +1 -1
  254. data/spec/views/spotlight/about_pages/_sidebar.html.erb_spec.rb +2 -2
  255. data/spec/views/spotlight/about_pages/index.html.erb_spec.rb +2 -2
  256. data/spec/views/spotlight/browse/_search.html.erb_spec.rb +1 -1
  257. data/spec/views/spotlight/browse/_sort_and_per_page.html.erb_spec.rb +2 -13
  258. data/spec/views/spotlight/browse/show.html.erb_spec.rb +2 -2
  259. data/spec/views/spotlight/catalog/admin.html.erb_spec.rb +1 -1
  260. data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +5 -5
  261. data/spec/views/spotlight/dashboards/analytics.html.erb_spec.rb +1 -1
  262. data/spec/views/spotlight/exhibits/_exhibit_card_front.html.erb_spec.rb +2 -2
  263. data/spec/views/spotlight/exhibits/edit.html.erb_spec.rb +1 -1
  264. data/spec/views/spotlight/exhibits/index.html.erb_spec.rb +1 -1
  265. data/spec/views/spotlight/feature_pages/_sidebar.html.erb_spec.rb +7 -7
  266. data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +3 -2
  267. data/spec/views/spotlight/metadata_configurations/edit.html.erb_spec.rb +2 -1
  268. data/spec/views/spotlight/pages/index.html.erb_spec.rb +2 -2
  269. data/spec/views/spotlight/pages/show.html.erb_spec.rb +3 -3
  270. data/spec/views/spotlight/searches/_search.html.erb_spec.rb +1 -1
  271. data/spec/views/spotlight/searches/edit.html.erb_spec.rb +3 -3
  272. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb +3 -3
  273. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb_spec.rb +1 -1
  274. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb_spec.rb +2 -2
  275. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb_spec.rb +1 -1
  276. data/spec/views/spotlight/translations/_page.html.erb_spec.rb +2 -2
  277. data/vendor/assets/javascripts/bootstrap-tagsinput.js +1 -1
  278. data/vendor/assets/stylesheets/sir-trevor/_variables.scss +15 -8
  279. metadata +31 -28
  280. data/app/assets/stylesheets/spotlight/_navbar.scss +0 -48
  281. data/app/views/_user_util_links.html.erb +0 -50
  282. data/app/views/shared/_modal.html.erb +0 -6
@@ -1,5 +1,11 @@
1
1
  #report-problem-form {
2
2
  display: none;
3
3
  background-color: #e7e7e7;
4
- border-bottom: 1px dotted $gray-light;
4
+ border-bottom: 1px dotted $gray-600;
5
+ }
6
+
7
+ @include media-breakpoint-up(sm) {
8
+ #new_contact_form .col-form-label {
9
+ text-align: right;
10
+ }
5
11
  }
@@ -24,8 +24,8 @@
24
24
  }
25
25
 
26
26
  .st-block__inner {
27
- border: 1px solid $gray-lighter;
28
- box-shadow: 3px 3px 15px $gray-lighter;
27
+ border: 1px solid $gray-700;
28
+ box-shadow: 3px 3px 15px $gray-700;
29
29
  margin: 1em 20px;
30
30
  padding: 1.875em 1.875em 2.8em;
31
31
  }
@@ -45,7 +45,7 @@
45
45
 
46
46
  .form-group .st-text-block {
47
47
  @extend .form-control;
48
- height: auto;
48
+ height: auto !important;
49
49
  min-height: 6em;
50
50
  }
51
51
 
@@ -66,20 +66,20 @@
66
66
  }
67
67
 
68
68
  .spotlight-block-controls {
69
- border: 1px solid $gray-lighter;
69
+ border: 1px solid $gray-700;
70
70
  border-radius: 4px;
71
- box-shadow: 3px 3px 15px $gray-lighter;
71
+ box-shadow: 3px 3px 15px $gray-700;
72
72
  margin: 1em 20px;
73
73
  padding: 1.875em 1.875em 2.8em 70px;
74
74
  }
75
75
 
76
76
  .st-block-controls__button {
77
77
  @extend .btn;
78
- @extend .btn-default;
78
+ @extend .btn-secondary;
79
79
 
80
- background-color: $btn-default-bg;
81
- border: 1px solid $gray-lighter;
82
- color: $btn-default-color;
80
+ background-color: theme-colors("secondary");
81
+ border: 1px solid $gray-700;
82
+ color: theme-colors("light");
83
83
 
84
84
  .st-icon {
85
85
  margin-left: auto;
@@ -1,9 +1,10 @@
1
1
  .carousel-block {
2
-
3
- .carousel-inner > .item > a > img {
4
- // center the image
2
+
3
+ .carousel-inner > .carousel-item > a > img {
4
+ // center and fill the image
5
5
  margin-left: auto;
6
6
  margin-right: auto;
7
+ max-width: 100%;
7
8
  }
8
9
 
9
10
  .carousel-caption {
@@ -15,13 +16,13 @@
15
16
  // fill left + right
16
17
  left: 0;
17
18
  right: 0;
18
-
19
+
19
20
  // and add a nice background gradient to the captions
20
- @include gradient-vertical($start-color: rgba(0,0,0,.0001), $end-color: rgba(0,0,0,.5));
21
+ @include gradient-y($start-color: rgba(0,0,0,.0001), $end-color: rgba(0,0,0,.5));
21
22
  }
22
23
 
23
24
  // Scale up controls for tablets and up
24
- @media screen and (min-width: $screen-sm-min) {
25
+ @media screen and (min-width: breakpoint-min("sm")) {
25
26
  // Show and left align the captions
26
27
  .carousel-caption {
27
28
  left: 0;
@@ -31,19 +32,19 @@
31
32
  }
32
33
 
33
34
  &.carousel-height-small {
34
- .carousel-inner > .item > a > img {
35
+ .carousel-inner > .carousel-item > a > img {
35
36
  height: 350px;
36
37
  }
37
38
  }
38
39
 
39
40
  &.carousel-height-medium {
40
- .carousel-inner > .item > a > img {
41
+ .carousel-inner > .carousel-item > a > img {
41
42
  height: 500px;
42
43
  }
43
44
  }
44
45
 
45
46
  &.carousel-height-large {
46
- .carousel-inner > .item > a > img {
47
+ .carousel-inner > .carousel-item > a > img {
47
48
  height: 800px;
48
49
  }
49
50
  }
@@ -54,6 +55,7 @@
54
55
  bottom: initial;
55
56
  left: initial;
56
57
  margin-left: 0;
58
+ margin-right: 0;
57
59
  text-align: left;
58
60
 
59
61
  &.col-sm-6 {
@@ -61,7 +63,7 @@
61
63
  }
62
64
 
63
65
  li {
64
- display: relative;
66
+ display: relative;
65
67
  width: 100%;
66
68
  height: auto;
67
69
  text-indent: 0;
@@ -81,4 +83,4 @@
81
83
  a { color: #fff; }
82
84
  }
83
85
  }
84
- }
86
+ }
@@ -2,7 +2,6 @@
2
2
  @import "spotlight/mixins";
3
3
  @import "bootstrap/variables";
4
4
 
5
- @import "spotlight/navbar";
6
5
  @import "spotlight/sir-trevor_overrides";
7
6
  @import "spotlight/attachments";
8
7
  @import "spotlight/pages";
@@ -1,6 +1,6 @@
1
1
  .translation-edit-form {
2
- .glyphicon-ok {
3
- color: $translation-available-color;
2
+ .translation-complete {
3
+ svg { fill: $translation-available-color }
4
4
  }
5
5
 
6
6
  .browse-category-title {
@@ -17,21 +17,21 @@
17
17
  }
18
18
 
19
19
  .translation-subheading {
20
- border-bottom: 1px solid $navbar-default-border;
20
+ border-bottom: 1px solid $border-color;
21
21
  margin-bottom: 20px;
22
22
  }
23
23
 
24
24
  .form-group.translation-form {
25
- .control-label {
26
- padding-top: $panel-body-padding + $padding-base-vertical;
25
+ .col-form-label {
26
+ padding-top: $card-spacer-y + $padding-base-vertical;
27
27
  }
28
28
 
29
- .glyphicon-ok {
30
- padding-top: $panel-body-padding + $padding-base-vertical;
29
+ .translation-complete {
30
+ padding-top: $card-spacer-y + $padding-base-vertical;
31
31
  }
32
32
  }
33
33
 
34
- .tanslation-description-toggle {
34
+ .translation-description-toggle {
35
35
  margin: 0;
36
36
  padding: 0;
37
37
 
@@ -48,7 +48,7 @@
48
48
  background-color: $translation-panel-bg;
49
49
  padding-bottom: 0;
50
50
 
51
- .help-block {
51
+ .form-text {
52
52
  color: $translation-help-color;
53
53
  padding-left: 12px;
54
54
  }
@@ -63,10 +63,10 @@
63
63
  }
64
64
 
65
65
  .browse-translations-header {
66
- border-bottom: 1px solid $navbar-default-border;
67
- color: $gray-light;
66
+ border-bottom: 1px solid $border-color;
67
+ color: $gray-600;
68
68
  display: block;
69
- font-size: $font-size-h4;
69
+ font-size: $h4-font-size;
70
70
  font-weight: bold;
71
71
  margin-bottom: $padding-large-vertical * 2;
72
72
  margin-top: $padding-large-vertical;
@@ -1,26 +1,26 @@
1
- $footer-top-margin: 3 * $padding-small-vertical !default;
2
- $footer-height: 118px !default;
1
+ $footer-top-margin: 3rem !default;
2
+ $footer-height: 7.5rem !default;
3
3
  $white: #ffffff !default;
4
4
  $black: #000000 !default;
5
5
 
6
- $masthead-bg: $well-bg !default;
7
- $masthead-height: 180px !default;
6
+ $masthead-bg: $card-bg !default;
7
+ $masthead-height: 11.25rem !default;
8
8
  $masthead-image-blur: 1px !default;
9
9
 
10
10
  $exhibit-card-height: 350px !default;
11
- $exhibit-card-bg: $well-bg !default;
12
- $exhibit-card-border: $well-border !default;
13
- $exhibit-card-gutter: $padding-large-horizontal !default;
11
+ $exhibit-card-bg: $card-bg !default;
12
+ $exhibit-card-border: $card-border-color !default;
13
+ $exhibit-card-gutter: 30px !default;
14
14
  $exhibit-card-image-size: 269px !default;
15
15
  $exhibit-card-shadow: inset 2px 2px 5px -2px $exhibit-card-border !default;
16
16
 
17
- $navbar-transparent-color: $gray !default;
17
+ $navbar-transparent-color: $gray-400 !default;
18
18
  $navbar-transparent-bg: rgba(0, 0, 0, 0.2) !default;
19
- $navbar-transparent-border: $gray !default;
20
- $navbar-transparent-link-color: $gray-lighter !default;
21
- $navbar-transparent-link-hover-color: $gray-lighter !default;
19
+ $navbar-transparent-border: $gray-500 !default;
20
+ $navbar-transparent-link-color: $gray-600 !default;
21
+ $navbar-transparent-link-hover-color: $gray-600 !default;
22
22
  $navbar-transparent-link-hover-bg: rgba(255, 255, 255, 0.15) !default;
23
- $navbar-transparent-link-active-color: $gray-lighter !default;
23
+ $navbar-transparent-link-active-color: $gray-600 !default;
24
24
  $navbar-transparent-link-active-bg: rgba(255, 255, 255, 0.3) !default;
25
25
  $navbar-transparent-link-disabled-color: #ccc !default;
26
26
  $navbar-transparent-link-disabled-bg: transparent !default;
@@ -33,9 +33,8 @@ $navbar-transparent-brand-hover-color: darken($navbar-transparent-brand-color, 1
33
33
  $navbar-transparent-brand-hover-bg: transparent !default;
34
34
 
35
35
  // Navbar toggle
36
- $navbar-transparent-toggle-hover-bg: $navbar-default-toggle-hover-bg !default;
37
- $navbar-transparent-toggle-icon-bar-bg: $navbar-default-toggle-icon-bar-bg !default;
38
- $navbar-transparent-toggle-border-color: $navbar-default-toggle-border-color !default;
36
+ $navbar-transparent-toggle-icon-bar-bg: $navbar-light-toggler-icon-bg !default;
37
+ $navbar-transparent-toggle-border-color: $navbar-light-toggler-border-color !default;
39
38
 
40
39
  // Translations
41
40
  $translation-available-color: #80bf77;
@@ -1,7 +1,7 @@
1
- $font-size-base: 14px;
2
- $font-size-h1: floor(($font-size-base * 2.15)) !default; // ~30px
3
- $font-size-h2: floor(($font-size-base * 1.7)) !default; // ~24px
4
- $font-size-h3: ceil(($font-size-base * 1.53)) !default; // ~201px
5
- $font-size-h4: ceil(($font-size-base * 1.21)) !default; // ~17px
6
- $font-size-h5: $font-size-base !default;
7
- $font-size-h6: ceil(($font-size-base * 0.85)) !default; // ~12px
1
+ // $font-size-base: 14px;
2
+ // $h1-font-size: floor(($font-size-base * 2.15)) !default; // ~30px
3
+ // $h2-font-size: floor(($font-size-base * 1.7)) !default; // ~24px
4
+ // $h3-font-size: ceil(($font-size-base * 1.53)) !default; // ~201px
5
+ // $h4-font-size: ceil(($font-size-base * 1.21)) !default; // ~17px
6
+ // $h5-font-size: $font-size-base !default;
7
+ // $h6-font-size: ceil(($font-size-base * 0.85)) !default; // ~12px
@@ -70,7 +70,7 @@
70
70
  top: -3px;
71
71
  max-width: 160px;
72
72
  max-height: 100px;
73
- border: 3px solid $panel-info-heading-bg;
73
+ border: 3px solid theme-colors("info");
74
74
  }
75
75
  }
76
76
  }
@@ -23,7 +23,7 @@ module Spotlight
23
23
  def render_element(element)
24
24
  html_class = 'active' if @context.current_page?(compute_path(element))
25
25
 
26
- @context.content_tag(:li, class: html_class) do
26
+ @context.content_tag(:li, class: "breadcrumb-item #{html_class}") do
27
27
  @context.link_to_unless_current(element_label(element), compute_path(element), element.options)
28
28
  end
29
29
  end
@@ -31,7 +31,8 @@ module Spotlight
31
31
  private
32
32
 
33
33
  def element_label(element)
34
- @context.truncate(compute_name(element), length: 30, separator: ' ')
34
+ label = compute_name(element)
35
+ @context.truncate(label, escape: !label.html_safe?, length: 30, separator: ' ')
35
36
  end
36
37
  end
37
38
  end
@@ -5,8 +5,8 @@ module Spotlight
5
5
  # Spotlight catalog mixins
6
6
  module Catalog
7
7
  extend ActiveSupport::Concern
8
- include Blacklight::Catalog
9
8
  include Spotlight::Base
9
+ include Spotlight::SearchHelper
10
10
 
11
11
  included do
12
12
  before_action :add_facet_visibility_field
@@ -75,9 +75,9 @@ module Spotlight
75
75
  end
76
76
  end
77
77
 
78
- def search_facet_url(*args)
78
+ def search_facet_path(*args)
79
79
  if current_exhibit
80
- exhibit_search_facet_url(*args)
80
+ exhibit_search_facet_path(*args)
81
81
  else
82
82
  main_app.catalog_facet_url(*args)
83
83
  end
@@ -95,7 +95,7 @@ module Spotlight
95
95
  end
96
96
  end
97
97
 
98
- def exhibit_search_facet_url(*args)
98
+ def exhibit_search_facet_path(*args)
99
99
  options = args.extract_options!
100
100
  options = Blacklight::Parameters.sanitize(params.to_unsafe_h.with_indifferent_access).merge(options).except(:exhibit_id, :only_path)
101
101
  spotlight.facet_exhibit_catalog_url(current_exhibit, *args, options)
@@ -0,0 +1,23 @@
1
+ module Spotlight
2
+ # ...
3
+ module SearchHelper
4
+ def search_service(user_params = respond_to?(:search_state, true) ? search_state.to_h : {})
5
+ search_service_class.new(config: blacklight_config, user_params: user_params, **search_service_context)
6
+ end
7
+
8
+ def search_service_class
9
+ if defined?(super)
10
+ super
11
+ else
12
+ Blacklight::SearchService
13
+ end
14
+ end
15
+
16
+ # @return [Hash] a hash of context information to pass through to the search service
17
+ def search_service_context
18
+ return {} unless respond_to?(:current_ability)
19
+
20
+ { current_ability: current_ability }
21
+ end
22
+ end
23
+ end
@@ -6,7 +6,7 @@ module Spotlight
6
6
  # for the curator's create-update-delete actions)
7
7
  class BrowseController < Spotlight::ApplicationController
8
8
  load_and_authorize_resource :exhibit, class: 'Spotlight::Exhibit'
9
- include Spotlight::Base
9
+ include Spotlight::Catalog
10
10
  include Blacklight::Facet
11
11
 
12
12
  load_and_authorize_resource :search, except: :index, through: :exhibit, parent: false
@@ -14,21 +14,27 @@ module Spotlight
14
14
  before_action :attach_search_breadcrumb, only: :show
15
15
  record_search_parameters only: :show
16
16
 
17
- helper_method :should_render_spotlight_search_bar?
17
+ helper_method :should_render_spotlight_search_bar?, :presenter
18
18
 
19
19
  before_action :swap_actions_configuration, only: :show
20
20
 
21
+ before_action do
22
+ blacklight_config.track_search_session = false
23
+ end
24
+
21
25
  def index
22
26
  @searches = @exhibit.searches.published
23
27
  end
24
28
 
25
29
  def show
26
- @response, @document_list = search_results(search_query)
30
+ @response, @document_list = search_service.search_results do |builder|
31
+ builder.with(search_query)
32
+ end
27
33
 
28
34
  respond_to do |format|
29
35
  format.html
30
36
  format.json do
31
- @presenter = Blacklight::JsonPresenter.new(@response, @document_list, facets_from_request, blacklight_config)
37
+ @presenter = Blacklight::JsonPresenter.new(@response, blacklight_config)
32
38
  render template: 'catalog/index'
33
39
  end
34
40
  end
@@ -116,5 +122,13 @@ module Spotlight
116
122
  def default_browse_index_view_type
117
123
  Spotlight::Engine.config.default_browse_index_view_type
118
124
  end
125
+
126
+ def presenter(document)
127
+ view_context.index_presenter(document)
128
+ end
129
+
130
+ def render_save_this_search?
131
+ false
132
+ end
119
133
  end
120
134
  end
@@ -9,6 +9,7 @@ module Spotlight
9
9
  class CatalogController < ::CatalogController
10
10
  include Spotlight::Concerns::ApplicationController
11
11
  load_and_authorize_resource :exhibit, class: Spotlight::Exhibit, prepend: true
12
+ include Blacklight::Catalog
12
13
  include Spotlight::Catalog
13
14
  include Spotlight::Concerns::CatalogSearchContext
14
15
 
@@ -28,6 +29,7 @@ module Spotlight
28
29
  blacklight_config.view.select! { |k, _v| k == :admin_table }
29
30
  blacklight_config.view.admin_table.partials = [:index_compact]
30
31
  blacklight_config.view.admin_table.document_actions = []
32
+ blacklight_config.track_search_session = false
31
33
 
32
34
  unless blacklight_config.sort_fields.key? :timestamp
33
35
  blacklight_config.add_sort_field :timestamp, sort: "#{blacklight_config.index.timestamp_field} desc"
@@ -54,8 +56,9 @@ module Spotlight
54
56
  # setup within their index analyzer. This will ensure that this method returns
55
57
  # results when a partial match is passed in the "q" parameter.
56
58
  def autocomplete
57
- search_params = params.merge(search_field: Spotlight::Engine.config.autocomplete_search_field)
58
- (_, @document_list) = search_results(search_params.merge(public: true, rows: 100))
59
+ (_, @document_list) = search_service.search_results do |builder|
60
+ builder.with(builder.blacklight_params.merge(search_field: Spotlight::Engine.config.autocomplete_search_field, public: true, rows: 100))
61
+ end
59
62
 
60
63
  respond_to do |format|
61
64
  format.json do
@@ -67,7 +70,7 @@ module Spotlight
67
70
  def admin
68
71
  add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
69
72
  add_breadcrumb t(:'spotlight.curation.sidebar.items'), admin_exhibit_catalog_path(@exhibit)
70
- (@response, @document_list) = search_results(params)
73
+ (@response, @document_list) = search_service.search_results
71
74
  @filters = params[:f] || []
72
75
 
73
76
  respond_to do |format|
@@ -76,7 +79,7 @@ module Spotlight
76
79
  end
77
80
 
78
81
  def update
79
- @response, @document = fetch params[:id]
82
+ @response, @document = search_service.fetch params[:id]
80
83
  @document.update(current_exhibit, solr_document_params)
81
84
  @document.save
82
85
 
@@ -86,11 +89,11 @@ module Spotlight
86
89
  end
87
90
 
88
91
  def edit
89
- @response, @document = fetch params[:id]
92
+ @response, @document = search_service.fetch params[:id]
90
93
  end
91
94
 
92
95
  def make_private
93
- @response, @document = fetch params[:id]
96
+ @response, @document = search_service.fetch params[:id]
94
97
  @document.make_private!(current_exhibit)
95
98
  @document.save
96
99
 
@@ -101,7 +104,7 @@ module Spotlight
101
104
  end
102
105
 
103
106
  def make_public
104
- @response, @document = fetch params[:id]
107
+ @response, @document = search_service.fetch params[:id]
105
108
  @document.make_public!(current_exhibit)
106
109
  @document.save
107
110
 
@@ -112,7 +115,7 @@ module Spotlight
112
115
  end
113
116
 
114
117
  def manifest
115
- _, document = fetch params[:id]
118
+ _, document = search_service.fetch params[:id]
116
119
 
117
120
  if document.uploaded_resource?
118
121
  render json: Spotlight::IiifManifestPresenter.new(document, self).iiif_manifest_json
@@ -123,13 +126,6 @@ module Spotlight
123
126
 
124
127
  protected
125
128
 
126
- # TODO: move this out of app/helpers/blacklight/catalog_helper_behavior.rb and into blacklight/catalog.rb
127
- # rubocop:disable Naming/PredicateName
128
- def has_search_parameters?
129
- !params[:q].blank? || !params[:f].blank? || !params[:search_field].blank?
130
- end
131
- # rubocop:enable Naming/PredicateName
132
-
133
129
  def attach_breadcrumbs
134
130
  # The "q: ''" is necessary so that the breadcrumb builder recognizes that a path like this:
135
131
  # /exhibits/1?f%5Bgenre_sim%5D%5B%5D=map&q= is not the same as /exhibits/1
@@ -158,7 +154,7 @@ module Spotlight
158
154
 
159
155
  def setup_next_and_previous_documents_from_browse_category
160
156
  index = search_session['counter'].to_i - 1
161
- response, documents = get_previous_and_next_documents_for_search index, current_browse_category.query_params.with_indifferent_access
157
+ response, documents = search_service.previous_and_next_documents_for_search index, current_browse_category.query_params.with_indifferent_access
162
158
 
163
159
  return unless response
164
160
 
@@ -223,7 +219,7 @@ module Spotlight
223
219
  add_breadcrumb t(:'spotlight.catalog.breadcrumb.index'), search_action_url(current_search_session.query_params)
224
220
  end
225
221
 
226
- add_breadcrumb Array(document[blacklight_config.view_config(:show).title_field]).join(', '), polymorphic_path([current_exhibit, document])
222
+ add_breadcrumb view_context.show_presenter(document).heading, polymorphic_path([current_exhibit, document])
227
223
  end
228
224
  # rubocop:enable Metrics/AbcSize
229
225