Sha256: 55b3f017961fa7f8e682a91a70f835f350fed080c310ce5a4b98ed355b2f51ca
Contents?: true
Size: 637 Bytes
Versions: 3
Compression:
Stored size: 637 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 return safe_join([exhibit_edit_link, super, add_document_meta_content(@document)]) if current_exhibit super 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
3 entries across 3 versions & 1 rubygems