blacklight-spotlight 0.8.2 → 0.9.0

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 (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/spotlight/_bootstrap_overrides.scss +4 -2
  3. data/app/assets/stylesheets/spotlight/_footer.scss +1 -1
  4. data/app/assets/stylesheets/spotlight/_header.scss +0 -40
  5. data/app/controllers/spotlight/appearances_controller.rb +2 -2
  6. data/app/controllers/spotlight/custom_fields_controller.rb +1 -1
  7. data/app/controllers/spotlight/dashboards_controller.rb +11 -0
  8. data/app/controllers/spotlight/exhibits_controller.rb +2 -2
  9. data/app/controllers/spotlight/metadata_configurations_controller.rb +2 -2
  10. data/app/controllers/spotlight/roles_controller.rb +2 -2
  11. data/app/controllers/spotlight/search_configurations_controller.rb +2 -2
  12. data/app/helpers/spotlight/title_helper.rb +2 -2
  13. data/app/models/concerns/spotlight/solr_document.rb +10 -4
  14. data/app/models/concerns/spotlight/solr_document/finder.rb +14 -0
  15. data/app/models/spotlight/ability.rb +1 -3
  16. data/app/models/spotlight/blacklight_configuration.rb +2 -2
  17. data/app/models/spotlight/custom_field.rb +37 -15
  18. data/app/models/spotlight/solr_document_sidecar.rb +16 -1
  19. data/app/views/shared/_breadcrumbs.html.erb +5 -1
  20. data/app/views/shared/_exhibit_masthead.html.erb +0 -17
  21. data/app/views/shared/_footer.html.erb +1 -1
  22. data/app/views/spotlight/about_pages/index.html.erb +1 -1
  23. data/app/views/spotlight/appearances/edit.html.erb +2 -2
  24. data/app/views/spotlight/catalog/_edit_default.html.erb +1 -1
  25. data/app/views/spotlight/catalog/admin.html.erb +1 -1
  26. data/app/views/spotlight/catalog/new.html.erb +1 -1
  27. data/app/views/spotlight/contacts/edit.html.erb +1 -1
  28. data/app/views/spotlight/contacts/new.html.erb +1 -1
  29. data/app/views/spotlight/custom_fields/edit.html.erb +3 -3
  30. data/app/views/spotlight/custom_fields/new.html.erb +3 -4
  31. data/app/views/spotlight/dashboards/_analytics.html.erb +1 -3
  32. data/app/views/spotlight/dashboards/analytics.html.erb +15 -0
  33. data/app/views/spotlight/dashboards/show.html.erb +1 -3
  34. data/app/views/spotlight/exhibits/edit.html.erb +2 -2
  35. data/app/views/spotlight/exhibits/new.html.erb +1 -1
  36. data/app/views/spotlight/home_pages/_empty.html.erb +3 -3
  37. data/app/views/spotlight/metadata_configurations/edit.html.erb +2 -2
  38. data/app/views/spotlight/pages/index.html.erb +1 -1
  39. data/app/views/spotlight/resources/upload/new.html.erb +1 -1
  40. data/app/views/spotlight/roles/index.html.erb +2 -2
  41. data/app/views/spotlight/search_configurations/edit.html.erb +2 -2
  42. data/app/views/spotlight/searches/edit.html.erb +1 -1
  43. data/app/views/spotlight/searches/index.html.erb +4 -4
  44. data/app/views/spotlight/shared/_configuration_sidebar.html.erb +14 -0
  45. data/app/views/spotlight/shared/_curation_sidebar.html.erb +16 -26
  46. data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +8 -0
  47. data/app/views/spotlight/sir_trevor/blocks/_browse_block.html.erb +1 -1
  48. data/app/views/spotlight/tags/index.html.erb +1 -1
  49. data/config/locales/spotlight.en.yml +12 -16
  50. data/config/routes.rb +3 -1
  51. data/db/migrate/20151124101123_remove_default_from_spotlight_exhibit.rb +13 -0
  52. data/db/migrate/20151124105543_update_custom_field_names.rb +31 -0
  53. data/lib/generators/spotlight/templates/catalog_controller.rb +1 -1
  54. data/lib/spotlight/engine.rb +4 -0
  55. data/lib/spotlight/version.rb +1 -1
  56. data/spec/controllers/spotlight/appearances_controller_spec.rb +1 -1
  57. data/spec/controllers/spotlight/custom_fields_controller_spec.rb +4 -4
  58. data/spec/controllers/spotlight/dashboards_controller_spec.rb +15 -0
  59. data/spec/controllers/spotlight/exhibits_controller_spec.rb +2 -2
  60. data/spec/controllers/spotlight/metadata_configurations_controller_spec.rb +1 -1
  61. data/spec/controllers/spotlight/roles_controller_spec.rb +1 -1
  62. data/spec/controllers/spotlight/search_configurations_controller_spec.rb +2 -2
  63. data/spec/features/create_exhibit_spec.rb +1 -1
  64. data/spec/features/edit_search_fields_spec.rb +4 -4
  65. data/spec/features/exhibits/administration_spec.rb +1 -1
  66. data/spec/features/exhibits/custom_metadata_fields_spec.rb +1 -1
  67. data/spec/features/exhibits/edit_metadata_fields_spec.rb +1 -1
  68. data/spec/features/import_exhibit_spec.rb +2 -2
  69. data/spec/features/javascript/search_config_admin_spec.rb +7 -7
  70. data/spec/features/metadata_admin_spec.rb +2 -2
  71. data/spec/helpers/spotlight/title_helper_spec.rb +4 -4
  72. data/spec/lib/spotlight/catalog/access_controls_enforcement_spec.rb +1 -1
  73. data/spec/models/solr_document_spec.rb +29 -4
  74. data/spec/models/spotlight/blacklight_configuration_spec.rb +4 -4
  75. data/spec/models/spotlight/custom_field_spec.rb +48 -25
  76. data/spec/models/spotlight/resources/upload_spec.rb +1 -1
  77. data/spec/models/spotlight/solr_document_sidecar_spec.rb +1 -1
  78. data/spec/test_app_templates/catalog_controller.rb +1 -1
  79. data/spec/views/spotlight/dashboards/_analytics.html.erb_spec.rb +0 -1
  80. data/spec/views/spotlight/dashboards/analytics.html.erb_spec.rb +33 -0
  81. data/spec/views/spotlight/search_configurations/_search_fields.html.erb_spec.rb +1 -1
  82. data/spec/views/spotlight/searches/index.html.erb_spec.rb +3 -3
  83. data/spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb +20 -0
  84. metadata +11 -5
  85. data/app/views/spotlight/shared/_admin_sidebar.html.erb +0 -10
  86. data/spec/features/multiple_exhibits_spec.rb +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b138edc90732ce33fe7f454da4f4a21858b016d6
4
- data.tar.gz: 38b9e958eac1286631b35752da63bf583aa540bf
3
+ metadata.gz: 7997d0d2ea068a8e6cb52fd07c0da1188dd6ec32
4
+ data.tar.gz: bb3925808a6e75e24c939b3283f36e52e8acb8ce
5
5
  SHA512:
6
- metadata.gz: 55de525b9576d2dd3153b107063d9ca1d8f9680049f53875f2e29fa9f13def90d664327827a871c360f5055f1fdc8f0131f354ec3f1d52a29551959e83e46150
7
- data.tar.gz: 150fb2d102718f3284f3213b6c3d6146a3d521a0443932f95bbb238283811aa7a26e5e49d3fedb3778d48a5846ae73cfc3a389b6c5d60f7c765403c40331ed45
6
+ metadata.gz: a5039403405d1d6c8b6537e0011091b705e298e92438b6c14f239d99455123a9f5975c50c784d769a39c5c798b12e39e762d692bd36b758a9b84469a8de9f6f8
7
+ data.tar.gz: 534cbcc8647cae7b757eb723728eaeaead58118f141202349f0f3c78e38a4f947000e364e2af454866715874ed01ce1765f717313800766fbba8ce91f52e3118
@@ -28,8 +28,10 @@
28
28
  padding: 0 15px 0 0;
29
29
  }
