Module: Blacklight::MapsHelper
- Defined in:
- app/helpers/blacklight/maps_helper.rb
Instance Method Summary collapse
-
#index_map_div ⇒ Object
Creates a div with needed attributes, used to display the index map.
-
#sidebar_template ⇒ Object
The Leaflet template used for constructing the sidebar documents.
Instance Method Details
#index_map_div ⇒ Object
Creates a div with needed attributes, used to display the index map
6 7 8 9 10 11 12 13 14 15 |
# File 'app/helpers/blacklight/maps_helper.rb', line 6 def index_map_div content_tag( :div, nil, class: 'blacklight-heatmaps-index-map', id: 'index-map', data: index_map_data_attributes, 'aria-label': t('blacklight.heatmaps.aria-label') ) end |
#sidebar_template ⇒ Object
The Leaflet template used for constructing the sidebar documents. Variables from returned docs should be keys within curly braces e.g. title_display
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/helpers/blacklight/maps_helper.rb', line 22 def <<-HTMLTEMPLATE <div class='media'> <div class='media-body'> <h3 class='media-heading'> <a href=\"{url}\"}> {title} </a> </h3> </div> </div> HTMLTEMPLATE end |