blacklight-spotlight 3.0.0.alpha.3 → 3.0.0.alpha.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/blacklight/highlight_off.svg +1 -0
- data/app/assets/stylesheets/spotlight/_accessibility.scss +8 -0
- data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +3 -3
- data/app/assets/stylesheets/spotlight/_bootstrap_overrides.scss +19 -23
- data/app/assets/stylesheets/spotlight/_browse.scss +22 -13
- data/app/assets/stylesheets/spotlight/_catalog.scss +2 -2
- data/app/assets/stylesheets/spotlight/_curation.scss +8 -19
- data/app/assets/stylesheets/spotlight/_exhibits_index.scss +119 -80
- data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +5 -5
- data/app/assets/stylesheets/spotlight/_header.scss +14 -6
- data/app/assets/stylesheets/spotlight/_multi_image_selector.scss +1 -1
- data/app/assets/stylesheets/spotlight/_multi_up_item_grid.scss +3 -3
- data/app/assets/stylesheets/spotlight/_nestable.scss +4 -0
- data/app/assets/stylesheets/spotlight/_pages.scss +26 -17
- data/app/assets/stylesheets/spotlight/_sir-trevor_overrides.scss +3 -4
- data/app/assets/stylesheets/spotlight/_slideshow_block.scss +1 -0
- data/app/assets/stylesheets/spotlight/_spotlight.scss +1 -1
- data/app/assets/stylesheets/spotlight/_translations.scss +6 -6
- data/app/assets/stylesheets/spotlight/_utilities.scss +4 -0
- data/app/controllers/concerns/spotlight/base.rb +8 -0
- data/app/controllers/spotlight/admin_users_controller.rb +4 -1
- data/app/controllers/spotlight/catalog_controller.rb +2 -2
- data/app/controllers/spotlight/exhibits_controller.rb +2 -0
- data/app/controllers/spotlight/pages_controller.rb +0 -4
- data/app/controllers/spotlight/sites_controller.rb +8 -2
- data/app/controllers/spotlight/translations_controller.rb +9 -1
- data/app/helpers/spotlight/pages_helper.rb +2 -1
- data/app/helpers/spotlight/title_helper.rb +12 -2
- data/app/models/spotlight/field_metadata.rb +1 -2
- data/app/models/spotlight/page.rb +2 -2
- data/app/views/layouts/spotlight/spotlight.html.erb +1 -1
- data/app/views/shared/_masthead.html.erb +25 -13
- data/app/views/shared/_site_navbar.html.erb +0 -0
- data/app/views/shared/_site_sidebar.html.erb +1 -1
- data/app/views/spotlight/about_pages/_contact.html.erb +15 -17
- data/app/views/spotlight/about_pages/_contact_properties.html.erb +1 -1
- data/app/views/spotlight/admin_users/index.html.erb +78 -72
- data/app/views/spotlight/appearances/edit.html.erb +1 -23
- data/app/views/spotlight/browse/_search_box.html.erb +3 -3
- data/app/views/spotlight/browse/show.html.erb +23 -26
- data/app/views/spotlight/catalog/_edit_default.html.erb +1 -1
- data/app/views/spotlight/catalog/_index_compact_default.html.erb +2 -2
- data/app/views/spotlight/contacts/_form.html.erb +1 -1
- data/app/views/spotlight/custom_fields/_form.html.erb +2 -2
- data/app/views/spotlight/custom_fields/form_group/_text.html.erb +2 -2
- data/app/views/spotlight/custom_fields/form_group/_vocab.html.erb +2 -2
- data/app/views/spotlight/custom_search_fields/_form.html.erb +1 -1
- data/app/views/spotlight/dashboards/_page.html.erb +4 -4
- data/app/views/spotlight/exhibits/_exhibit_card.html.erb +35 -7
- data/app/views/spotlight/exhibits/_exhibits.html.erb +1 -1
- data/app/views/spotlight/exhibits/index.html.erb +4 -4
- data/app/views/spotlight/exhibits/new.html.erb +1 -1
- data/app/views/spotlight/feature_pages/_header.html.erb +2 -2
- data/app/views/spotlight/feature_pages/_sidebar.html.erb +9 -5
- data/app/views/spotlight/metadata_configurations/edit.html.erb +2 -2
- data/app/views/spotlight/pages/_form.html.erb +1 -1
- data/app/views/spotlight/pages/_page.html.erb +19 -35
- data/app/views/spotlight/roles/index.html.erb +2 -2
- data/app/views/spotlight/search_configurations/_facet_metadata.html.erb +0 -5
- data/app/views/spotlight/search_configurations/_facets.html.erb +15 -34
- data/app/views/spotlight/search_configurations/_search_fields.html.erb +6 -17
- data/app/views/spotlight/search_configurations/_sort.html.erb +8 -18
- data/app/views/spotlight/searches/_form.html.erb +2 -2
- data/app/views/spotlight/searches/_search.html.erb +30 -29
- data/app/views/spotlight/shared/_dd3_item.html.erb +56 -0
- data/app/views/spotlight/shared/_report_a_problem.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_oembed_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_quote_block.html.erb +4 -4
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +1 -1
- data/app/views/spotlight/sites/edit.html.erb +1 -1
- data/app/views/spotlight/sites/edit_exhibits.html.erb +1 -1
- data/app/views/spotlight/translations/_search_fields.html.erb +1 -1
- data/app/views/spotlight/translations/edit.html.erb +1 -1
- data/config/locales/spotlight.en.yml +5 -11
- data/config/locales/spotlight.es.yml +26 -25
- data/lib/generators/spotlight/install_generator.rb +6 -2
- data/lib/generators/spotlight/templates/config/initializers/oembed.rb +4 -0
- data/lib/spotlight/engine.rb +3 -5
- data/lib/spotlight/version.rb +1 -1
- data/spec/controllers/spotlight/translations_controller_spec.rb +8 -0
- data/spec/examples.txt +1386 -1379
- data/spec/features/create_exhibit_spec.rb +1 -2
- data/spec/features/exhibits_index_spec.rb +1 -3
- data/spec/features/javascript/blocks/solr_documents_block_spec.rb +2 -2
- data/spec/features/javascript/search_config_admin_spec.rb +1 -1
- data/spec/helpers/spotlight/pages_helper_spec.rb +6 -0
- data/spec/helpers/spotlight/title_helper_spec.rb +13 -0
- data/spec/models/spotlight/feature_page_spec.rb +0 -5
- data/spec/models/spotlight/field_metadata_spec.rb +0 -7
- data/spec/test_app_templates/Gemfile.extra +0 -1
- data/spec/views/shared/_masthead.html.erb_spec.rb +12 -0
- data/spec/views/spotlight/exhibits/{_exhibit_card_front.html.erb_spec.rb → _exhibit_card.html.erb_spec.rb} +7 -3
- data/spec/views/spotlight/exhibits/index.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/feature_pages/_sidebar.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/search_configurations/_facet_metadata.html.erb_spec.rb +0 -1
- data/spec/views/spotlight/search_configurations/_search_fields.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb +2 -2
- data/vendor/assets/stylesheets/sir-trevor/_variables.scss +0 -8
- data/vendor/assets/stylesheets/sir-trevor/block-controls.scss +0 -4
- metadata +9 -10
- data/app/assets/images/blacklight/remove_circle_outline.svg +0 -1
- data/app/views/spotlight/browse/_sort_and_per_page.html.erb +0 -5
- data/app/views/spotlight/exhibits/_exhibit_card_back.html.erb +0 -25
- data/app/views/spotlight/exhibits/_exhibit_card_front.html.erb +0 -13
- data/spec/views/spotlight/browse/_sort_and_per_page.html.erb_spec.rb +0 -12
@@ -70,11 +70,11 @@ $aspect-ratio-factor-medium-image: 1; // 1:1 width: height
|
|
70
70
|
width: $no-sidebar-tablet-large-image-width;
|
71
71
|
height: $no-sidebar-tablet-large-image-width * $aspect-ratio-factor-large-image;
|
72
72
|
}
|
73
|
-
@media (min-width: breakpoint-min("md")) and (
|
73
|
+
@media (min-width: breakpoint-min("md")) and (min-width: breakpoint-min("lg")) {
|
74
74
|
width: $no-sidebar-desktop-large-image-width;
|
75
75
|
height: $no-sidebar-desktop-large-image-width * $aspect-ratio-factor-large-image;
|
76
76
|
}
|
77
|
-
@media (min-width: breakpoint-min("
|
77
|
+
@media (min-width: breakpoint-min("xl")) {
|
78
78
|
width: $no-sidebar-large-desktop-large-image-width;
|
79
79
|
height: $no-sidebar-large-desktop-large-image-width * $aspect-ratio-factor-large-image;
|
80
80
|
}
|
@@ -108,11 +108,11 @@ $aspect-ratio-factor-medium-image: 1; // 1:1 width: height
|
|
108
108
|
width: $with-sidebar-tablet-large-image-width;
|
109
109
|
height: $with-sidebar-tablet-large-image-width * $aspect-ratio-factor-large-image;
|
110
110
|
}
|
111
|
-
@media (min-width: breakpoint-min("md")) and (max-width: breakpoint-max("
|
111
|
+
@media (min-width: breakpoint-min("md")) and (max-width: breakpoint-max("xl")) {
|
112
112
|
width: $with-sidebar-desktop-large-image-width;
|
113
113
|
height: $with-sidebar-desktop-large-image-width * $aspect-ratio-factor-large-image;
|
114
114
|
}
|
115
|
-
@media (min-width: breakpoint-min("
|
115
|
+
@media (min-width: breakpoint-min("xl")) {
|
116
116
|
width: $with-sidebar-large-desktop-large-image-width;
|
117
117
|
height: $with-sidebar-large-desktop-large-image-width * $aspect-ratio-factor-large-image;
|
118
118
|
}
|
@@ -126,7 +126,7 @@ $aspect-ratio-factor-medium-image: 1; // 1:1 width: height
|
|
126
126
|
width: $with-sidebar-xs-image-width;
|
127
127
|
height: $with-sidebar-xs-image-width * $aspect-ratio-factor-medium-image;
|
128
128
|
}
|
129
|
-
@media (min-width: breakpoint-min("
|
129
|
+
@media (min-width: breakpoint-min("xl")) {
|
130
130
|
width: $with-sidebar-large-desktop-medium-image-width;
|
131
131
|
height: $with-sidebar-large-desktop-medium-image-width * $aspect-ratio-factor-medium-image;
|
132
132
|
}
|
@@ -14,14 +14,18 @@
|
|
14
14
|
.masthead {
|
15
15
|
background-color: $masthead-bg;
|
16
16
|
border-bottom: 1px solid $border-color;
|
17
|
-
margin-bottom: $
|
17
|
+
margin-bottom: $spacer * 1.5;
|
18
18
|
padding: 0;
|
19
19
|
position: relative;
|
20
20
|
|
21
21
|
|
22
22
|
.site-title {
|
23
|
-
margin-
|
24
|
-
|
23
|
+
margin-bottom: 0;
|
24
|
+
}
|
25
|
+
|
26
|
+
.site-title-wrapper {
|
27
|
+
margin-top: $spacer * 1.25;
|
28
|
+
padding-bottom: $spacer * 0.75;
|
25
29
|
position: relative;
|
26
30
|
white-space: nowrap;
|
27
31
|
}
|
@@ -78,9 +82,13 @@
|
|
78
82
|
.navbar {
|
79
83
|
@extend .navbar-dark;
|
80
84
|
background-color: $navbar-transparent-page-bg;
|
81
|
-
|
82
|
-
.
|
83
|
-
text-transform:
|
85
|
+
|
86
|
+
.navbar-nav {
|
87
|
+
text-transform: uppercase;
|
88
|
+
|
89
|
+
.dropdown-menu {
|
90
|
+
text-transform: none;
|
91
|
+
}
|
84
92
|
}
|
85
93
|
}
|
86
94
|
|
@@ -5,18 +5,18 @@
|
|
5
5
|
}
|
6
6
|
|
7
7
|
.twitter-typeahead {
|
8
|
-
margin-bottom: 2*$
|
8
|
+
margin-bottom: 2*$spacer;
|
9
9
|
}
|
10
10
|
}
|
11
11
|
.field-select {
|
12
|
-
margin-top: 2*$
|
12
|
+
margin-top: 2*$spacer;
|
13
13
|
select {
|
14
14
|
display: inline;
|
15
15
|
width: auto;
|
16
16
|
}
|
17
17
|
}
|
18
18
|
.dd3-item {
|
19
|
-
margin-bottom: 2*$
|
19
|
+
margin-bottom: 2*$spacer;
|
20
20
|
}
|
21
21
|
}
|
22
22
|
// Hide the secondary caption field
|
@@ -31,16 +31,16 @@
|
|
31
31
|
|
32
32
|
.st-block__inner {
|
33
33
|
div.field + div.field {
|
34
|
-
margin-top: 2 * $
|
34
|
+
margin-top: 2 * $spacer;
|
35
35
|
}
|
36
36
|
|
37
37
|
.field-select {
|
38
|
-
margin-bottom: $
|
38
|
+
margin-bottom: $spacer;
|
39
39
|
@media (min-width: breakpoint-min("md")) and (max-width: breakpoint-max("lg")) {
|
40
|
-
margin-bottom: 2 * $
|
40
|
+
margin-bottom: 2 * $spacer;
|
41
41
|
|
42
42
|
> select {
|
43
|
-
margin-left: 2 * $
|
43
|
+
margin-left: 2 * $spacer * 0.25;
|
44
44
|
}
|
45
45
|
}
|
46
46
|
}
|
@@ -48,18 +48,25 @@
|
|
48
48
|
|
49
49
|
#sidebar {
|
50
50
|
li {
|
51
|
-
margin-top: $
|
51
|
+
margin-top: $spacer * 0.5;
|
52
52
|
}
|
53
53
|
h4 {
|
54
54
|
line-height: $line-height-lg;
|
55
55
|
}
|
56
56
|
.contacts-header {
|
57
|
-
margin-top: 4 * $
|
57
|
+
margin-top: 4 * $spacer;
|
58
58
|
}
|
59
|
+
|
60
|
+
.contact-properties {
|
61
|
+
padding-left: 1rem;
|
62
|
+
text-indent: -1rem;
|
63
|
+
}
|
64
|
+
|
59
65
|
ol.contacts {
|
60
66
|
li {
|
61
|
-
margin-bottom:
|
62
|
-
margin-top: $
|
67
|
+
margin-bottom: $spacer * .5;
|
68
|
+
margin-top: $spacer * .5;
|
69
|
+
word-break: break-word;
|
63
70
|
.name {
|
64
71
|
font-weight: bold;
|
65
72
|
}
|
@@ -69,15 +76,16 @@
|
|
69
76
|
ol.sidenav {
|
70
77
|
li {
|
71
78
|
color: $gray-900;
|
72
|
-
margin-top: $
|
79
|
+
margin-top: $spacer * .25;
|
73
80
|
}
|
74
81
|
|
75
82
|
ol.subsection {
|
83
|
+
margin-bottom: $spacer;
|
76
84
|
padding-left: 0;
|
77
85
|
li {
|
78
86
|
list-style: square;
|
79
87
|
margin-left: 18px;
|
80
|
-
margin-top: $
|
88
|
+
margin-top: $spacer * 0.5;
|
81
89
|
}
|
82
90
|
}
|
83
91
|
}
|
@@ -91,9 +99,10 @@
|
|
91
99
|
.contact-photo {
|
92
100
|
border: 1px solid #ccc;
|
93
101
|
border-radius: $border-radius;
|
102
|
+
height: 70px;
|
94
103
|
margin-right: 15px;
|
95
104
|
margin-top: 3px;
|
96
|
-
|
105
|
+
width: 70px;
|
97
106
|
}
|
98
107
|
|
99
108
|
// Indent contact fields so they align evenly, only when there is a contact photo
|
@@ -181,12 +190,12 @@
|
|
181
190
|
.empty-page-block {
|
182
191
|
@extend .alert;
|
183
192
|
@extend .alert-info;
|
184
|
-
margin-top: $
|
193
|
+
margin-top: $spacer;
|
185
194
|
h2 {
|
186
195
|
margin-top: 0;
|
187
196
|
}
|
188
197
|
p, ol > li {
|
189
|
-
padding: $
|
198
|
+
padding: $spacer * 0.5;
|
190
199
|
}
|
191
200
|
ol > li:last-child {
|
192
201
|
padding-bottom: 0;
|
@@ -195,7 +204,7 @@
|
|
195
204
|
|
196
205
|
.oembed-block {
|
197
206
|
@media (max-width: breakpoint-max("md")) {
|
198
|
-
margin-bottom: $
|
207
|
+
margin-bottom: $spacer;
|
199
208
|
}
|
200
209
|
|
201
210
|
iframe {
|
@@ -253,13 +262,13 @@
|
|
253
262
|
.item-features .carousel-indicators {
|
254
263
|
@media (max-width: breakpoint-max("sm")) {
|
255
264
|
width: 100%;
|
256
|
-
margin-top: 2 * $
|
265
|
+
margin-top: 2 * $spacer;
|
257
266
|
}
|
258
267
|
}
|
259
268
|
|
260
269
|
.carousel-block .carousel-caption h3 {
|
261
|
-
padding-left: 2 * $
|
262
|
-
padding-right: 2 * $
|
270
|
+
padding-left: 2 * $spacer;
|
271
|
+
padding-right: 2 * $spacer;
|
263
272
|
}
|
264
273
|
|
265
274
|
.zpr-link {
|
@@ -13,8 +13,8 @@
|
|
13
13
|
}
|
14
14
|
|
15
15
|
.content-block {
|
16
|
-
margin-top: 3*$
|
17
|
-
margin-bottom: 3*$
|
16
|
+
margin-top: 3*$spacer;
|
17
|
+
margin-bottom: 3*$spacer;
|
18
18
|
}
|
19
19
|
|
20
20
|
// Sir-trevor sets the overflow to hidden which
|
@@ -76,10 +76,9 @@
|
|
76
76
|
.st-block-controls__button {
|
77
77
|
@extend .btn;
|
78
78
|
@extend .btn-secondary;
|
79
|
+
@extend .btn-outline-secondary;
|
79
80
|
|
80
|
-
background-color: theme-colors("secondary");
|
81
81
|
border: 1px solid $gray-700;
|
82
|
-
color: theme-colors("light");
|
83
82
|
|
84
83
|
.st-icon {
|
85
84
|
margin-left: auto;
|
@@ -5,7 +5,6 @@
|
|
5
5
|
@import "spotlight/sir-trevor_overrides";
|
6
6
|
@import "spotlight/attachments";
|
7
7
|
@import "spotlight/pages";
|
8
|
-
@import 'blacklight_gallery/default';
|
9
8
|
@import "spotlight/browse";
|
10
9
|
@import "spotlight/header";
|
11
10
|
@import "spotlight/footer";
|
@@ -32,6 +31,7 @@
|
|
32
31
|
@import "spotlight/collapse_toggle";
|
33
32
|
@import "spotlight/translations";
|
34
33
|
@import "spotlight/utilities";
|
34
|
+
@import "spotlight/accessibility";
|
35
35
|
|
36
36
|
|
37
37
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
}
|
5
5
|
|
6
6
|
.browse-category-title {
|
7
|
-
margin-bottom: $
|
7
|
+
margin-bottom: $spacer;
|
8
8
|
|
9
9
|
label {
|
10
10
|
font-weight: normal;
|
@@ -12,7 +12,7 @@
|
|
12
12
|
}
|
13
13
|
|
14
14
|
.browse-category-description {
|
15
|
-
margin-bottom: $
|
15
|
+
margin-bottom: $spacer * 2;
|
16
16
|
}
|
17
17
|
|
18
18
|
.table.table-striped th {
|
@@ -28,11 +28,11 @@
|
|
28
28
|
|
29
29
|
.form-group.translation-form {
|
30
30
|
.col-form-label {
|
31
|
-
padding-top: $card-spacer-y + $
|
31
|
+
padding-top: $card-spacer-y + $spacer;
|
32
32
|
}
|
33
33
|
|
34
34
|
.translation-complete {
|
35
|
-
padding-top: $card-spacer-y + $
|
35
|
+
padding-top: $card-spacer-y + $spacer;
|
36
36
|
}
|
37
37
|
}
|
38
38
|
|
@@ -73,7 +73,7 @@
|
|
73
73
|
display: block;
|
74
74
|
font-size: $h4-font-size;
|
75
75
|
font-weight: bold;
|
76
|
-
margin-bottom: $
|
77
|
-
margin-top: $
|
76
|
+
margin-bottom: $spacer * 2;
|
77
|
+
margin-top: $spacer;
|
78
78
|
padding-bottom: 3px;
|
79
79
|
}
|
@@ -9,6 +9,14 @@ module Spotlight
|
|
9
9
|
include Blacklight::Base
|
10
10
|
include Spotlight::Config
|
11
11
|
|
12
|
+
included do
|
13
|
+
helper_method :controller_tracking_method
|
14
|
+
end
|
15
|
+
|
16
|
+
def controller_tracking_method
|
17
|
+
Spotlight::Engine.config.controller_tracking_method
|
18
|
+
end
|
19
|
+
|
12
20
|
# This overwrites Blacklight::Configurable#blacklight_config
|
13
21
|
def blacklight_config
|
14
22
|
exhibit_specific_blacklight_config
|
@@ -10,7 +10,10 @@ module Spotlight
|
|
10
10
|
|
11
11
|
load_and_authorize_resource :site, class: 'Spotlight::Site'
|
12
12
|
|
13
|
-
def index
|
13
|
+
def index
|
14
|
+
add_breadcrumb t(:'spotlight.sites.home'), root_url
|
15
|
+
add_breadcrumb t(:'spotlight.admin_users.index.page_title')
|
16
|
+
end
|
14
17
|
|
15
18
|
def create
|
16
19
|
if update_roles
|
@@ -209,9 +209,9 @@ module Spotlight
|
|
209
209
|
if current_browse_category
|
210
210
|
add_breadcrumb current_browse_category.exhibit.main_navigations.browse.label_or_default, exhibit_browse_index_path(current_browse_category.exhibit)
|
211
211
|
add_breadcrumb current_browse_category.title, exhibit_browse_path(current_browse_category.exhibit, current_browse_category)
|
212
|
-
elsif current_page_context
|
212
|
+
elsif current_page_context&.title&.present? && !current_page_context.is_a?(Spotlight::HomePage)
|
213
213
|
add_breadcrumb current_page_context.title, [current_page_context.exhibit, current_page_context]
|
214
|
-
elsif current_search_session
|
214
|
+
elsif current_search_session && !current_page_context&.is_a?(Spotlight::HomePage)
|
215
215
|
add_breadcrumb t(:'spotlight.catalog.breadcrumb.index'), search_action_url(current_search_session.query_params)
|
216
216
|
end
|
217
217
|
|
@@ -19,10 +19,6 @@ module Spotlight
|
|
19
19
|
|
20
20
|
helper_method :get_search_results, :search_results, :fetch, :page_collection_name, :presenter
|
21
21
|
|
22
|
-
before_action do
|
23
|
-
blacklight_config.track_search_session = false
|
24
|
-
end
|
25
|
-
|
26
22
|
# GET /exhibits/1/pages
|
27
23
|
def index
|
28
24
|
# set up a model the inline "add a new page" form
|
@@ -8,9 +8,15 @@ module Spotlight
|
|
8
8
|
before_action :load_site
|
9
9
|
load_and_authorize_resource
|
10
10
|
|
11
|
-
def edit
|
11
|
+
def edit
|
12
|
+
add_breadcrumb t(:'spotlight.sites.home'), root_url
|
13
|
+
add_breadcrumb t(:'spotlight.sites.edit.page_title')
|
14
|
+
end
|
12
15
|
|
13
|
-
def edit_exhibits
|
16
|
+
def edit_exhibits
|
17
|
+
add_breadcrumb t(:'spotlight.sites.home'), root_url
|
18
|
+
add_breadcrumb t(:'spotlight.sites.edit_exhibits.page_title')
|
19
|
+
end
|
14
20
|
|
15
21
|
def update
|
16
22
|
if @site.update(site_params)
|
@@ -7,7 +7,9 @@ module Spotlight
|
|
7
7
|
before_action :authenticate_user!, :set_language, :set_tab
|
8
8
|
load_and_authorize_resource :exhibit, class: Spotlight::Exhibit
|
9
9
|
|
10
|
-
def edit
|
10
|
+
def edit
|
11
|
+
attach_breadcrumbs
|
12
|
+
end
|
11
13
|
|
12
14
|
def update
|
13
15
|
if current_exhibit.update(exhibit_params)
|
@@ -21,6 +23,12 @@ module Spotlight
|
|
21
23
|
|
22
24
|
private
|
23
25
|
|
26
|
+
def attach_breadcrumbs
|
27
|
+
add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
|
28
|
+
add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
|
29
|
+
add_breadcrumb t(:'spotlight.curation.sidebar.translations')
|
30
|
+
end
|
31
|
+
|
24
32
|
def exhibit_params
|
25
33
|
params.require(:exhibit).permit(translations_attributes: %i[id locale key value])
|
26
34
|
end
|
@@ -67,8 +67,9 @@ module Spotlight
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
# Insert soft breaks into email addresses so they wrap nicely
|
70
71
|
def render_contact_email_address(address)
|
71
|
-
mail_to address, address
|
72
|
+
mail_to address, sanitize(address).gsub(/([@\.])/, '\1<wbr />').html_safe
|
72
73
|
end
|
73
74
|
|
74
75
|
def configurations_for_current_page
|