30
30
 
31
- .dashboard > a {
32
- padding-left: 0;
31
+ &.top-level {
32
+ li > a {
33
+ padding-left: 0;
34
+ }
33
35
  }
34
36
  }
35
37
 
@@ -1,4 +1,4 @@
1
- footer {
1
+ .site-footer {
2
2
  background-color: $gray-lighter;
3
3
  color: $gray-light;
4
4
  margin-top: $footer-top-margin;
@@ -163,52 +163,12 @@ $menu-link-background-color-hover: rgba(255, 255, 255, 0.15);
163
163
  small {
164
164
  color: $white;
165
165
  }
166
-
167
- .more-exhibits {
168
- a {
169
- color: $gray-lighter;
170
- background: rgba(0, 0, 0, 0.4);
171
- border-top-left-radius: $border-radius-base;
172
- border-top-right-radius: $border-radius-base;
173
- }
174
-
175
- a:hover,
176
- a:focus,
177
- a:active {
178
- background: rgba(0, 0, 0, 0.6);
179
- }
180
-
181
- .dropdown-menu a {
182
- background: none;
183
- color: $gray;
184
-
185
- &:hover,
186
- &:focus,
187
- &:active {
188
- background-color: $gray-lighter;
189
- }
190
- }
191
- }
192
- }
193
-
194
- .more-exhibits {
195
- @extend .navbar-right;
196
166
  }
197
167
 
198
168
  &.with-page-masthead {
199
169
  .site-title {
200
170
  margin-top: $padding-large-vertical * 3;
201
171
  }
202
-
203
- .more-exhibits {
204
- @extend .navbar-left;
205
- padding-top: $padding-base-vertical;
206
-
207
- .dropdown-menu {
208
- left: 0;
209
- right: auto;
210
- }
211
- }
212
172
  }
213
173
 
214
174
  // This is to add a background image to the masthead, in a way that
@@ -16,8 +16,8 @@ module Spotlight
16
16
 
17
17
  def edit
18
18
  add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
19
- add_breadcrumb t(:'spotlight.administration.sidebar.header'), exhibit_dashboard_path(@exhibit)
20
- add_breadcrumb t(:'spotlight.administration.sidebar.appearance'), edit_exhibit_appearance_path(@exhibit)
19
+ add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
20
+ add_breadcrumb t(:'spotlight.configuration.sidebar.appearance'), edit_exhibit_appearance_path(@exhibit)
21
21
  end
22
22
 
23
23
  protected
@@ -49,7 +49,7 @@ module Spotlight
49
49
 
50
50
  def attach_breadcrumbs
51
51
  add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
52
- add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
52
+ add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
53
53
  add_breadcrumb t(:'spotlight.metadata_configurations.edit.header'), edit_exhibit_metadata_configuration_path(@exhibit)
54
54
  end
55
55
 
@@ -23,12 +23,23 @@ module Spotlight
23
23
  attach_dashboard_breadcrumbs
24
24
  end
25
25
 
26
+ def analytics
27
+ authorize! :curate, @exhibit
28
+
29
+ attach_analytics_breadcrumbs
30
+ end
31
+
26
32
  def _prefixes
27
33
  @_prefixes ||= super + ['spotlight/catalog', 'catalog']
28
34
  end
29
35
 
30
36
  protected
31
37
 
38
+ def attach_analytics_breadcrumbs
39
+ add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
40
+ add_breadcrumb t(:'spotlight.curation.sidebar.analytics'), analytics_exhibit_dashboard_path(@exhibit)
41
+ end
42
+
32
43
  def attach_dashboard_breadcrumbs
33
44
  add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
34
45
  add_breadcrumb t(:'spotlight.curation.sidebar.dashboard'), exhibit_dashboard_path(@exhibit)
@@ -52,8 +52,8 @@ module Spotlight
52
52
 
53
53
  def edit
54
54
  add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
55
- add_breadcrumb t(:'spotlight.administration.sidebar.header'), exhibit_dashboard_path(@exhibit)
56
- add_breadcrumb t(:'spotlight.administration.sidebar.settings'), edit_exhibit_path(@exhibit)
55
+ add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
56
+ add_breadcrumb t(:'spotlight.configuration.sidebar.settings'), edit_exhibit_path(@exhibit)
57
57
  build_initial_exhibit_contact_emails
58
58
  end
59
59
 
@@ -17,8 +17,8 @@ module Spotlight
17
17
 
18
18
  def edit
19
19
  add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
20
- add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
21
- add_breadcrumb t(:'spotlight.curation.sidebar.metadata'), edit_exhibit_metadata_configuration_path(@exhibit)
20
+ add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
21
+ add_breadcrumb t(:'spotlight.configuration.sidebar.metadata'), edit_exhibit_metadata_configuration_path(@exhibit)
22
22
  end
23
23
 
24
24
  def update
@@ -12,8 +12,8 @@ module Spotlight
12
12
  authorize! :edit, role
13
13
 
14
14
  add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
15
- add_breadcrumb t(:'spotlight.administration.sidebar.header'), exhibit_dashboard_path(@exhibit)
16
- add_breadcrumb t(:'spotlight.administration.sidebar.users'), exhibit_roles_path(@exhibit)
15
+ add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
16
+ add_breadcrumb t(:'spotlight.configuration.sidebar.users'), exhibit_roles_path(@exhibit)
17
17
  end
18
18
 
19
19
  def update_all
@@ -18,8 +18,8 @@ module Spotlight
18
18
 
19
19
  def edit
20
20
  add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
21
- add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
22
- add_breadcrumb t(:'spotlight.curation.sidebar.search_configuration'), edit_exhibit_search_configuration_path(@exhibit)
21
+ add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
22
+ add_breadcrumb t(:'spotlight.configuration.sidebar.search_configuration'), edit_exhibit_search_configuration_path(@exhibit)
23
23
 
24
24
  @field_metadata = Spotlight::FieldMetadata.new(repository, @blacklight_configuration.blacklight_config)
25
25
  end
@@ -6,8 +6,8 @@ module Spotlight
6
6
  page_title t(:'spotlight.curation.header'), title
7
7
  end
8
8
 
9
- def administration_page_title(title = nil)
10
- page_title t(:'spotlight.administration.header'), title
9
+ def configuration_page_title(title = nil)
10
+ page_title t(:'spotlight.configuration.header'), title
11
11
  end
12
12
 
13
13
  def page_title(section, title = nil)
@@ -30,6 +30,10 @@ module Spotlight
30
30
  rescue Blacklight::Exceptions::InvalidSolrID => e
31
31
  Rails.logger.debug "Unable to find document #{id}: #{e}"
32
32
  end
33
+
34
+ def reindex_all
35
+ find_each(&:reindex)
36
+ end
33
37
  end
34
38
 
35
39
  def update(current_exhibit, new_attributes)
@@ -64,20 +68,22 @@ module Spotlight
64
68
  { self.class.unique_key.to_sym => id }.reverse_merge(sidecars.inject({}) { |a, e| a.merge(e.to_solr) }).merge(tags_to_solr)
65
69
  end
66
70
 
67
- # rubocop:disable Metrics/LineLength
68
71
  def self.solr_field_for_tagger(tagger)
69
- :"#{Spotlight::Engine.config.solr_fields.prefix}#{tagger.class.model_name.param_key}_#{tagger.id}_tags#{Spotlight::Engine.config.solr_fields.string_suffix}"
72
+ :"#{solr_field_prefix(tagger)}tags#{Spotlight::Engine.config.solr_fields.string_suffix}"
70
73
  end
71
74
 
72
75
  def self.visibility_field(exhibit)
73
- :"#{Spotlight::Engine.config.solr_fields.prefix}#{exhibit.class.model_name.param_key}_#{exhibit.id}_public#{Spotlight::Engine.config.solr_fields.boolean_suffix}"
76
+ :"#{solr_field_prefix(exhibit)}public#{Spotlight::Engine.config.solr_fields.boolean_suffix}"
74
77
  end
75
- # rubocop:enable Metrics/LineLength
76
78
 
77
79
  def self.resource_type_field
78
80
  :"#{Spotlight::Engine.config.solr_fields.prefix}spotlight_resource_type#{Spotlight::Engine.config.solr_fields.string_suffix}"
79
81
  end
80
82
 
83
+ def self.solr_field_prefix(exhibit)
84
+ "#{Spotlight::Engine.config.solr_fields.prefix}#{exhibit.class.model_name.param_key}_#{exhibit.to_param}_"
85
+ end
86
+
81
87
  def make_public!(exhibit)
82
88
  sidecar(exhibit).public!
83
89
  end
@@ -17,6 +17,20 @@ module Spotlight
17
17
  @index ||= blacklight_config.repository_class.new(blacklight_config)
18
18
  end
19
19
 
20
+ def find_each
21
+ return to_enum(:find_each) unless block_given?
22
+
23
+ start = 0
24
+ search_params = { q: '*:*', fl: 'id', facet: false }
25
+ response = index.search(search_params.merge(start: start))
26
+
27
+ while response.documents.present?
28
+ response.documents.each { |x| yield x }
29
+ start += response.documents.length
30
+ response = index.search(search_params.merge(start: start))
31
+ end
32
+ end
33
+
20
34
  protected
21
35
 
22
36
  def blacklight_config
@@ -14,7 +14,7 @@ module Spotlight
14
14
 
15
15
  # exhibit admin
16
16
  can [:update, :import, :export, :destroy], Spotlight::Exhibit, id: user.admin_roles.pluck(:exhibit_id)
17
- can :manage, Spotlight::Role, exhibit_id: user.admin_roles.pluck(:exhibit_id)
17
+ can :manage, [Spotlight::BlacklightConfiguration, Spotlight::Role], exhibit_id: user.admin_roles.pluck(:exhibit_id)
18
18
 
19
19
  can :manage, PaperTrail::Version if user.roles.any?
20
20
 
@@ -29,8 +29,6 @@ module Spotlight
29
29
 
30
30
  can :manage, Spotlight::Lock, by: user
31
31
 
32
- can [:read, :update], Spotlight::BlacklightConfiguration, exhibit_id: user.roles.pluck(:exhibit_id)
33
-
34
32
  can [:read, :curate, :tag], Spotlight::Exhibit, id: user.roles.pluck(:exhibit_id)
35
33
 
36
34
  # public
@@ -192,14 +192,14 @@ module Spotlight
192
192
 
193
193
  def custom_index_fields
194
194
  Hash[exhibit.custom_fields.map do |x|
195
- field = Blacklight::Configuration::IndexField.new x.configuration.merge(field: x.field)
195
+ field = Blacklight::Configuration::IndexField.new x.configuration.merge(key: x.field, field: x.solr_field)
196
196
  [x.field, field]
197
197
  end]
198
198
  end
199
199
 
200
200
  def custom_facet_fields
201
201
  Hash[exhibit.custom_fields.vocab.map do |x|
202
- field = Blacklight::Configuration::FacetField.new x.configuration.merge(field: x.field, show: false)
202
+ field = Blacklight::Configuration::FacetField.new x.configuration.merge(key: x.field, field: x.solr_field, show: false)
203
203
  [x.field, field]
204
204
  end]
205
205
  end
@@ -10,25 +10,13 @@ module Spotlight
10
10
 
11
11
  scope :vocab, -> { where(field_type: 'vocab') }
12
12
 
13
- before_save do
13
+ before_create do
14
14
  self.field ||= field_name
15
15
  self.field_type ||= 'text'
16
16
  end
17
17
 
18
18
  before_save do
19
- if persisted? && field_type_changed?
20
- old_field = self.field
21
- self.field = field_name
22
-
23
- if blacklight_configuration && blacklight_configuration.index_fields.key?(old_field)
24
- blacklight_configuration.index_fields_will_change!
25
- f = blacklight_configuration.index_fields.delete(old_field)
26
- blacklight_configuration.index_fields[field] = f
27
- blacklight_configuration.save
28
- end
29
-
30
- Spotlight::RenameSidecarFieldJob.perform_later(exhibit, old_field, self.field)
31
- end
19
+ update_field_name(field_name) if persisted? && field_type_changed?
32
20
  end
33
21
 
34
22
  def label=(label)
@@ -62,6 +50,15 @@ module Spotlight
62
50
  end
63
51
  end
64
52
 
53
+ def solr_field
54
+ if field && field.starts_with?(solr_field_prefix)
55
+ # backwards compatibility with pre-0.9 custom fields
56
+ field
57
+ else
58
+ "#{solr_field_prefix}#{field || field_name}"
59
+ end
60
+ end
61
+
65
62
  protected
66
63
 
67
64
  def blacklight_configuration
@@ -76,7 +73,15 @@ module Spotlight
76
73
  end
77
74
 
78
75
  def field_name
79
- "#{Spotlight::Engine.config.solr_fields.prefix}exhibit_#{exhibit.to_param}_#{configuration['label'].parameterize}#{field_suffix}"
76
+ "#{field_slug}#{field_suffix}"
77
+ end
78
+
79
+ def field_slug
80
+ configuration['label'].parameterize
81
+ end
82
+
83
+ def solr_field_prefix
84
+ Spotlight::SolrDocument.solr_field_prefix(exhibit)
80
85
  end
81
86
 
82
87
  def field_suffix
@@ -108,5 +113,22 @@ module Spotlight
108
113
  :field
109
114
  ]
