blacklight-gallery 1.6.0 → 1.7.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.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/blacklight_gallery/_gallery.scss +0 -2
- data/app/assets/stylesheets/blacklight_gallery/_masonry.scss +3 -3
- data/app/views/catalog/_index_gallery.html.erb +7 -1
- data/app/views/catalog/_index_masonry.html.erb +1 -1
- data/lib/blacklight/gallery/version.rb +1 -1
- data/spec/views/catalog/_index_gallery.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_index_masonry.html.erb_spec.rb +3 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88f1e7482c4ccd593780df7fe914534583e803b8cb7586a98db381f425ca3326
|
4
|
+
data.tar.gz: f91d53c9e4d750ab085d7ba97c1a67f7d26e2dde31541b273e7195098453fedb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ed81094a38b233941ad06c6b62e5555a407809151d87b902c9d5422fbe3953f9a58691510253c407f3f7e756b9d703ab4da4515558ecb9caf3cdbe6fdd986ce
|
7
|
+
data.tar.gz: 05cca47ed3750c5c3b8663b910a106d1d1b2437d36e46972c7a52a215659966c0b1798f16dabb35601674f9234b3cb87777afafd426e71566a03ade868d485dd
|
@@ -6,11 +6,11 @@
|
|
6
6
|
background-color: $gray-300;
|
7
7
|
min-height: 70px;
|
8
8
|
|
9
|
-
.thumbnail {
|
10
|
-
border: 0;
|
9
|
+
.img-thumbnail {
|
10
|
+
border-radius: 0;
|
11
11
|
padding: 0;
|
12
|
-
margin-bottom: 0;
|
13
12
|
}
|
13
|
+
|
14
14
|
.caption {
|
15
15
|
&:first-child { display: block; } // To display captions when there is no image
|
16
16
|
a {
|
@@ -1,6 +1,12 @@
|
|
1
1
|
<div class="document col-6 col-md-4">
|
2
2
|
<div class="thumbnail">
|
3
|
-
<%= render_thumbnail_tag(
|
3
|
+
<%= render_thumbnail_tag(
|
4
|
+
document,
|
5
|
+
{ class: 'img-thumbnail', alt: '' },
|
6
|
+
counter: document_counter_with_offset(document_counter),
|
7
|
+
'aria-hidden': true,
|
8
|
+
tabindex: -1
|
9
|
+
) %>
|
4
10
|
<div class="caption">
|
5
11
|
<%= render_document_partials document, blacklight_config.view_config(:gallery).partials, :document_counter => document_counter %>
|
6
12
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="masonry document col-6 col-md-3">
|
2
2
|
<div class="thumbnail">
|
3
|
-
<%= render_thumbnail_tag(document, { class: 'img-thumbnail' }, counter: document_counter_with_offset(document_counter)) %>
|
3
|
+
<%= render_thumbnail_tag(document, { class: 'img-thumbnail', alt: index_presenter(document).heading }, counter: document_counter_with_offset(document_counter)) %>
|
4
4
|
<div class="caption">
|
5
5
|
<%= render_document_partials document, blacklight_config.view_config(:masonry).partials, :document_counter => document_counter %>
|
6
6
|
</div>
|
@@ -13,7 +13,7 @@ describe "catalog/_index_gallery.html.erb", :type => :view do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should have thumbnail and caption" do
|
16
|
-
expect(view).to receive(:render_thumbnail_tag).with(document, { class: 'img-thumbnail' }, hash_including(:counter)).and_return('Thumbnail')
|
16
|
+
expect(view).to receive(:render_thumbnail_tag).with(document, { class: 'img-thumbnail', alt: '' }, hash_including(:counter)).and_return('Thumbnail')
|
17
17
|
expect(view).to receive(:render_document_partials).with(document, ['a', 'b'], document_counter: 3).and_return('Z')
|
18
18
|
render
|
19
19
|
expect(rendered).to have_selector '.thumbnail', text: 'Thumbnail'
|
@@ -3,8 +3,10 @@ require 'spec_helper'
|
|
3
3
|
describe "catalog/_document_masonry.html.erb", :type => :view do
|
4
4
|
let(:blacklight_config) { Blacklight::Configuration.new }
|
5
5
|
let(:documents) { [stub_model(::SolrDocument), stub_model(::SolrDocument)] }
|
6
|
+
let(:presenter) { instance_double(Blacklight::IndexPresenter, heading: 'xyz')}
|
6
7
|
before do
|
7
8
|
allow(view).to receive_messages(blacklight_config: blacklight_config)
|
9
|
+
allow(view).to receive_messages(index_presenter: presenter)
|
8
10
|
allow(view).to receive_messages(documents: documents)
|
9
11
|
allow(view).to receive_messages(document_counter: 1)
|
10
12
|
allow(view).to receive_messages(document_counter_with_offset: 1)
|
@@ -23,6 +25,7 @@ describe "catalog/_document_masonry.html.erb", :type => :view do
|
|
23
25
|
|
24
26
|
it 'should render the thumbnail' do
|
25
27
|
expect(rendered).to have_css('.thumbnail', text: 'Thumbnail')
|
28
|
+
expect(view).to have_received(:render_thumbnail_tag).with(documents.first, { class: 'img-thumbnail', alt: 'xyz' }, counter: 1)
|
26
29
|
end
|
27
30
|
|
28
31
|
it 'should render the caption' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight-gallery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -330,7 +330,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
330
330
|
- !ruby/object:Gem::Version
|
331
331
|
version: '0'
|
332
332
|
requirements: []
|
333
|
-
rubygems_version: 3.
|
333
|
+
rubygems_version: 3.1.1
|
334
334
|
signing_key:
|
335
335
|
specification_version: 4
|
336
336
|
summary: Gallery display for Blacklight
|