blacklight 7.4.1 → 7.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/app/presenters/blacklight/document_presenter.rb +1 -1
- data/app/views/catalog/_facet_limit.html.erb +1 -1
- data/app/views/catalog/_field.json.jbuilder +1 -1
- data/app/views/catalog/_per_page_widget.html.erb +1 -1
- data/app/views/catalog/_sort_widget.html.erb +1 -1
- data/app/views/catalog/index.json.jbuilder +2 -1
- data/app/views/catalog/show.json.jbuilder +2 -1
- data/config/locales/blacklight.ar.yml +1 -1
- data/spec/presenters/blacklight/index_presenter_spec.rb +28 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e934144a8f41701622a5173bbafbc5ed5e362035ab2b8e1385a44b62e1e9fb0e
|
4
|
+
data.tar.gz: 7f70a70e1cd8912173c85a4e6f75e5dc0616735a80ddaa1a92b3f8c8718bdca4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60909c87a1875508abe174257d0d80448113d2e62a1dc66b65a382f8acf8f539b91e70439b9bb3f1ecd7d30c9ccc6136f2ea586711866eabd0d453244d4db6c3
|
7
|
+
data.tar.gz: c042494903310dfb577677e7b98aa82a4551c877beb2b1082dd6d356057f50e0539291e943118667b6f33b912f9600bd5841f8132e9dc19e32b7ffac7fa5957c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.4.
|
1
|
+
7.4.2
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<% unless paginator.last_page? || params[:action] == "facet" %>
|
6
6
|
<li class="more_facets">
|
7
|
-
<%= link_to t("more_#{field_name}_html", scope: 'blacklight.search.facets', default: :more_html, field_name: facet_field.
|
7
|
+
<%= link_to t("more_#{field_name}_html", scope: 'blacklight.search.facets', default: :more_html, field_name: facet_field_label(facet_field.key)),
|
8
8
|
search_facet_path(id: facet_field.key),
|
9
9
|
data: { blacklight_modal: 'trigger' } %>
|
10
10
|
</li>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
</button>
|
7
7
|
<div class="dropdown-menu dropdown-menu-right" role="menu">
|
8
8
|
<%- per_page_options_for_select.each do |(label, count)| %>
|
9
|
-
<%= link_to(label, url_for(search_state.params_for_search(per_page: count)), class: 'dropdown-item') %>
|
9
|
+
<%= link_to(label, url_for(search_state.params_for_search(per_page: count)), class: 'dropdown-item', role: 'menuitem') %>
|
10
10
|
<%- end -%>
|
11
11
|
</div>
|
12
12
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<div class="dropdown-menu" role="menu">
|
8
8
|
<%- active_sort_fields.each do |sort_key, field_config| %>
|
9
|
-
<%= link_to(sort_field_label(sort_key), url_for(search_state.params_for_search(sort: sort_key)), class: 'dropdown-item') %>
|
9
|
+
<%= link_to(sort_field_label(sort_key), url_for(search_state.params_for_search(sort: sort_key)), class: 'dropdown-item', role: 'menuitem') %>
|
10
10
|
<%- end -%>
|
11
11
|
</div>
|
12
12
|
</div>
|
@@ -183,4 +183,32 @@ RSpec.describe Blacklight::IndexPresenter, api: true do
|
|
183
183
|
|
184
184
|
it { is_expected.to be_instance_of Blacklight::ThumbnailPresenter }
|
185
185
|
end
|
186
|
+
|
187
|
+
describe '#display_type' do
|
188
|
+
context 'with no configuration' do
|
189
|
+
it 'returns an empty array' do
|
190
|
+
expect(presenter.display_type).to be_empty
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
context 'with a default value' do
|
195
|
+
it 'returns the default' do
|
196
|
+
expect(presenter.display_type(default: 'default')).to eq ['default']
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
context 'with field configuration' do
|
201
|
+
let(:document) do
|
202
|
+
SolrDocument.new(id: 1, xyz: 'abc')
|
203
|
+
end
|
204
|
+
|
205
|
+
before do
|
206
|
+
config.index.display_type_field = :xyz
|
207
|
+
end
|
208
|
+
|
209
|
+
it 'returns the value from the field' do
|
210
|
+
expect(presenter.display_type).to eq ['abc']
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
186
214
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.4.
|
4
|
+
version: 7.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: exe
|
19
19
|
cert_chain: []
|
20
|
-
date: 2019-
|
20
|
+
date: 2019-12-10 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rails
|