diff --git a/app/views/catalog/_show_sidebar.html.erb b/app/views/catalog/_show_sidebar.html.erb index f722b1d29f..254725aee0 100644 --- a/app/views/catalog/_show_sidebar.html.erb +++ b/app/views/catalog/_show_sidebar.html.erb @@ -1,2 +1,2 @@ -<%= render 'show_tools' %> +<%= render 'show_tools', document: document %> <%= render(Blacklight::Document::MoreLikeThisComponent.new(document: document)) %> diff --git a/app/views/catalog/_show_tools.html.erb b/app/views/catalog/_show_tools.html.erb index ea4f08fdac..f5337ef83b 100644 --- a/app/views/catalog/_show_tools.html.erb +++ b/app/views/catalog/_show_tools.html.erb @@ -1,14 +1,15 @@ -<% if show_doc_actions? %> +<% document = @document if local_assigns[:document].nil? %> +<% if show_doc_actions? document %>

<%= t('blacklight.tools.title') %>

<% if render_show_doc_actions_method_from_blacklight? %> - <%= render(Blacklight::Document::ActionsComponent.new(document: @document, tag: 'ul', classes: 'list-group list-group-flush', wrapping_tag: 'li', wrapping_classes: 'list-group-item', actions: document_actions(@document), url_opts: Blacklight::Parameters.sanitize(params.to_unsafe_h))) %> + <%= render(Blacklight::Document::ActionsComponent.new(document: document, tag: 'ul', classes: 'list-group list-group-flush', wrapping_tag: 'li', wrapping_classes: 'list-group-item', actions: document_actions(document), url_opts: Blacklight::Parameters.sanitize(params.to_unsafe_h))) %> <% else %> <% Deprecation.warn(self, '#render_show_doc_actions is deprecated; use ActionComponents instead') %>