Sha256: 898214624e12d662a59fa7f0d593986b0928f36e89f808c514fa921f8f8cc561
Contents?: true
Size: 598 Bytes
Versions: 2
Compression:
Stored size: 598 Bytes
Contents
# frozen_string_literal: true module Spotlight # Displays the document # This overrides the title method to provide an edit link. class DocumentComponent < Blacklight::DocumentComponent def title safe_join([exhibit_edit_link, super, add_document_meta_content(@document)]) end attr_reader :document delegate :current_exhibit, :can?, :add_document_meta_content, to: :helpers def exhibit_edit_link helpers.exhibit_edit_link document, [:edit, current_exhibit, document], class: 'float-right btn btn-primary' if can?(:curate, current_exhibit) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
blacklight-spotlight-3.6.0.beta7 | app/components/spotlight/document_component.rb |
blacklight-spotlight-3.6.0.beta6 | app/components/spotlight/document_component.rb |