Module: Geoblacklight::SolrDocument::Citation

Includes:
ActionView::Helpers::OutputSafetyHelper
Included in:
Geoblacklight::SolrDocument
Defined in:
app/models/concerns/geoblacklight/solr_document/citation.rb

Instance Method Summary collapse

Instance Method Details

#geoblacklight_citation(solr_document_url) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'app/models/concerns/geoblacklight/solr_document/citation.rb', line 8

def geoblacklight_citation(solr_document_url)
  [
    fetch(Settings.FIELDS.CREATOR, nil),
    ("(#{issued})" if issued),
    fetch(Settings.FIELDS.TITLE, nil),
    ("[#{format}]" if format),
    fetch(Settings.FIELDS.PUBLISHER, nil),
    I18n.t("geoblacklight.citation.retrieved_from", document_url: solr_document_url)
  ].flatten.compact.join(". ")
end