110
115
  end
116
+
117
+ ##
118
+ # Rename this custom field to new_name
119
+ # @param [String] the new name for the field
120
+ def update_field_name(new_field)
121
+ old_field = field
122
+ self.field = new_field
123
+
124
+ if blacklight_configuration && blacklight_configuration.index_fields.key?(old_field)
125
+ blacklight_configuration.index_fields_will_change!
126
+ f = blacklight_configuration.index_fields.delete(old_field)
127
+ blacklight_configuration.index_fields[field] = f
128
+ blacklight_configuration.save
129
+ end
130
+
131
+ Spotlight::RenameSidecarFieldJob.perform_later(exhibit, old_field, self.field)
132
+ end
111
133
  end
112
134
  end
@@ -44,7 +44,16 @@ module Spotlight
44
44
  end
45
45
 
46
46
  def data_to_solr
47
- data.except('configured_fields').merge(configured_fields_data_to_solr)
47
+ custom_fields_data_to_solr.merge(configured_fields_data_to_solr)
48
+ end
49
+
50
+ def custom_fields_data_to_solr
51
+ data.except('configured_fields').each_with_object({}) do |(key, value), solr_hash|
52
+ custom_field = custom_fields[key]
53
+ field_name = custom_field.solr_field if custom_field
54
+ field_name ||= key
55
+ solr_hash[field_name] = value
56
+ end
48
57
  end
