Module: Arclight::FieldConfigHelpers

Includes:
EadFormatHelpers
Included in:
ArclightHelper
Defined in:
app/helpers/arclight/field_config_helpers.rb

Overview

A module to add configuration helpers for certain fields used by Arclight

Instance Method Summary collapse

Methods included from EadFormatHelpers

#render_html_tags

Instance Method Details

#item_requestable?(document) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/helpers/arclight/field_config_helpers.rb', line 9

def item_requestable?(document)
  document.requestable?
end


14
15
16
17
18
19
20
21
22
23
24
# File 'app/helpers/arclight/field_config_helpers.rb', line 14

def link_to_name_facet(args)
  options = args[:config]&.separator_options || {}
  values = args[:value] || []

  values.map do |value|
    link_to(
      value,
      search_action_path(f: { names: [value] })
    )
  end.to_sentence(options).html_safe
end