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
16
# 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,
    role: 'region',
    '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



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

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