projectblacklight/blacklight

View on GitHub
app/components/blacklight/document/show_tools_component.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module Blacklight
  module Document
    # Render the tools that display on the sidebar of the show page
    class ShowToolsComponent < Blacklight::Component
      # @param [Blacklight::Document] document
      def initialize(document:)
        @document = document
      end

      attr_reader :document

      def render?
        helpers.show_doc_actions?
      end

      def actions
        helpers.document_actions(document)
      end
    end
  end
end