Module: Blacklight::MapsHelper

Defined in:
app/helpers/blacklight/maps_helper.rb

Instance Method Summary collapse

Instance Method Details

#index_map_divObject

Creates a div with needed attributes, used to display the index map

Returns:

  • String



6
7
8
9
10
11
12
13
14
15
# File 'app/helpers/blacklight/maps_helper.rb', line 6

def index_map_div
  (
    :div,
    nil,
    class: 'blacklight-heatmaps-index-map',
    id: 'index-map',
    data: index_map_data_attributes,
    'aria-label': t('blacklight.heatmaps.aria-label')
  )
end

The Leaflet template used for constructing the sidebar documents. Variables from returned docs should be keys within curly braces e.g. title_display

Returns:

  • String



22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'app/helpers/blacklight/maps_helper.rb', line 22

def sidebar_template
  <<-HTMLTEMPLATE
  <div class='media'>
    <div class='media-body'>
      <h3 class='media-heading'>
        <a href=\"{url}\"}>
          {title}
        </a>
      </h3>
    </div>
  </div>
  HTMLTEMPLATE
end