49
58
 
50
59
  def configured_fields_data_to_solr
@@ -65,5 +74,11 @@ module Spotlight
65
74
  def upload_fields
66
75
  Spotlight::Resources::Upload.fields(exhibit)
67
76
  end
77
+
78
+ def custom_fields
79
+ exhibit.custom_fields.each_with_object({}) do |custom_field, hash|
80
+ hash[custom_field.field] = custom_field
81
+ end
82
+ end
68
83
  end
69
84
  end
@@ -1,3 +1,7 @@
1
1
  <div class="container">
2
- <%= render_breadcrumbs :builder => Spotlight::BootstrapBreadcrumbsBuilder %>
2
+ <div class="row">
3
+ <div class="col-md-12">
4
+ <%= render_breadcrumbs builder: Spotlight::BootstrapBreadcrumbsBuilder %>
5
+ </div>
6
+ </div>
3
7
  </div>
@@ -5,23 +5,6 @@
5
5
  <span class='background-container-gradient'></span>
6
6
  <% end %>
7
7
  <div class="container">
8
- <%= cache [current_exhibit, cache_key_for_spotlight_exhibits] do %>
9
- <ul class="more-exhibits nav navbar-nav navbar-sm">
10
- <% if Spotlight::Exhibit.many? %>
11
- <li class="dropdown">
12
- <a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= t(:'.more_exhibits') %> <b class="caret"></b></a>
13
- <ul class="dropdown-menu">
14
- <% Spotlight::Exhibit.accessible_by(current_ability).where.not(id: current_exhibit).each do |exhibit| %>
15
- <li>
16
- <%= link_to exhibit.title, [spotlight, exhibit] %>
17
- </li>
18
- <% end %>
19
- </ul>
20
- </li>
21
- <% end %>
22
- </ul>
23
- <% end if current_exhibit %>
24
-
25
8
  <div class="site-title h1">
26
9
  <% if content_for? :masthead %>
27
10
  <%= content_for :masthead %>
@@ -1,4 +1,4 @@
1
- <footer>
1
+ <footer class="site-footer">
2
2
  <div class="row">
3
3
  <%= render 'shared/share_follow' %>
4
4
  </div>
@@ -1,4 +1,4 @@
1
- <%= render 'spotlight/shared/curation_sidebar' %>
1
+ <%= render 'spotlight/shared/exhibit_sidebar' %>
2
2
  <div id="content" class="col-md-9">
3
3
  <%= render 'order_pages' %>
4
4
  <% if can? :manage, Spotlight::Contact.new(exhibit: @exhibit) %>