blacklight-spotlight 4.3.2 → 4.3.3

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: 11ade465eac620712005a56441a5f483c2d54a2d711f7dea374fdae188b854d1
4
- data.tar.gz: d8d959ecd99ca9219c3d30b1528a4f0c89d7b818f50d7b003feb9b40297d51db
3
+ metadata.gz: 24622eba43d3d941ed0001592db1e8ee4c356219358a4852123310f1cd966d66
4
+ data.tar.gz: da21ea3e600f6707393320f9c91795f32510b6e6316b8bceda1887d8559c1b59
5
5
  SHA512:
6
- metadata.gz: a51cc04b236fd4bf45b4665adceaa6e856c32abfffd7f9c79aec72d8e1ceafba93ea514737e308590454aed840d944bcb8d1cc8f17f2c21105dadac1c7ab39fe
7
- data.tar.gz: f677eaa3691a087e2109511e84dec1de7c168ef05c29590edd977fbdac00f18063fc0856be46cdba1b7dba2cab202ea6549fd350455aaf85e7a694bf78302153
6
+ metadata.gz: 3228b437149ad9b7753f944e37af8930715f48ad80d2dc5b32612a4ea98989b5c84bea4672718db3e577869b0ac787422a37d57d4199527b018bb4ceab40d1e6
7
+ data.tar.gz: f160bc5d914bd60ebb6b56fd1a3ace8b3713651f5b344c7f4786f5b037f31877c99c88d57fda609ca337287be6bdea9e0a3a9b1d15f1d5ad85b31ad88bd6a022
@@ -4,6 +4,11 @@ module Spotlight
4
4
  ##
5
5
  # Helpers that are injected into the main application (because they used in layouts)
6
6
  module MainAppHelpers
7
+ if Blacklight.version < '8'
8
+ include Blacklight::BlacklightHelperBehavior
9
+ else
10
+ include Blacklight::DocumentHelperBehavior
11
+ end
7
12
  include Spotlight::NavbarHelper
8
13
  include Spotlight::MastheadHelper
9
14
 
@@ -24,6 +29,11 @@ module Spotlight
24
29
  super
25
30
  end
26
31
 
32
+ # Expecting to upstream this override in https://github.com/projectblacklight/blacklight/pull/3343/files
33
+ def document_presenter(document, view_config: nil, **kwargs)
34
+ (view_config&.document_presenter_class || document_presenter_class(document)).new(document, self, view_config: view_config, **kwargs)
35
+ end
36
+
27
37
  def document_presenter_class(_document)
28
38
  if action_name == 'index'
29
39
  super
@@ -1,6 +1,6 @@
1
1
  <div class="box" data-id="<%= document.id %>">
2
2
  <% view_config = blacklight_config.view_config(:embed) %>
3
- <%= render (view_config.document_component || Spotlight::SolrDocumentLegacyEmbedComponent).new((Blacklight.version > '8.0' ? :document : :presenter) => document_presenter(document), counter: nil, block: local_assigns[:block]) do |component| %>
3
+ <%= render (view_config.document_component || Spotlight::SolrDocumentLegacyEmbedComponent).new((Blacklight.version > '8.0' ? :document : :presenter) => document_presenter(document, view_config: view_config), counter: nil, block: local_assigns[:block]) do |component| %>
4
4
  <% component.with_partial do %>
5
5
  <%= render_document_partials document, view_config.partials, component: component, document_counter: nil, view_config: view_config, block: local_assigns[:block], **(view_config.locals) %>
6
6
  <% end if view_config&.partials&.any? %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotlight
4
- VERSION = '4.3.2'
4
+ VERSION = '4.3.3'
5
5
  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: 4.3.2
4
+ version: 4.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -67,7 +67,7 @@ dependencies:
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: '7.19'
70
+ version: '7.40'
71
71
  - - "<"
72
72
  - !ruby/object:Gem::Version
73
73
  version: '9'
@@ -77,7 +77,7 @@ dependencies:
77
77
  requirements:
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: '7.19'
80
+ version: '7.40'
81
81
  - - "<"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '9'