blacklight-gallery 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14925720da8a37bde4f1e05a13ff9063898600c81887dd30ef6294a46762b8bf
4
- data.tar.gz: 5e9ccf945bf9e2c495d5babfa85144d60a5ec5f58a068e7e987631e43f5176e6
3
+ metadata.gz: 88f1e7482c4ccd593780df7fe914534583e803b8cb7586a98db381f425ca3326
4
+ data.tar.gz: f91d53c9e4d750ab085d7ba97c1a67f7d26e2dde31541b273e7195098453fedb
5
5
  SHA512:
6
- metadata.gz: af850e569c98cc5b4797262b01be871d3b9136173be1281618e09d6f3ffb3b35bd537002df36911718e3671f79d4bd434f4a33e190e757544c701b92ee9460bd
7
- data.tar.gz: 571fe4f304a47dfda6f58b720d7878ee192f94b0d0cf1ab1ae24d2b9d4da0b15b241165ae175e22530e5ef628b535ba839693e17bd6fabef36d334eb7203ba8f
6
+ metadata.gz: 5ed81094a38b233941ad06c6b62e5555a407809151d87b902c9d5422fbe3953f9a58691510253c407f3f7e756b9d703ab4da4515558ecb9caf3cdbe6fdd986ce
7
+ data.tar.gz: 05cca47ed3750c5c3b8663b910a106d1d1b2437d36e46972c7a52a215659966c0b1798f16dabb35601674f9234b3cb87777afafd426e71566a03ade868d485dd
@@ -17,7 +17,6 @@
17
17
  -ms-flex: 1;
18
18
  flex: 1;
19
19
 
20
- min-width: 250px;
21
20
  min-height: 250px;
22
21
  -webkit-flex: 1 0 250px;
23
22
  }
@@ -45,7 +44,6 @@
45
44
  clear: none;
46
45
  text-align: left;
47
46
  margin: 0;
48
- padding: 0;
49
47
  }
50
48
 
51
49
  }
@@ -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(document, { class: 'img-thumbnail' }, :counter => document_counter_with_offset(document_counter)) %>
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>
@@ -1,5 +1,5 @@
1
1
  module Blacklight
2
2
  module Gallery
3
- VERSION = "1.6.0"
3
+ VERSION = "1.7.0"
4
4
  end
5
5
  end
@@ -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.6.0
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-04 00:00:00.000000000 Z
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.0.3
333
+ rubygems_version: 3.1.1
334
334
  signing_key:
335
335
  specification_version: 4
336
336
  summary: Gallery display for Blacklight