blacklight-spotlight 3.0.0.alpha.4 → 3.0.0.alpha.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/spotlight/_exhibits_index.scss +41 -95
- data/app/views/spotlight/browse/_search_box.html.erb +2 -2
- 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 +3 -3
- data/app/views/spotlight/search_configurations/_search_fields.html.erb +12 -8
- data/app/views/spotlight/search_configurations/_sort.html.erb +11 -7
- data/config/locales/spotlight.en.yml +1 -3
- data/config/locales/spotlight.es.yml +26 -25
- data/lib/spotlight/version.rb +1 -1
- data/spec/examples.txt +1386 -1376
- data/spec/features/exhibits_index_spec.rb +1 -3
- 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
- metadata +4 -6
- data/app/views/spotlight/exhibits/_exhibit_card_back.html.erb +0 -25
- data/app/views/spotlight/exhibits/_exhibit_card_front.html.erb +0 -13
@@ -8,9 +8,7 @@ describe 'Exhibits index page', type: :feature do
|
|
8
8
|
it 'shows some cards for each published exhibit' do
|
9
9
|
visit spotlight.exhibits_path
|
10
10
|
|
11
|
-
|
12
|
-
expect(page).to have_selector 'h2', text: 'Some Exhibit Title'
|
13
|
-
end
|
11
|
+
expect(page).to have_selector '.exhibit-card h2', text: 'Some Exhibit Title'
|
14
12
|
end
|
15
13
|
|
16
14
|
context 'with tagged exhibits' do
|
@@ -1,8 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
describe 'spotlight/exhibits/
|
3
|
+
describe 'spotlight/exhibits/_exhibit_card.html.erb', type: :view do
|
4
4
|
let(:exhibit) { FactoryBot.create(:exhibit) }
|
5
|
-
let(:p) { 'spotlight/exhibits/
|
5
|
+
let(:p) { 'spotlight/exhibits/exhibit_card' }
|
6
|
+
|
7
|
+
before do
|
8
|
+
allow(view).to receive_messages(exhibit_path: '/')
|
9
|
+
end
|
6
10
|
|
7
11
|
context 'for an exhibit without a thumbnail' do
|
8
12
|
before do
|
@@ -25,7 +29,7 @@ describe 'spotlight/exhibits/_exhibit_card_front.html.erb', type: :view do
|
|
25
29
|
it 'has a title' do
|
26
30
|
render p, exhibit: exhibit
|
27
31
|
|
28
|
-
expect(rendered).to have_selector '.card-
|
32
|
+
expect(rendered).to have_selector '.card-title', text: exhibit.title
|
29
33
|
end
|
30
34
|
|
31
35
|
context 'for an unpublished exhibit' do
|
@@ -75,7 +75,7 @@ describe 'spotlight/exhibits/index', type: :view do
|
|
75
75
|
it 'renders pagination controls' do
|
76
76
|
render
|
77
77
|
|
78
|
-
expect(rendered).to have_selector '.
|
78
|
+
expect(rendered).to have_selector '.pagination'
|
79
79
|
expect(rendered).to have_link 'Next', href: '/?page=2'
|
80
80
|
end
|
81
81
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight-spotlight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.alpha.
|
4
|
+
version: 3.0.0.alpha.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2020-02-
|
14
|
+
date: 2020-02-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: acts-as-taggable-on
|
@@ -1107,8 +1107,6 @@ files:
|
|
1107
1107
|
- app/views/spotlight/exhibits/_contact.html.erb
|
1108
1108
|
- app/views/spotlight/exhibits/_delete.html.erb
|
1109
1109
|
- app/views/spotlight/exhibits/_exhibit_card.html.erb
|
1110
|
-
- app/views/spotlight/exhibits/_exhibit_card_back.html.erb
|
1111
|
-
- app/views/spotlight/exhibits/_exhibit_card_front.html.erb
|
1112
1110
|
- app/views/spotlight/exhibits/_exhibits.html.erb
|
1113
1111
|
- app/views/spotlight/exhibits/_export.html.erb
|
1114
1112
|
- app/views/spotlight/exhibits/_form.html.erb
|
@@ -1545,7 +1543,7 @@ files:
|
|
1545
1543
|
- spec/views/spotlight/dashboards/_analytics.html.erb_spec.rb
|
1546
1544
|
- spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb
|
1547
1545
|
- spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
|
1548
|
-
- spec/views/spotlight/exhibits/
|
1546
|
+
- spec/views/spotlight/exhibits/_exhibit_card.html.erb_spec.rb
|
1549
1547
|
- spec/views/spotlight/exhibits/_form.html.erb_spec.rb
|
1550
1548
|
- spec/views/spotlight/exhibits/edit.html.erb_spec.rb
|
1551
1549
|
- spec/views/spotlight/exhibits/index.html.erb_spec.rb
|
@@ -1863,7 +1861,7 @@ test_files:
|
|
1863
1861
|
- spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb
|
1864
1862
|
- spec/views/spotlight/exhibits/_form.html.erb_spec.rb
|
1865
1863
|
- spec/views/spotlight/exhibits/edit.html.erb_spec.rb
|
1866
|
-
- spec/views/spotlight/exhibits/
|
1864
|
+
- spec/views/spotlight/exhibits/_exhibit_card.html.erb_spec.rb
|
1867
1865
|
- spec/views/spotlight/exhibits/index.html.erb_spec.rb
|
1868
1866
|
- spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb
|
1869
1867
|
- spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<div class="card-body">
|
2
|
-
<h2 class="card-title h5 text-center">
|
3
|
-
<%= exhibit.title %>
|
4
|
-
</h2>
|
5
|
-
|
6
|
-
<p class="subtitle">
|
7
|
-
<%= exhibit.subtitle %>
|
8
|
-
</p>
|
9
|
-
|
10
|
-
<% if exhibit.description %>
|
11
|
-
<p class="description">
|
12
|
-
<%= truncated_description = exhibit.description.truncate(168, omission: '', separator: ' ') %>
|
13
|
-
<% if exhibit.description.length > 168 %>
|
14
|
-
<%= content_tag(:span,"…".html_safe, class: "d-none d-sm-inline d-xl-none") %>
|
15
|
-
<span class="d-inline d-sm-none d-xl-inline">
|
16
|
-
<%= exhibit.description.slice(truncated_description.length, exhibit.description.length) %>
|
17
|
-
</span>
|
18
|
-
<% end %>
|
19
|
-
</p>
|
20
|
-
<% end %>
|
21
|
-
|
22
|
-
<div class="visit-exhibit center-btn">
|
23
|
-
<%= link_to t(:'.visit_exhibit'), exhibit, class: "btn btn-primary", role: "button" %>
|
24
|
-
</div>
|
25
|
-
</div>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<% if exhibit.thumbnail.present? && exhibit.thumbnail.iiif_url %>
|
2
|
-
<%= image_tag(exhibit.thumbnail.iiif_url, class: 'card-img-top') %>
|
3
|
-
<% else %>
|
4
|
-
<%= image_tag 'spotlight/default_thumbnail.jpg', class: 'card-img-top default-thumbnail' %>
|
5
|
-
<% end %>
|
6
|
-
|
7
|
-
<% unless exhibit.published? %>
|
8
|
-
<div class="badge badge-warning unpublished"><%= t('.unpublished') %></div>
|
9
|
-
<% end %>
|
10
|
-
|
11
|
-
<div class="card-body">
|
12
|
-
<h2 class="card-title h5 text-center"><%= exhibit.title %></h2>
|
13
|
-
</div>
|