blacklight 7.17.0 → 7.17.1
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/VERSION +1 -1
- data/app/components/blacklight/response/view_type_button_component.rb +3 -1
- data/app/helpers/blacklight/catalog_helper_behavior.rb +2 -0
- data/lib/blacklight/configuration/view_config.rb +2 -0
- data/spec/views/catalog/_view_type_group.html.erb_spec.rb +8 -9
- 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: f227a710168987edeacfacb142e75e3f4da8d8b97459e12d78d7d417dbd120e0
|
4
|
+
data.tar.gz: 0ac65066624e2f63adce77f2c12e5d27ed2c73e5d829e61698453ceac1f138ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05d7e1930528ab837b325789d10f10bf9c5a32eacda6fccacf06a342d240a2d74390af8ee6e4e6a1dd891df059c44e4071ed3298d412e7cb09de05884b4e9dc8
|
7
|
+
data.tar.gz: 16457df300d3fb08648c21505161a6da11974008bb4923030cdc88181ca3ee5570a9476ff0cd55dee74b0639f9cd70c2a7b20b7d9aa33f7f7d5fdd57c5f732d4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.17.
|
1
|
+
7.17.1
|
@@ -253,11 +253,13 @@ module Blacklight::CatalogHelperBehavior
|
|
253
253
|
##
|
254
254
|
# Render the view type icon for the results view picker
|
255
255
|
#
|
256
|
+
# @deprecated
|
256
257
|
# @param [String] view
|
257
258
|
# @return [String]
|
258
259
|
def render_view_type_group_icon view
|
259
260
|
blacklight_icon(view)
|
260
261
|
end
|
262
|
+
deprecation_deprecate render_view_type_group_icon: 'call blacklight_icon instead'
|
261
263
|
|
262
264
|
##
|
263
265
|
# Get the default view type classes for a view in the results view picker
|
@@ -11,6 +11,8 @@ class Blacklight::Configuration
|
|
11
11
|
# @return [String, Symbol] solr field to use to render a document title
|
12
12
|
# @!attribute display_type_field
|
13
13
|
# @return [String, Symbol] solr field to use to render format-specific partials
|
14
|
+
# @!attribute icon
|
15
|
+
# @return [String, Symbol] icon file to use in the view picker
|
14
16
|
# @!attribute document_actions
|
15
17
|
# @return [NestedOpenStructWithHashAccess{Symbol => Blacklight::Configuration::ToolConfig}] 'tools' to render for each document
|
16
18
|
def search_bar_presenter_class
|
@@ -3,13 +3,9 @@
|
|
3
3
|
RSpec.describe "catalog/_view_type_group" do
|
4
4
|
let(:blacklight_config) { Blacklight::Configuration.new }
|
5
5
|
let(:response) { instance_double(Blacklight::Solr::Response, empty?: false) }
|
6
|
-
let(:icon_instance) { instance_double(Blacklight::Icon) }
|
7
6
|
|
8
7
|
before do
|
9
8
|
allow(view).to receive(:view_label), &:to_s
|
10
|
-
allow(Blacklight::Icon).to receive(:new).and_return icon_instance
|
11
|
-
allow(icon_instance).to receive(:svg).and_return '<svg></svg>'
|
12
|
-
allow(icon_instance).to receive(:options).and_return({})
|
13
9
|
allow(view).to receive_messages(how_sort_and_per_page?: true, blacklight_config: blacklight_config)
|
14
10
|
controller.request.path_parameters[:action] = 'index'
|
15
11
|
assign(:response, response)
|
@@ -24,13 +20,16 @@ RSpec.describe "catalog/_view_type_group" do
|
|
24
20
|
it "displays the group" do
|
25
21
|
blacklight_config.configure do |config|
|
26
22
|
config.view.delete(:list)
|
27
|
-
config.view.a
|
28
|
-
config.view.b
|
29
|
-
config.view.c
|
23
|
+
config.view.a.icon = :list
|
24
|
+
config.view.b.icon = :list
|
25
|
+
config.view.c.icon = :list
|
30
26
|
end
|
31
27
|
render partial: 'catalog/view_type_group'
|
32
28
|
expect(rendered).to have_selector('.btn-group.view-type-group')
|
33
29
|
expect(rendered).to have_selector('.view-type-a', text: 'a')
|
30
|
+
within '.view-type-a' do
|
31
|
+
expect(rendered).to have_selector 'svg'
|
32
|
+
end
|
34
33
|
expect(rendered).to have_selector('.view-type-b', text: 'b')
|
35
34
|
expect(rendered).to have_selector('.view-type-c', text: 'c')
|
36
35
|
end
|
@@ -38,8 +37,8 @@ RSpec.describe "catalog/_view_type_group" do
|
|
38
37
|
it "sets the current view to 'active'" do
|
39
38
|
blacklight_config.configure do |config|
|
40
39
|
config.view.delete(:list)
|
41
|
-
config.view.a
|
42
|
-
config.view.b
|
40
|
+
config.view.a.icon = :list
|
41
|
+
config.view.b.icon = :list
|
43
42
|
end
|
44
43
|
render partial: 'catalog/view_type_group'
|
45
44
|
expect(rendered).to have_selector('.active', text: 'a')
|
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.17.
|
4
|
+
version: 7.17.1
|
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: 2021-04-
|
20
|
+
date: 2021-04-22 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rails
|