blacklight-spotlight 0.32.0 → 0.33.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/app/assets/images/spotlight/default_browse_thumbnail.jpg +0 -0
- data/app/assets/javascripts/spotlight/application.js +6 -1
- data/app/assets/javascripts/spotlight/blocks/pages_block.js +1 -1
- data/app/assets/javascripts/spotlight/blocks/resources_block.js +7 -4
- data/app/assets/javascripts/spotlight/blocks/solr_documents_base_block.js +108 -0
- data/app/assets/javascripts/spotlight/blocks/solr_documents_block.js +12 -56
- data/app/assets/javascripts/spotlight/blocks/solr_documents_carousel_block.js +3 -3
- data/app/assets/javascripts/spotlight/blocks/solr_documents_embed_block.js +3 -3
- data/app/assets/javascripts/spotlight/blocks/solr_documents_features_block.js +3 -3
- data/app/assets/javascripts/spotlight/blocks/solr_documents_grid_block.js +3 -3
- data/app/assets/javascripts/spotlight/crop.es6 +205 -0
- data/app/assets/javascripts/spotlight/croppable.js +7 -104
- data/app/assets/javascripts/spotlight/iiif.es6 +54 -0
- data/app/assets/javascripts/spotlight/multi_image_selector.js +34 -16
- data/app/assets/javascripts/spotlight/pages.js.erb +1 -1
- data/app/assets/javascripts/spotlight/reindex_monitor.js +5 -1
- data/app/assets/javascripts/spotlight/search_typeahead.js +33 -47
- data/app/assets/javascripts/spotlight/sir-trevor/locales.js +5 -2
- data/app/assets/javascripts/spotlight/zpr_links.js.erb +30 -0
- data/app/assets/stylesheets/spotlight/_croppable.scss +8 -13
- data/app/assets/stylesheets/spotlight/_multi_image_selector.scss +1 -1
- data/app/assets/stylesheets/spotlight/_pages.scss +5 -0
- data/app/assets/stylesheets/spotlight/typeahead.css +0 -1
- data/app/controllers/concerns/spotlight/base.rb +3 -5
- data/app/controllers/spotlight/appearances_controller.rb +6 -4
- data/app/controllers/spotlight/catalog_controller.rb +10 -0
- data/app/controllers/spotlight/contacts_controller.rb +2 -6
- data/app/controllers/spotlight/featured_images_controller.rb +26 -0
- data/app/controllers/spotlight/pages_controller.rb +3 -2
- data/app/controllers/spotlight/resources/iiif_harvester_controller.rb +10 -0
- data/app/controllers/spotlight/resources/upload_controller.rb +4 -3
- data/app/controllers/spotlight/searches_controller.rb +20 -6
- data/app/controllers/spotlight/sites_controller.rb +2 -5
- data/app/helpers/spotlight/application_helper.rb +14 -1
- data/app/helpers/spotlight/crop_helper.rb +37 -0
- data/app/helpers/spotlight/main_app_helpers.rb +13 -0
- data/app/helpers/spotlight/meta_helper.rb +10 -20
- data/app/models/concerns/spotlight/solr_document.rb +1 -2
- data/app/models/concerns/spotlight/solr_document/uploaded_resource.rb +1 -23
- data/app/models/sir_trevor_rails/blocks/browse_block.rb +10 -0
- data/app/models/sir_trevor_rails/blocks/featured_pages_block.rb +10 -0
- data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +5 -0
- data/app/models/spotlight/analytics/ga.rb +1 -1
- data/app/models/spotlight/blacklight_configuration.rb +16 -8
- data/app/models/spotlight/contact.rb +2 -13
- data/app/models/spotlight/contact_image.rb +11 -0
- data/app/models/spotlight/exhibit.rb +11 -8
- data/app/models/spotlight/exhibit_thumbnail.rb +12 -0
- data/app/models/spotlight/feature_page.rb +3 -5
- data/app/models/spotlight/featured_image.rb +28 -9
- data/app/models/spotlight/home_page.rb +2 -0
- data/app/models/spotlight/masthead.rb +5 -11
- data/app/models/spotlight/page.rb +5 -0
- data/app/models/spotlight/reindex_progress.rb +10 -18
- data/app/models/spotlight/reindexing_log_entry.rb +1 -0
- data/app/models/spotlight/resources/iiif_harvester.rb +33 -0
- data/app/models/spotlight/resources/iiif_manifest.rb +211 -0
- data/app/models/spotlight/resources/iiif_service.rb +93 -0
- data/app/models/spotlight/resources/upload.rb +1 -2
- data/app/models/spotlight/search.rb +5 -34
- data/app/presenters/spotlight/iiif_manifest_presenter.rb +79 -0
- data/app/serializers/spotlight/exhibit_export_serializer.rb +9 -41
- data/app/services/spotlight/carrierwave_file_resolver.rb +3 -1
- data/app/services/spotlight/iiif_resource_resolver.rb +73 -0
- data/app/services/spotlight/resources/iiif_builder.rb +17 -0
- data/app/services/spotlight/upload_solr_document_builder.rb +23 -23
- data/app/uploaders/spotlight/attachment_uploader.rb +0 -48
- data/app/uploaders/spotlight/featured_image_uploader.rb +2 -16
- data/app/views/_user_util_links.html.erb +8 -5
- data/app/views/catalog/_save_search.html.erb +4 -2
- data/app/views/layouts/spotlight/spotlight.html.erb +5 -1
- data/app/views/shared/_masthead.html.erb +1 -1
- data/app/views/spotlight/about_pages/_contact_properties.html.erb +1 -1
- data/app/views/spotlight/appearances/edit.html.erb +26 -6
- data/app/views/spotlight/browse/_search.html.erb +1 -1
- data/app/views/spotlight/contacts/_form.html.erb +12 -7
- data/app/views/spotlight/dashboards/_reindexing_activity.html.erb +1 -1
- data/app/views/spotlight/exhibits/_exhibit_card_front.html.erb +2 -2
- data/app/views/spotlight/featured_images/_form.html.erb +12 -15
- data/app/views/spotlight/featured_images/_upload_form.html.erb +6 -12
- data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +3 -3
- data/app/views/spotlight/pages/_form.html.erb +3 -3
- data/app/views/spotlight/pages/edit.html.erb +4 -2
- data/app/views/spotlight/resources/iiif/_form.html.erb +9 -0
- data/app/views/spotlight/searches/_form.html.erb +3 -3
- data/app/views/spotlight/searches/_search.html.erb +4 -2
- data/app/views/spotlight/sir_trevor/blocks/_browse_block.html.erb +2 -2
- data/app/views/spotlight/sir_trevor/blocks/_featured_pages_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +7 -2
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +4 -2
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +4 -2
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +4 -2
- data/app/views/spotlight/sites/edit.html.erb +1 -1
- data/config/locales/spotlight.en.yml +31 -6
- data/config/routes.rb +9 -0
- data/db/migrate/20160714144125_add_iiif_urls_to_featured_image.rb +9 -0
- data/db/migrate/20160718194010_add_iiif_url_to_contact.rb +6 -0
- data/db/migrate/20160805143841_add_upload_id_to_resources.rb +6 -0
- data/db/migrate/20170204091234_add_theme_to_spotlight_exhibits.rb +5 -0
- data/lib/generators/spotlight/install_generator.rb +5 -2
- data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +0 -1
- data/lib/generators/spotlight/templates/spotlight.scss +3 -2
- data/lib/migration/iiif.rb +82 -0
- data/lib/spotlight/engine.rb +22 -10
- data/lib/spotlight/version.rb +1 -1
- data/lib/tasks/spotlight_tasks.rake +10 -0
- data/spec/controllers/spotlight/about_pages_controller_spec.rb +1 -1
- data/spec/controllers/spotlight/appearances_controller_spec.rb +31 -18
- data/spec/controllers/spotlight/catalog_controller_spec.rb +40 -0
- data/spec/controllers/spotlight/contacts_controller_spec.rb +20 -1
- data/spec/controllers/spotlight/feature_pages_controller_spec.rb +2 -6
- data/spec/controllers/spotlight/featured_images_controller_spec.rb +74 -0
- data/spec/controllers/spotlight/home_pages_controller_spec.rb +1 -1
- data/spec/controllers/spotlight/searches_controller_spec.rb +3 -1
- data/spec/controllers/spotlight/sites_controller_spec.rb +6 -1
- data/spec/examples.txt +1118 -1059
- data/spec/factories/contact_images.rb +6 -0
- data/spec/factories/contacts.rb +4 -1
- data/spec/factories/exhibit_thumbnails.rb +6 -0
- data/spec/factories/exhibits.rb +4 -0
- data/spec/factories/featured_images.rb +1 -0
- data/spec/factories/resources.rb +2 -1
- data/spec/features/add_contacts_spec.rb +5 -5
- data/spec/features/add_iiif_manifest_spec.rb +41 -0
- data/spec/features/add_items_spec.rb +2 -2
- data/spec/features/autocomplete_typeahead_spec.rb +86 -0
- data/spec/features/browse_category_admin_spec.rb +27 -6
- data/spec/features/browse_category_spec.rb +2 -2
- data/spec/features/create_exhibit_spec.rb +3 -3
- data/spec/features/exhibit_masthead_spec.rb +20 -9
- data/spec/features/exhibit_themes_spec.rb +25 -0
- data/spec/features/home_page_spec.rb +1 -1
- data/spec/features/javascript/blocks/solr_documents_block_spec.rb +42 -0
- data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +5 -3
- data/spec/features/javascript/feature_page_admin_spec.rb +1 -1
- data/spec/features/javascript/multi_image_select_spec.rb +5 -6
- data/spec/features/javascript/search_config_admin_spec.rb +1 -1
- data/spec/features/site_masthead_spec.rb +14 -4
- data/spec/fixtures/gk446cj2442-manifest.json +58 -0
- data/spec/fixtures/iiif_responses.rb +274 -0
- data/spec/fixtures/sample_solr_documents.yml +106 -0
- data/spec/helpers/spotlight/crop_helper_spec.rb +9 -0
- data/spec/helpers/spotlight/main_app_helpers_spec.rb +45 -0
- data/spec/helpers/spotlight/meta_helper_spec.rb +2 -15
- data/spec/lib/migration/iiif_spec.rb +70 -0
- data/spec/models/spotlight/blacklight_configuration_spec.rb +17 -5
- data/spec/models/spotlight/contact_image_spec.rb +9 -0
- data/spec/models/spotlight/exhibit_spec.rb +17 -20
- data/spec/models/spotlight/exhibit_thumbnail_spec.rb +8 -0
- data/spec/models/spotlight/featured_image_spec.rb +59 -10
- data/spec/models/spotlight/masthead_spec.rb +33 -17
- data/spec/models/spotlight/page_spec.rb +14 -0
- data/spec/models/spotlight/reindex_progress_spec.rb +22 -73
- data/spec/models/spotlight/resources/iiif_harvester_spec.rb +30 -0
- data/spec/models/spotlight/resources/iiif_manifest_spec.rb +107 -0
- data/spec/models/spotlight/resources/iiif_service_spec.rb +52 -0
- data/spec/models/spotlight/resources/upload_spec.rb +7 -3
- data/spec/models/spotlight/search_spec.rb +0 -45
- data/spec/models/spotlight/solr_document/uploaded_resource_spec.rb +11 -29
- data/spec/presenters/spotlight/iiif_manifest_presenter_spec.rb +123 -0
- data/spec/routing/spotlight/exhibit_catalog_spec.rb +4 -0
- data/spec/routing/spotlight/featured_images_spec.rb +21 -0
- data/spec/serializers/spotlight/exhibit_export_serializer_spec.rb +15 -18
- data/spec/services/spotlight/iiif_resource_resolver_spec.rb +90 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/support/features/test_features_helpers.rb +3 -2
- data/spec/support/stub_iiif_response.rb +24 -0
- data/spec/support/views/test_view_helpers.rb +1 -0
- data/spec/test_app_templates/Gemfile.extra +0 -1
- data/spec/uploaders/spotlight/attachment_uploader_spec.rb +24 -0
- data/spec/uploaders/spotlight/featured_image_uploader_spec.rb +30 -0
- data/spec/views/_user_util_links.html.erb_spec.rb +9 -5
- data/spec/views/shared/_masthead.html.erb_spec.rb +5 -2
- data/spec/views/spotlight/browse/_search.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/contacts/edit.html.erb_spec.rb +4 -7
- data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +7 -2
- data/spec/views/spotlight/pages/edit.html.erb_spec.rb +3 -1
- data/spec/views/spotlight/pages/new.html.erb_spec.rb +3 -1
- data/spec/views/spotlight/searches/_search.html.erb_spec.rb +3 -2
- data/spec/views/spotlight/searches/edit.html.erb_spec.rb +3 -2
- data/vendor/assets/javascripts/leaflet-areaselect.js +184 -0
- data/vendor/assets/javascripts/leaflet-iiif.js +230 -0
- data/vendor/assets/javascripts/leaflet.js +9 -0
- data/vendor/assets/javascripts/polyfill.min.js +4 -0
- data/vendor/assets/stylesheets/leaflet-areaselect.css +15 -0
- data/vendor/assets/stylesheets/leaflet.css +624 -0
- metadata +136 -62
- data/app/assets/javascripts/spotlight/jcrop.js +0 -1696
- data/app/helpers/spotlight/jcrop_helper.rb +0 -37
- data/app/models/concerns/spotlight/default_thumbnailable.rb +0 -25
- data/app/models/concerns/spotlight/image_derivatives.rb +0 -58
- data/app/models/concerns/spotlight/solr_document/spotlight_images.rb +0 -55
- data/app/uploaders/spotlight/avatar_uploader.rb +0 -24
- data/app/uploaders/spotlight/item_uploader.rb +0 -25
- data/app/uploaders/spotlight/masthead_uploader.rb +0 -22
- data/spec/helpers/spotlight/jcrop_helper_spec.rb +0 -33
- data/spec/models/spotlight/default_thumbnailable_concern_spec.rb +0 -16
- data/spec/models/spotlight/image_derivatives_spec.rb +0 -15
- data/spec/models/spotlight/solr_document/spotlight_images_spec.rb +0 -42
- data/spec/uploaders/spotlight/item_uploader_spec.rb +0 -67
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="col-sm-4 col-xs-12 category">
|
3
3
|
<%= link_to spotlight.exhibit_browse_path(@exhibit, search) do %>
|
4
4
|
<div class="image-overlay">
|
5
|
-
<%= image_tag(search.
|
5
|
+
<%= image_tag(search.thumbnail_image_url || 'spotlight/default_browse_thumbnail', class: 'img-responsive') %>
|
6
6
|
<div class="text-overlay">
|
7
7
|
<h2 class="browse-category-title">
|
8
8
|
<%= search.title%>
|
@@ -6,15 +6,20 @@
|
|
6
6
|
<% end %>
|
7
7
|
<% end %>
|
8
8
|
|
9
|
-
<%= f.
|
9
|
+
<%= f.fields_for :avatar, (@contact.avatar || @contact.build_avatar) do |af| %>
|
10
|
+
<div data-cropper="<%= af.object.model_name.singular_route_key %>" data-form-prefix="<%= form_prefix(af) %>">
|
11
|
+
<%= field_set_tag(t(:'.avatar.header')) do %>
|
12
|
+
<p class="instructions"><%= t(:'featured_images.form.crop_area.help', scope: [:spotlight], thing: 'contact photo') %></p>
|
10
13
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
<div>
|
15
|
+
<%= af.radio_button(:source, :remote, label: t(:'.source.remote.label')) %>
|
16
|
+
<%= iiif_upload_tag(af) %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<%= iiif_cropper_tags af, initial_crop_selection: Spotlight::Engine.config.contact_square_size %>
|
20
|
+
<% end %>
|
16
21
|
</div>
|
17
|
-
|
22
|
+
<% end %>
|
18
23
|
|
19
24
|
<div class="form-group primary-actions">
|
20
25
|
<%= cancel_link @contact, exhibit_about_pages_path(@contact.exhibit), class: "btn btn-link" %>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<% if exhibit.thumbnail.present? %>
|
2
|
-
<%= image_tag(exhibit.thumbnail.
|
1
|
+
<% if exhibit.thumbnail.present? && exhibit.thumbnail.iiif_url %>
|
2
|
+
<%= image_tag(exhibit.thumbnail.iiif_url) %>
|
3
3
|
<% else %>
|
4
4
|
<%= image_tag 'spotlight/default_thumbnail.jpg', class: 'default-thumbnail' %>
|
5
5
|
<% end %>
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
<% form_prefix = f.object_name.parameterize(separator: '_') %>
|
3
|
-
<% else %>
|
4
|
-
<% form_prefix = f.object_name.parameterize('_') %>
|
5
|
-
<% end %>
|
1
|
+
<div data-cropper="<%= f.object.model_name.singular_route_key %>" data-form-prefix="<%= form_prefix(f) %>">
|
6
2
|
<%= field_set_tag do %>
|
7
3
|
<%= f.check_box(:display) %>
|
8
4
|
<% end if f.object.is_a? Spotlight::Masthead %>
|
@@ -11,9 +7,12 @@
|
|
11
7
|
<%= f.radio_button(:source, :exhibit, label: t(:'.source.exhibit.label')) %>
|
12
8
|
<div>
|
13
9
|
<%= f.hidden_field(:document_global_id) %>
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
<div class="alert alert-danger" data-behavior="non-iiif-alert" role="alert" style="display:none;">
|
11
|
+
<span class="glyphicon glyphicon-alert"></span>
|
12
|
+
<%= t(:'.non_iiif_alert_html') %>
|
13
|
+
</div>
|
14
|
+
<%= text_field_tag(:document_title, (presenter(f.object.document).document_show_html_title if f.object.document), class: "form-control", data: { input_select_target: "##{form_prefix(f)}_source_exhibit", 'behavior': 'autocomplete', featured_image_typeahead: true, target_panel: "##{form_prefix(f)}-target-panel", :'id-field' => "##{form_prefix(f)}_document_global_id" }) %>
|
15
|
+
<div id="<%= form_prefix(f) %>-target-panel" style="display:none">
|
17
16
|
<div class="panel-heading">
|
18
17
|
<div data-item-title="true"></div>
|
19
18
|
<div data-panel-image-pagination="true"></div>
|
@@ -24,13 +23,11 @@
|
|
24
23
|
</div>
|
25
24
|
<div>
|
26
25
|
<%= f.radio_button(:source, :remote, label: t(:'.source.remote.label')) %>
|
27
|
-
<%= f
|
26
|
+
<%= iiif_upload_tag(f) %>
|
28
27
|
</div>
|
29
28
|
<% end %>
|
30
29
|
<%= field_set_tag(t(:'.source.remote.header')) do %>
|
31
|
-
<p class="instructions"><%= t(:'.
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
</div>
|
36
|
-
<% end %>
|
30
|
+
<p class="instructions"><%= t(:'.crop_area.help', thing: crop_type) %></p>
|
31
|
+
<%= iiif_cropper_tags f, initial_crop_selection: initial_crop_selection %>
|
32
|
+
<% end %>
|
33
|
+
</div>
|
@@ -1,21 +1,15 @@
|
|
1
|
-
|
2
|
-
<% form_prefix = f.object_name.parameterize(separator: '_') %>
|
3
|
-
<% else %>
|
4
|
-
<% form_prefix = f.object_name.parameterize('_') %>
|
5
|
-
<% end %>
|
1
|
+
<div data-cropper="<%= f.object.model_name.singular_route_key %>" data-form-prefix="<%= form_prefix(f) %>">
|
6
2
|
<%= field_set_tag do %>
|
7
3
|
<%= f.check_box(:display) %>
|
8
4
|
<% end if f.object.is_a? Spotlight::Masthead %>
|
9
5
|
<%= field_set_tag(t(:'.source.header')) do %>
|
10
6
|
<div>
|
11
7
|
<%= f.hidden_field(:source, value: :remote, label: t(:'.source.remote.label')) %>
|
12
|
-
<%= f
|
8
|
+
<%= iiif_upload_tag(f) %>
|
13
9
|
</div>
|
14
10
|
<% end %>
|
15
11
|
<%= field_set_tag(t(:'.source.remote.header')) do %>
|
16
|
-
<p class="instructions"><%= t(:'.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
</div>
|
21
|
-
<% end %>
|
12
|
+
<p class="instructions"><%= t(:'.crop_area.help', thing: crop_type) %></p>
|
13
|
+
<%= iiif_cropper_tags f, initial_crop_selection: initial_crop_selection %>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
@@ -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 text-center"><%= 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, disabled: !config.immutable.show.nil?, label: "" %></td>
|
12
12
|
<% available_view_fields.keys.each do |type| %>
|
13
|
-
<td class="checkbox-cell text-center"><%= 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), disabled: !config.immutable.send(type).nil?, label: "" %></td>
|
14
14
|
<% end %>
|
15
15
|
<% end %>
|
16
|
-
</tr>
|
16
|
+
</tr>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
:'blacklight-configuration-search-views' => available_view_fields.map { |k,v| { key: k, label: view_label(k) }},
|
10
10
|
:'attachment-endpoint' => spotlight.exhibit_attachments_path(@page.exhibit),
|
11
11
|
:'autocomplete-exhibit-catalog-path'=> spotlight.autocomplete_exhibit_catalog_path(@page.exhibit, q: "%QUERY", format: "json"),
|
12
|
-
:'autocomplete-exhibit-
|
12
|
+
:'autocomplete-exhibit-pages-path' => spotlight.exhibit_pages_path(@page.exhibit, format: "json"),
|
13
13
|
:'autocomplete-exhibit-searches-path' => spotlight.exhibit_searches_path(@page.exhibit, format: "json"),
|
14
14
|
:'preview-url' => (spotlight.exhibit_preview_block_url(@page.exhibit, @page) if @page.persisted?)
|
15
15
|
}
|
@@ -51,7 +51,7 @@
|
|
51
51
|
</div>
|
52
52
|
<div class="form-group">
|
53
53
|
<%= f.label :content, class: 'sr-only' %>
|
54
|
-
<%= f.text_area_without_bootstrap :content, value: f.object
|
54
|
+
<%= f.text_area_without_bootstrap :content, value: { data: f.object.content.as_json }.to_json, class: 'js-st-instance' %>
|
55
55
|
</div>
|
56
56
|
</div>
|
57
57
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
<div role="tabpanel" class="tab-pane" id="page-thumbnail">
|
64
64
|
<%= f.fields_for :thumbnail, (@page.thumbnail || @page.build_thumbnail) do |m| %>
|
65
65
|
<p class="instructions"><%= t(:'.thumbnail.help') %></p>
|
66
|
-
<%= render '/spotlight/featured_images/form', f: m,
|
66
|
+
<%= render '/spotlight/featured_images/form', f: m, initial_crop_selection: Spotlight::Engine.config.featured_image_thumb_size, crop_type: :thumbnail %>
|
67
67
|
<% end %>
|
68
68
|
</div>
|
69
69
|
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= bootstrap_form_for([spotlight, current_exhibit, @resource.becomes(Spotlight::Resources::IiifHarvester)], as: :resource, layout: :horizontal, label_col: 'col-md-2', control_col: 'col-sm-6 col-md-6' ) do |f| %>
|
2
|
+
<%= f.text_field :url, help: t('.url-field.help'), label: t('.manifest') %>
|
3
|
+
<div class="form-actions">
|
4
|
+
<div class="primary-actions">
|
5
|
+
<%= cancel_link @resource, :back, class: 'btn btn-default' %>
|
6
|
+
<%= f.submit t('.add_item'), class: 'btn btn-primary' %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -45,13 +45,13 @@
|
|
45
45
|
<%= f.fields_for :masthead, (@search.masthead || @search.build_masthead) do |m| %>
|
46
46
|
<p class="instructions"><%= t(:'.masthead.help') %></p>
|
47
47
|
<p class="instructions"><%= t(:'.masthead.help_secondary') %></p>
|
48
|
-
<%= render '/spotlight/featured_images/form', f: m,
|
48
|
+
<%= render '/spotlight/featured_images/form', f: m, initial_crop_selection: Spotlight::Engine.config.masthead_initial_crop_selection, crop_type: :masthead %>
|
49
49
|
<% end %>
|
50
50
|
</div>
|
51
51
|
<div role="tabpanel" class="tab-pane" id="search-thumbnail">
|
52
52
|
<%= f.fields_for :thumbnail, (@search.thumbnail || @search.build_thumbnail) do |m| %>
|
53
53
|
<p class="instructions"><%= t(:'.thumbnail.help') %></p>
|
54
|
-
<%= render '/spotlight/featured_images/form', f: m,
|
54
|
+
<%= render '/spotlight/featured_images/form', f: m, initial_crop_selection: Spotlight::Engine.config.featured_image_thumb_size, crop_type: :thumbnail %>
|
55
55
|
<% end %>
|
56
56
|
</div>
|
57
57
|
|
@@ -64,4 +64,4 @@
|
|
64
64
|
<%= f.submit nil, class: 'btn btn-primary' %>
|
65
65
|
</div>
|
66
66
|
</div>
|
67
|
-
<% end %>
|
67
|
+
<% end %>
|
@@ -4,8 +4,10 @@
|
|
4
4
|
<div class="dd3-content panel panel-default">
|
5
5
|
<div class="panel-heading search">
|
6
6
|
<%= f.check_box :published, label: '' %>
|
7
|
-
|
8
|
-
<div class="pic thumbnail"
|
7
|
+
|
8
|
+
<div class="pic thumbnail">
|
9
|
+
<%= image_tag(search.thumbnail_image_url || 'spotlight/default_browse_thumbnail', class: 'img-responsive') %>
|
10
|
+
</div>
|
9
11
|
<div class="main">
|
10
12
|
<div class="title panel-title"><%= search.title %></div>
|
11
13
|
<div class="count"><%= t :'.item_count', count: search.documents.size %></div>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<% browse_block.searches.each_with_index do |search, index| %>
|
6
6
|
<div class="box category-<%= (index + 1) %>">
|
7
7
|
<%= link_to spotlight.exhibit_browse_path(search.exhibit, search) do %>
|
8
|
-
<div class="browse-category" style='background-image: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5)), url("<%= search.thumbnail.
|
8
|
+
<div class="browse-category" style='background-image: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5)), url("<%= search.thumbnail.iiif_url if search.thumbnail %>")'>
|
9
9
|
<div class="category-caption">
|
10
10
|
<p class="category-title">
|
11
11
|
<%= search.title %>
|
@@ -20,4 +20,4 @@
|
|
20
20
|
</div>
|
21
21
|
<% end %>
|
22
22
|
</div>
|
23
|
-
<% end %>
|
23
|
+
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% featured_pages_block.pages.each_with_index do |page, index| %>
|
4
4
|
<div class="box category-<%= (index + 1) %>">
|
5
5
|
<%= link_to [page.exhibit, page] do %>
|
6
|
-
<div class="browse-category" style='background-image: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5)) <%= ", url(\"#{page.
|
6
|
+
<div class="browse-category" style='background-image: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5)) <%= ", url(\"#{page.thumbnail_image_url}\")" if page.thumbnail_image_url %>'>
|
7
7
|
<div class="category-caption">
|
8
8
|
<p class="category-title">
|
9
9
|
<%= page.title %>
|
@@ -8,8 +8,10 @@
|
|
8
8
|
<% doc_presenter = index_presenter(document) %>
|
9
9
|
<div class="box" data-id="<%= document.id %>">
|
10
10
|
<div class="contents">
|
11
|
-
<% if
|
12
|
-
<div class="thumbnail"><%= link_to_document(document, image_tag(
|
11
|
+
<% if block_options[:thumbnail_image_url].present? %>
|
12
|
+
<div class="thumbnail"><%= link_to_document(document, image_tag(block_options[:thumbnail_image_url]), counter: -1) %></div>
|
13
|
+
<% elsif block_options[:iiif_tilesource_base].present? %>
|
14
|
+
<div class="thumbnail"><%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!400,400/0/default.jpg'), counter: -1) %></div>
|
13
15
|
<% elsif has_thumbnail? document %>
|
14
16
|
<div class="thumbnail"><%= render_thumbnail_tag(document, {}, document_counter: -1) %></div>
|
15
17
|
<% end %>
|
@@ -23,6 +25,9 @@
|
|
23
25
|
<%= doc_presenter.field_value solr_documents_block.secondary_caption_field %>
|
24
26
|
</div>
|
25
27
|
<% end %>
|
28
|
+
<% if solr_documents_block.zpr_link? && block_options[:iiif_tilesource].present? %>
|
29
|
+
<button class="btn btn-default zpr-link" data-iiif-tilesource="<%= block_options[:iiif_tilesource] %>">Show in ZPR viewer</button>
|
30
|
+
<% end %>
|
26
31
|
</div>
|
27
32
|
</div>
|
28
33
|
<% end %>
|
@@ -8,8 +8,10 @@
|
|
8
8
|
<% solr_documents_carousel_block.each_document.each_with_index do |(block_options, document), index| %>
|
9
9
|
<% doc_presenter = index_presenter(document) %>
|
10
10
|
<div class="item <%= 'active' if index == 0 %>" data-id="<%= document.id %>">
|
11
|
-
<% if
|
12
|
-
<%= link_to_document(document, image_tag(
|
11
|
+
<% if block_options[:full_image_url].present? %>
|
12
|
+
<%= link_to_document(document, image_tag(block_options[:full_image_url]), counter: -1) %>
|
13
|
+
<% elsif block_options[:iiif_tilesource_base].present? %>
|
14
|
+
<%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!800,800/0/default.jpg'), counter: -1) %>
|
13
15
|
<% elsif has_thumbnail? document %>
|
14
16
|
<%= render_thumbnail_tag(document, {}, document_counter: -1) %>
|
15
17
|
<% end %>
|
@@ -10,8 +10,10 @@
|
|
10
10
|
<% solr_documents_features_block.each_document.each_with_index do |(block_options, document), index| %>
|
11
11
|
<% doc_presenter = index_presenter(document) %>
|
12
12
|
<div class="item <%= 'active' if index == 0 %>" data-id="<%= document.id %>">
|
13
|
-
<% if
|
14
|
-
<%= link_to_document(document, image_tag(
|
13
|
+
<% if block_options[:full_image_url].present? %>
|
14
|
+
<%= link_to_document(document, image_tag(block_options[:full_image_url]), counter: -1) %>
|
15
|
+
<% elsif block_options[:iiif_tilesource_base].present? %>
|
16
|
+
<%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!800,800/0/default.jpg'), counter: -1) %>
|
15
17
|
<% elsif has_thumbnail? document %>
|
16
18
|
<%= render_thumbnail_tag(document, {}, document_counter: -1) %>
|
17
19
|
<% end %>
|
@@ -4,8 +4,10 @@
|
|
4
4
|
<% if solr_documents_grid_block.documents? %>
|
5
5
|
<% solr_documents_grid_block.each_document.each_with_index do |(block_options, document), index| %>
|
6
6
|
<div class="box item-<%= index %>" data-id="<%= document.id %>">
|
7
|
-
<% if
|
8
|
-
<div class="thumbnail"><%= link_to_document(document, image_tag(
|
7
|
+
<% if block_options[:thumbnail_image_url].present? %>
|
8
|
+
<div class="thumbnail"><%= link_to_document(document, image_tag(block_options[:thumbnail_image_url]), counter: -1) %></div>
|
9
|
+
<% elsif block_options[:iiif_tilesource_base].present? %>
|
10
|
+
<div class="thumbnail"><%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!400,400/0/default.jpg'), counter: -1) %></div>
|
9
11
|
<% elsif has_thumbnail? document %>
|
10
12
|
<div class="thumbnail"><%= render_thumbnail_tag(document, {}, document_counter: -1) %></div>
|
11
13
|
<% end %>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<div role="tabpanel" class="tab-pane" id="site-masthead">
|
22
22
|
<p class="instructions"><%= t(:'.site_masthead.help') %></p>
|
23
23
|
<%= f.fields_for(:masthead, @site.masthead || @site.build_masthead) do |m| %>
|
24
|
-
<%= render '/spotlight/featured_images/upload_form', f: m,
|
24
|
+
<%= render '/spotlight/featured_images/upload_form', f: m, initial_crop_selection: Spotlight::Engine.config.masthead_initial_crop_selection, crop_type: :masthead %>
|
25
25
|
<% end %>
|
26
26
|
</div>
|
27
27
|
</div>
|
@@ -155,15 +155,19 @@ en:
|
|
155
155
|
Click a menu item to change its display label. Drag and drop a menu item
|
156
156
|
to change their order in the menu.
|
157
157
|
restore_default: "Restore default"
|
158
|
+
site_theme:
|
159
|
+
heading: Visual theme
|
160
|
+
help: ""
|
161
|
+
label: Exhibit theme
|
158
162
|
site_masthead:
|
159
|
-
heading:
|
163
|
+
heading: Exhibit masthead
|
160
164
|
help: >
|
161
165
|
You can select and crop an image to use as a background in your exhibit site's
|
162
166
|
masthead. To use an image as a masthead background, you should use an image that
|
163
167
|
is at least 120 pixels tall and 1200 pixels wide. For best results use an image at
|
164
168
|
least 1800 pixels wide. You can crop larger images using the cropping tool below.
|
165
169
|
site_thumbnail:
|
166
|
-
heading:
|
170
|
+
heading: Exhibit thumbnail
|
167
171
|
help: "You can select and crop an image to visually represent this exhibit."
|
168
172
|
thumbnail:
|
169
173
|
small: Small
|
@@ -480,6 +484,11 @@ en:
|
|
480
484
|
placeholder: Name of library or other physical location
|
481
485
|
telephone:
|
482
486
|
placeholder: Telephone number (optional)
|
487
|
+
source:
|
488
|
+
remote:
|
489
|
+
label: "Upload an image"
|
490
|
+
avatar:
|
491
|
+
header: Avatar
|
483
492
|
about_pages:
|
484
493
|
contacts_form:
|
485
494
|
header: Contacts
|
@@ -502,6 +511,14 @@ en:
|
|
502
511
|
published: "Publish"
|
503
512
|
featured_images:
|
504
513
|
form: &featured_images_form
|
514
|
+
crop_area:
|
515
|
+
help: >
|
516
|
+
Adjust the image so that the rectangle contains the area you want to use as the %{thing}.
|
517
|
+
Click "Save changes" to save the cropped area.
|
518
|
+
non_iiif_alert_html: >
|
519
|
+
The image source must be a IIIF image.
|
520
|
+
Contact your exhibits adminstrator or see the
|
521
|
+
<a href="http://iiif.io">IIIF website</a> for more information about IIIF.
|
505
522
|
source:
|
506
523
|
header: "Image source"
|
507
524
|
exhibit:
|
@@ -510,9 +527,6 @@ en:
|
|
510
527
|
remote:
|
511
528
|
label: "Upload an image"
|
512
529
|
header: "Cropped image"
|
513
|
-
help: >
|
514
|
-
Adjust the cropping box to cover the area of the image you want to use
|
515
|
-
as the thumbnail image. Click "Save changes" to save the cropped area.
|
516
530
|
upload_form: *featured_images_form
|
517
531
|
|
518
532
|
resources:
|
@@ -550,6 +564,13 @@ en:
|
|
550
564
|
title: "Upload raw documents"
|
551
565
|
add_item: "Add item"
|
552
566
|
file_label: "JSON File"
|
567
|
+
iiif:
|
568
|
+
form:
|
569
|
+
title: 'IIIF URL'
|
570
|
+
manifest: "URL"
|
571
|
+
add_item: "Add IIIF items"
|
572
|
+
url-field:
|
573
|
+
help: "Add the URL of a IIIF manifest or collection."
|
553
574
|
bookmarklet:
|
554
575
|
instructions: "Drag this button to the bookmarks toolbar in your web browser"
|
555
576
|
bookmarklet: "%{application_name} widget"
|
@@ -653,10 +674,14 @@ en:
|
|
653
674
|
header_links:
|
654
675
|
login: "Sign in"
|
655
676
|
logout: "Sign out"
|
677
|
+
edit_site: "Site administration"
|
678
|
+
create_exhibit: "Create new exhibit"
|
679
|
+
dashboard: "Exhibit dashboard"
|
656
680
|
contact: "Feedback"
|
657
681
|
saved_search:
|
658
682
|
label: "Save this search"
|
659
|
-
title: "
|
683
|
+
title: "Enter a title to create a new saved search"
|
684
|
+
id: "Select a title to update a previously saved search"
|
660
685
|
shared:
|
661
686
|
report_a_problem:
|
662
687
|
title: Contact Us
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Spotlight::Engine.routes.draw do
|
2
2
|
devise_for :contact_email, class_name: 'Spotlight::ContactEmail', only: [:confirmations]
|
3
3
|
|
4
|
+
resources :contact_images, controller: :featured_images, only: :create
|
5
|
+
resources :exhibit_thumbnails, controller: :featured_images, only: :create
|
6
|
+
resources :mastheads, controller: :featured_images, only: :create
|
7
|
+
resources :featured_images, only: :create
|
8
|
+
|
4
9
|
resource :site, only: [:edit, :update] do
|
5
10
|
collection do
|
6
11
|
get '/tags', to: 'sites#tags'
|
@@ -50,6 +55,7 @@ Spotlight::Engine.routes.draw do
|
|
50
55
|
member do
|
51
56
|
put 'visibility', action: 'make_public'
|
52
57
|
delete 'visibility', action: 'make_private'
|
58
|
+
get 'manifest'
|
53
59
|
end
|
54
60
|
end
|
55
61
|
|
@@ -74,6 +80,8 @@ Spotlight::Engine.routes.draw do
|
|
74
80
|
end
|
75
81
|
end
|
76
82
|
|
83
|
+
resources :iiif_harvesters, controller: 'resources/iiif_harvester', only: :create, as: 'resources_iiif_harvesters'
|
84
|
+
|
77
85
|
resources :searches do
|
78
86
|
collection do
|
79
87
|
patch :update_all
|
@@ -100,6 +108,7 @@ Spotlight::Engine.routes.draw do
|
|
100
108
|
end
|
101
109
|
resource :home_page, path: 'home', controller: 'home_pages'
|
102
110
|
post '/pages/:id/preview' => 'pages#preview', as: :preview_block
|
111
|
+
get '/pages' => 'pages#index', constraints: { format: 'json' }
|
103
112
|
|
104
113
|
resources :lock, only: [:destroy]
|
105
114
|
|