blacklight-spotlight 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spotlight/reindex_monitor.js +109 -0
- data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +9 -8
- data/app/assets/stylesheets/spotlight/_bootstrap_overrides.scss +15 -7
- data/app/assets/stylesheets/spotlight/_header.scss +67 -90
- data/app/assets/stylesheets/spotlight/_variables.scss +4 -0
- data/app/controllers/spotlight/attachments_controller.rb +2 -5
- data/app/controllers/spotlight/browse_controller.rb +15 -3
- data/app/controllers/spotlight/resources_controller.rb +4 -0
- data/app/controllers/spotlight/roles_controller.rb +1 -1
- data/app/controllers/spotlight/sites_controller.rb +50 -0
- data/app/helpers/spotlight/application_helper.rb +2 -1
- data/app/helpers/spotlight/navbar_helper.rb +1 -1
- data/app/jobs/spotlight/reindex_job.rb +17 -8
- data/app/models/concerns/spotlight/user.rb +8 -4
- data/app/models/spotlight/ability.rb +5 -4
- data/app/models/spotlight/exhibit.rb +15 -1
- data/app/models/spotlight/reindex_progress.rb +107 -0
- data/app/models/spotlight/resource.rb +4 -0
- data/app/models/spotlight/role.rb +2 -2
- data/app/models/spotlight/site.rb +16 -0
- data/app/views/devise/mailer/invitation_instructions.html.erb +1 -1
- data/app/views/layouts/spotlight/spotlight.html.erb +1 -1
- data/app/views/shared/_breadcrumbs.html.erb +1 -1
- data/app/views/shared/_exhibit_navbar.html.erb +6 -7
- data/app/views/shared/_masthead.html.erb +32 -0
- data/app/views/shared/_site_sidebar.html.erb +16 -0
- data/app/views/spotlight/about_pages/_sidebar.html.erb +4 -2
- data/app/views/spotlight/browse/_search_title.html.erb +1 -1
- data/app/views/spotlight/browse/index.html.erb +6 -4
- data/app/views/spotlight/browse/show.html.erb +6 -8
- data/app/views/spotlight/catalog/_admin_header.html.erb +15 -12
- data/app/views/spotlight/catalog/_reindex_progress_panel.html.erb +21 -0
- data/app/views/spotlight/exhibits/index.html.erb +4 -2
- data/app/views/spotlight/featured_images/_upload_form.html.erb +17 -0
- data/app/views/spotlight/home_pages/_empty.html.erb +1 -1
- data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +2 -2
- data/app/views/spotlight/metadata_configurations/edit.html.erb +3 -3
- data/app/views/spotlight/shared/_configuration_sidebar.html.erb +2 -2
- data/app/views/spotlight/shared/_curation_sidebar.html.erb +1 -1
- data/app/views/spotlight/sites/_exhibit.html.erb +18 -0
- data/app/views/spotlight/sites/edit.html.erb +40 -0
- data/app/views/spotlight/sites/edit_exhibits.html.erb +32 -0
- data/config/locales/spotlight.en.yml +30 -2
- data/config/routes.rb +5 -0
- data/db/migrate/20151210073829_create_spotlight_site.rb +9 -0
- data/db/migrate/20151211131415_add_site_to_spotlight_exhibits.rb +23 -0
- data/db/migrate/20151215141516_change_roles_to_support_polymorphic_associations.rb +40 -0
- data/db/migrate/20151215192845_add_index_status_to_resources.rb +6 -0
- data/lib/spotlight/controller.rb +18 -7
- data/lib/spotlight/engine.rb +37 -35
- data/lib/spotlight/version.rb +1 -1
- data/spec/controllers/spotlight/contacts_controller_spec.rb +2 -2
- data/spec/controllers/spotlight/home_pages_controller_spec.rb +2 -4
- data/spec/controllers/spotlight/resources_controller_spec.rb +14 -0
- data/spec/controllers/spotlight/roles_controller_spec.rb +1 -1
- data/spec/controllers/spotlight/sites_controller_spec.rb +48 -0
- data/spec/controllers/spotlight/versions_controller_spec.rb +1 -2
- data/spec/factories/roles.rb +1 -1
- data/spec/factories/users.rb +3 -3
- data/spec/features/add_contacts_spec.rb +2 -2
- data/spec/features/browse_category_spec.rb +65 -0
- data/spec/features/edit_contact_spec.rb +2 -2
- data/spec/features/exhibit_masthead_spec.rb +100 -0
- data/spec/features/javascript/reindex_monitor_spec.rb +22 -0
- data/spec/features/site_masthead_spec.rb +17 -52
- data/spec/helpers/spotlight/application_helper_spec.rb +16 -0
- data/spec/lib/spotlight/controller_spec.rb +34 -8
- data/spec/models/spotlight/ability_spec.rb +3 -4
- data/spec/models/spotlight/exhibit_spec.rb +23 -0
- data/spec/models/spotlight/reindex_progress_spec.rb +104 -0
- data/spec/models/spotlight/site_spec.rb +9 -0
- data/spec/views/shared/_exhibit_navbar.html.erb_spec.rb +3 -9
- data/spec/views/shared/_masthead.html.erb_spec.rb +83 -0
- data/spec/views/spotlight/browse/show.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/catalog/admin.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/roles/index.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb +29 -0
- metadata +33 -14
- data/app/views/shared/_exhibit_masthead.html.erb +0 -20
- data/app/views/shared/_exhibit_masthead_and_navbar.html.erb +0 -9
- data/app/views/shared/_home_sidebar.html.erb +0 -1
- data/app/views/spotlight/attachments/_form.html.erb +0 -29
- data/app/views/spotlight/attachments/edit.html.erb +0 -6
- data/app/views/spotlight/attachments/index.html.erb +0 -31
- data/app/views/spotlight/attachments/new.html.erb +0 -5
- data/app/views/spotlight/attachments/show.html.erb +0 -19
- data/spec/views/shared/_exhibit_masthead.html.erb_spec.rb +0 -70
- data/spec/views/shared/_exhibit_masthead_and_navbar.html.erb_spec.rb +0 -36
@@ -0,0 +1,32 @@
|
|
1
|
+
<%= render 'spotlight/shared/report_a_problem' if show_contact_form? %>
|
2
|
+
|
3
|
+
<div class="masthead <%= 'image-masthead' if current_masthead %> <%= 'resource-masthead' if resource_masthead? %>">
|
4
|
+
<% if current_masthead %>
|
5
|
+
<span class='background-container' style="background-image: url('<%= image_path(current_masthead.image.cropped) %>')"></span>
|
6
|
+
<span class='background-container-gradient'></span>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<%= render 'shared/exhibit_navbar' if current_exhibit && resource_masthead? %>
|
10
|
+
|
11
|
+
<div class="container site-title-container">
|
12
|
+
<div class="site-title h1">
|
13
|
+
<% if content_for? :masthead %>
|
14
|
+
<%= content_for :masthead %>
|
15
|
+
<% elsif current_exhibit %>
|
16
|
+
<%= current_exhibit.title %>
|
17
|
+
<% if current_exhibit.subtitle.present? %>
|
18
|
+
<small><%= current_exhibit.subtitle %></small>
|
19
|
+
<% end %>
|
20
|
+
<% else %>
|
21
|
+
<%= application_name %>
|
22
|
+
<% if current_site.subtitle.present? %>
|
23
|
+
<small><%= current_site.subtitle %></small>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<%= render 'shared/exhibit_navbar' if current_exhibit && !resource_masthead? %>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<%= render 'shared/breadcrumbs' unless resource_masthead? %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% if can?(:manage, Spotlight::Site.instance) || can?(:create, Spotlight::Exhibit) %>
|
2
|
+
<h4 class="nav-heading"><%=t(:'.header') %></h4>
|
3
|
+
<ul class="nav sidenav">
|
4
|
+
<% if can? :manage, Spotlight::Site.instance %>
|
5
|
+
<li><%= link_to t(:'spotlight.sites.edit.section'), spotlight.edit_site_path %></li>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<% if can? :manange, Spotlight::Exhibit %>
|
9
|
+
<li><%= link_to t(:'spotlight.sites.edit_exhibits.section'), spotlight.edit_site_exhibits_path %></li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
12
|
+
|
13
|
+
<ul class="nav sidenav nav-pills nav-stacked">
|
14
|
+
<li><%= link_to t('.create_exhibit'), new_exhibit_path, class: 'btn btn-default btn-nav', role: 'button' if can? :create, Spotlight::Exhibit %></li>
|
15
|
+
</ul>
|
16
|
+
<% end %>
|
@@ -1,9 +1,11 @@
|
|
1
1
|
<% cache_unless current_user, [current_exhibit, @page] do %>
|
2
2
|
<div id="sidebar" class="col-md-3" role="complementary">
|
3
|
-
<h4><%= current_exhibit.main_navigations.about.label_or_default %></h4>
|
3
|
+
<h4 class="nav-heading"><%= current_exhibit.main_navigations.about.label_or_default %></h4>
|
4
4
|
<ul class="nav sidenav">
|
5
5
|
<% current_exhibit.about_pages.published.each do |page| %>
|
6
|
-
<li class="<%= 'active' if current_page? [page.exhibit, page] %>"
|
6
|
+
<li class="<%= 'active' if current_page? [page.exhibit, page] %>">
|
7
|
+
<%= link_to page.title, [page.exhibit, page] %>
|
8
|
+
</li>
|
7
9
|
<% end %>
|
8
10
|
</ul>
|
9
11
|
<%= cache current_exhibit do %>
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
<%= search.title %>
|
2
2
|
<small class="item-count"><%= t :'spotlight.browse.search.item_count', count: search.documents.size %></small>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<% set_html_page_title %>
|
2
|
-
<
|
2
|
+
<div class="col-md-12">
|
3
|
+
<h1 class="sr-only"><%= t :'.header' %></h1>
|
3
4
|
|
4
|
-
<div class="browse-landing">
|
5
|
-
|
6
|
-
</div>
|
5
|
+
<div class="browse-landing">
|
6
|
+
<%= render collection: @searches, partial: 'spotlight/browse/search' %>
|
7
|
+
</div>
|
8
|
+
</div>
|
@@ -1,21 +1,19 @@
|
|
1
1
|
<% set_html_page_title @search.title %>
|
2
|
-
<div>
|
2
|
+
<div class="col-md-12">
|
3
3
|
<%= exhibit_edit_link @search, class: 'edit-button pull-right btn btn-primary' if can? :edit, @search %>
|
4
|
-
<% if
|
5
|
-
<%= render 'search_title', search: @search %>
|
6
|
-
<% else %>
|
4
|
+
<% if resource_masthead? %>
|
7
5
|
<% content_for :masthead do %>
|
8
|
-
|
9
|
-
<%= render 'search_title', search: @search %>
|
10
|
-
</div>
|
6
|
+
<%= render 'search_title', search: @search %>
|
11
7
|
<% end %>
|
8
|
+
<% else %>
|
9
|
+
<h1><%= render 'search_title', search: @search %></h1>
|
12
10
|
<% end %>
|
13
11
|
<% if @search.long_description.present? %>
|
14
12
|
<p class="long-description-text"><%= @search.long_description %></p>
|
15
13
|
<% end %>
|
16
14
|
</div>
|
17
15
|
|
18
|
-
<div>
|
16
|
+
<div class="col-md-12">
|
19
17
|
<%= render 'sort_and_per_page' %>
|
20
18
|
<%= render_document_index(@document_list) %>
|
21
19
|
<%= render 'results_pagination' %>
|
@@ -1,16 +1,19 @@
|
|
1
1
|
<% if can? :manage, Spotlight::Resource.new(exhibit: current_exhibit) %>
|
2
|
-
<div
|
3
|
-
|
4
|
-
<%= link_to t('.reindex'), reindex_all_exhibit_resources_path(current_exhibit), method: :post, class: 'btn btn-default' %>
|
2
|
+
<div data-behavior='reindex-monitor' data-monitor-url="<%= monitor_exhibit_resources_path(current_exhibit) %>">
|
3
|
+
<%= render 'reindex_progress_panel' %>
|
5
4
|
</div>
|
6
|
-
<div class="
|
7
|
-
|
8
|
-
<%= link_to t('.
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
<div class="add-items-nav clearfix">
|
6
|
+
<div class="pull-left">
|
7
|
+
<%= link_to t('.reindex'), reindex_all_exhibit_resources_path(current_exhibit), method: :post, class: 'btn btn-default' %>
|
8
|
+
</div>
|
9
|
+
<div class="pull-right">
|
10
|
+
<% if Spotlight::Engine.config.new_resource_partials.any? %>
|
11
|
+
<%= link_to t('.new.repo_item'), new_exhibit_catalog_path(current_exhibit), class: 'btn btn-default' %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<% if Spotlight::Engine.config.uploaded_resource_partials.any? %>
|
15
|
+
<%= link_to t('.new.non_repo_item'), new_exhibit_resources_upload_path(current_exhibit), class: 'btn btn-default' %>
|
16
|
+
<% end %>
|
17
|
+
</div>
|
14
18
|
</div>
|
15
|
-
</div>
|
16
19
|
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<div class="panel panel-info index-status" style='display:none;'>
|
2
|
+
<div class="panel-heading">
|
3
|
+
<h3 class="panel-title"><%= t('.heading') %></h3>
|
4
|
+
</div>
|
5
|
+
<div class="panel-body">
|
6
|
+
<p data-behavior='monitor-start'>
|
7
|
+
<span class="text-muted" data-behavior='date'></span> <%= t('.begin_html') %>
|
8
|
+
</p>
|
9
|
+
<p data-behavior='monitor-current'>
|
10
|
+
<span class="text-muted" data-behavior='date'></span> <%= t('.completed_html') %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<p class="bg-warning" data-behavior='monitor-error' style='display:none;'>
|
14
|
+
<%= t('.error') %>
|
15
|
+
</p>
|
16
|
+
|
17
|
+
<div class="progress">
|
18
|
+
<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="" aria-valuemin="0" aria-valuemax=""></div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</div>
|
@@ -5,7 +5,9 @@
|
|
5
5
|
<% if can?(:manage, Spotlight::Exhibit) %>
|
6
6
|
<li role="presentation"><a href="#unpublished" aria-controls="unpublished" role="tab" data-toggle="tab"><%= t('.unpublished') %></a></li>
|
7
7
|
<% end %>
|
8
|
-
|
8
|
+
<% if current_user && current_user.exhibits.any? %>
|
9
|
+
<li role="presentation"><a href="#user" aria-controls="user" role="tab" data-toggle="tab"><%= t('.user') %></a></li>
|
10
|
+
<% end %>
|
9
11
|
</ul>
|
10
12
|
<% end %>
|
11
13
|
|
@@ -47,5 +49,5 @@
|
|
47
49
|
</div>
|
48
50
|
|
49
51
|
<aside class="col-md-3">
|
50
|
-
<%= render "shared/
|
52
|
+
<%= render "shared/site_sidebar" %>
|
51
53
|
</aside>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% form_prefix = f.object_name.parameterize("_") %>
|
2
|
+
<%= field_set_tag do %>
|
3
|
+
<%= f.check_box(:display) %>
|
4
|
+
<% end if f.object.is_a? Spotlight::Masthead %>
|
5
|
+
<%= field_set_tag(t(:'.source.header')) do %>
|
6
|
+
<div>
|
7
|
+
<%= f.hidden_field(:source, value: :remote, label: t(:'.source.remote.label')) %>
|
8
|
+
<%= f.file_field_without_bootstrap(:image, data: jcrop_options.merge(input_select_target: "##{form_prefix}_source_remote")) %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
<%= field_set_tag(t(:'.source.remote.header')) do %>
|
12
|
+
<p class="instructions"><%= t(:'.source.remote.help') %></p>
|
13
|
+
<div class="form-group croppable-loading-area <%= "missing-croppable" unless f.object.try(:image).present? %>">
|
14
|
+
<%= hidden_field_tag :"#{jcrop_options.fetch(:selector, "image")}_crop", ([f.object.image_crop_x.to_i, f.object.image_crop_y.to_i, f.object.image_crop_x.to_i + f.object.image_crop_w.to_i, f.object.image_crop_y.to_i + f.object.image_crop_h.to_i].to_json if f.object.try(:image_crop_x)) %>
|
15
|
+
<%= f.cropbox :image %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<li>Next, go to the <%= link_to "Configuration > Appearance", edit_exhibit_appearance_path(current_exhibit) %> page to add a site masthead image and configure other appearance options.</li>
|
16
16
|
<% end %>
|
17
17
|
|
18
|
-
<% if can? :manage, Spotlight::Role.new(
|
18
|
+
<% if can? :manage, Spotlight::Role.new(resource: current_exhibit) %>
|
19
19
|
<li>If you want help building the exhibit, use the <%= link_to "Configuration > Users", exhibit_roles_path(current_exhibit) %> page to add other user accounts.</li>
|
20
20
|
<% end %>
|
21
21
|
|
@@ -8,9 +8,9 @@
|
|
8
8
|
<%= field.hidden_field :label, value: index_field_label(nil, key), class: 'form-control input-sm', data: {:"edit-field-target" => 'true'} %>
|
9
9
|
</div>
|
10
10
|
</td>
|
11
|
-
<td class="checkbox-cell"><%= field.check_box :show, inline: true, checked: config.show, label: "" %></td>
|
11
|
+
<td class="checkbox-cell text-center"><%= field.check_box :show, inline: true, checked: config.show, label: "" %></td>
|
12
12
|
<% available_view_fields.keys.each do |type| %>
|
13
|
-
<td class="checkbox-cell"><%= field.check_box type, inline: true, checked: config.send(type), label: "" %></td>
|
13
|
+
<td class="checkbox-cell text-center"><%= field.check_box type, inline: true, checked: config.send(type), label: "" %></td>
|
14
14
|
<% end %>
|
15
15
|
<% end %>
|
16
16
|
</tr>
|
@@ -6,18 +6,18 @@
|
|
6
6
|
|
7
7
|
<p class="instructions"><%= t :'.instructions' %></p>
|
8
8
|
|
9
|
-
<table id="nested-fields" class="table table-striped">
|
9
|
+
<table id="nested-fields" class="table table-striped dd-table">
|
10
10
|
<thead>
|
11
11
|
<tr>
|
12
12
|
<th><%= t :'.fields.label' %></th>
|
13
|
-
<th>
|
13
|
+
<th class="text-center">
|
14
14
|
<div>
|
15
15
|
<%= t :'.view.show', default: t(:'blacklight.search.view.show') %>
|
16
16
|
</div>
|
17
17
|
<%= select_deselect_button %>
|
18
18
|
</th>
|
19
19
|
<% available_view_fields.keys.each do |type| %>
|
20
|
-
<th>
|
20
|
+
<th class="text-center">
|
21
21
|
<div>
|
22
22
|
<%= t :".view.#{type}", default: t(:".view.#{type}") %>
|
23
23
|
</div>
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<h4><%=t(:'spotlight.configuration.sidebar.header') %></h4>
|
1
|
+
<h4 class="nav-heading"><%=t(:'spotlight.configuration.sidebar.header') %></h4>
|
2
2
|
<ul class="nav sidenav">
|
3
3
|
<% if can? :update, current_exhibit %>
|
4
4
|
<li><%= link_to t(:'spotlight.configuration.sidebar.settings'), spotlight.edit_exhibit_path(current_exhibit) %></li>
|
5
5
|
<li><%= link_to t(:'spotlight.configuration.sidebar.appearance'), spotlight.edit_exhibit_appearance_path(current_exhibit) %></li>
|
6
6
|
<% end %>
|
7
|
-
<% if can? :manage, Spotlight::Role.new(
|
7
|
+
<% if can? :manage, Spotlight::Role.new(resource: current_exhibit) %>
|
8
8
|
<li><%= link_to t(:'spotlight.configuration.sidebar.users'), spotlight.exhibit_roles_path(current_exhibit) %></li>
|
9
9
|
<% end %>
|
10
10
|
<% if can? :update, current_exhibit.blacklight_configuration %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<h4><%=t(:'spotlight.curation.sidebar.header') %></h4>
|
1
|
+
<h4 class="nav-heading"><%=t(:'spotlight.curation.sidebar.header') %></h4>
|
2
2
|
<ul class="nav sidenav">
|
3
3
|
<li><%= link_to t(:'spotlight.curation.sidebar.items'), spotlight.admin_exhibit_catalog_index_path(current_exhibit) %></li>
|
4
4
|
<% if can? :tag, current_exhibit %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% exhibit = f.object %>
|
2
|
+
<tr class="dd-item dd3-item" data-id="<%= exhibit.id %>">
|
3
|
+
<td>
|
4
|
+
<div class="handle-wrap">
|
5
|
+
<div class="dd-handle dd3-handle"><%= t :drag %></div>
|
6
|
+
|
7
|
+
<%= f.hidden_field :id %>
|
8
|
+
<%= f.hidden_field :weight, data: { property: "weight" } %>
|
9
|
+
|
10
|
+
<%= link_to exhibit.title, exhibit %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
</td>
|
14
|
+
<td class="text-right"><%= exhibit.published? ? t(:'.published') : t(:'.unpublished') %></td>
|
15
|
+
<td class="text-right"><%= exhibit.requested_by %></td>
|
16
|
+
<td class="text-right"><%= l exhibit.created_at, format: :short %></td>
|
17
|
+
<td class="text-right"><%= l exhibit.updated_at, format: :short %></td>
|
18
|
+
</tr>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<div id="content" class="col-md-9 exhibit-admin">
|
2
|
+
<%= page_title(t('.section'), t('.page_title')) %>
|
3
|
+
<div role="tabpanel">
|
4
|
+
<%= bootstrap_form_for @site, url: spotlight.site_path, layout: :horizontal, label_col: 'col-md-2', control_col: 'col-md-10', html: {class: "row"} do |f| %>
|
5
|
+
<ul class="nav nav-tabs" role="tablist">
|
6
|
+
<li role="presentation" class="active">
|
7
|
+
<a href="#basic" aria-controls="basic" role="tab" data-toggle="tab"><%= t(:'.basic_settings.heading') %></a>
|
8
|
+
</li>
|
9
|
+
<li role="presentation">
|
10
|
+
<a href="#site-masthead" aria-controls="site-masthead" role="tab" data-toggle="tab"><%= t(:'.site_masthead.heading') %></a>
|
11
|
+
</li>
|
12
|
+
</ul>
|
13
|
+
<div class="tab-content">
|
14
|
+
<div role="tabpanel" class="tab-pane active" id="basic">
|
15
|
+
<div class="row col-md-12">
|
16
|
+
<%= f.text_field :title %>
|
17
|
+
<%= f.text_field :subtitle %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div role="tabpanel" class="tab-pane" id="site-masthead">
|
22
|
+
<p class="instructions"><%= t(:'.site_masthead.help') %></p>
|
23
|
+
<%= f.fields_for(:masthead, @site.masthead || @site.build_masthead) do |m| %>
|
24
|
+
<%= render '/spotlight/featured_images/upload_form', f: m, jcrop_options: default_masthead_jcrop_options %>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="form-actions">
|
30
|
+
<div class="primary-actions">
|
31
|
+
<%= f.submit nil, class: 'btn btn-primary' %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
<% end %>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<aside class="col-md-3">
|
39
|
+
<%= render "shared/site_sidebar" %>
|
40
|
+
</aside>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<div id="content" class="col-md-9 exhibit-admin">
|
2
|
+
<%= page_title(t('.section'), t('.page_title')) %>
|
3
|
+
<%= bootstrap_form_for @site, url: spotlight.site_path, layout: :horizontal, label_col: 'col-md-2', control_col: 'col-md-10' do |f| %>
|
4
|
+
<p class="instructions"><%= t :'.instructions' %></p>
|
5
|
+
<table class="table table-striped dd-table">
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<th><%= Spotlight::Exhibit.human_attribute_name(:title) %></th>
|
9
|
+
<th class="text-right"><%= Spotlight::Exhibit.human_attribute_name(:published) %></th>
|
10
|
+
<th class="text-right"><%= Spotlight::Exhibit.human_attribute_name(:requested_by) %></th>
|
11
|
+
<th class="text-right"><%= Spotlight::Exhibit.human_attribute_name(:created_at) %></th>
|
12
|
+
<th class="text-right"><%= Spotlight::Exhibit.human_attribute_name(:updated_at) %></th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<tbody class="table metadata_fields dd dd-list" data-behavior="nestable" data-max-depth="1" data-list-node-name="tbody" data-item-node-name="tr" data-expand-btn-HTML=" " data-collapse-btn-HTML=" ">
|
16
|
+
<%= f.fields_for :exhibits do |exhibit_form| %>
|
17
|
+
<%= render partial: 'exhibit', locals: { f: exhibit_form } %>
|
18
|
+
<% end %>
|
19
|
+
</tbody>
|
20
|
+
</table>
|
21
|
+
|
22
|
+
<div class="form-actions">
|
23
|
+
<div class="primary-actions">
|
24
|
+
<%= f.submit nil, class: 'btn btn-primary' %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<aside class="col-md-3">
|
31
|
+
<%= render "shared/site_sidebar" %>
|
32
|
+
</aside>
|
@@ -55,6 +55,7 @@ en:
|
|
55
55
|
destroyed: "The %{model} was deleted."
|
56
56
|
exhibit: *spotlight_default
|
57
57
|
search: *spotlight_default
|
58
|
+
site: *spotlight_default
|
58
59
|
contact_form:
|
59
60
|
create: "Send"
|
60
61
|
created: "Thanks. Your feedback has been sent."
|
@@ -83,6 +84,8 @@ en:
|
|
83
84
|
attributes:
|
84
85
|
"spotlight/contact":
|
85
86
|
avatar: "Photo"
|
87
|
+
"spotlight/exhibit":
|
88
|
+
published: "Published?"
|
86
89
|
"spotlight/page":
|
87
90
|
display_sidebar?: "Show sidebar"
|
88
91
|
display_title: "Show title"
|
@@ -261,6 +264,11 @@ en:
|
|
261
264
|
non_repo_item: "Add non-repository item"
|
262
265
|
new:
|
263
266
|
header: Import items
|
267
|
+
reindex_progress_panel:
|
268
|
+
heading: Reindexing status
|
269
|
+
begin_html: "Began reindexing a total of <span data-behavior='total'></span> items."
|
270
|
+
completed_html: "Reindexed <span data-behavior='completed'></span> of <span data-behavior='total'></span> items."
|
271
|
+
error: 'An error occured while reindexing. Contact your exhibits administrator for more information.'
|
264
272
|
invitation_mailer:
|
265
273
|
invitation_instructions:
|
266
274
|
hello: "Hello %{email}!"
|
@@ -431,7 +439,7 @@ en:
|
|
431
439
|
page_options:
|
432
440
|
published: "Publish"
|
433
441
|
featured_images:
|
434
|
-
form:
|
442
|
+
form: &featured_images_form
|
435
443
|
source:
|
436
444
|
header: "Image source"
|
437
445
|
exhibit:
|
@@ -443,6 +451,7 @@ en:
|
|
443
451
|
help: >
|
444
452
|
Adjust the cropping box to cover the area of the image you want to use
|
445
453
|
as the thumbnail image. Click "Save Changes" to save the cropped area.
|
454
|
+
upload_form: *featured_images_form
|
446
455
|
|
447
456
|
resources:
|
448
457
|
new:
|
@@ -486,6 +495,24 @@ en:
|
|
486
495
|
email: "Email Address"
|
487
496
|
role: "Role"
|
488
497
|
actions: "Actions"
|
498
|
+
sites:
|
499
|
+
edit:
|
500
|
+
section: Customize appearance
|
501
|
+
page_title: Exhibits landing page
|
502
|
+
basic_settings:
|
503
|
+
heading: Title
|
504
|
+
site_masthead:
|
505
|
+
heading: Site masthead
|
506
|
+
help: >
|
507
|
+
You can select and crop an image to use as a background for your home page masthead.
|
508
|
+
|
509
|
+
To use an image as a masthead background, you should use an image that is at least
|
510
|
+
120 pixels tall and 1200 pixels wide. For best results use an image at least 1800 pixels wide.
|
511
|
+
You can crop larger images using the cropping tool below.
|
512
|
+
edit_exhibits:
|
513
|
+
section: Manage exhibits
|
514
|
+
page_title: Existing exhibits
|
515
|
+
instructions: Drag and drop the exhibits below to specify the order in which they are displayed on the exhibits homepage.
|
489
516
|
searches: &search
|
490
517
|
nav_link: "Browse"
|
491
518
|
index:
|
@@ -569,5 +596,6 @@ en:
|
|
569
596
|
shared:
|
570
597
|
share_follow:
|
571
598
|
share_follow: "Share & Follow"
|
572
|
-
|
599
|
+
site_sidebar:
|
600
|
+
header: Actions
|
573
601
|
create_exhibit: 'Create a new exhibit'
|