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 16 |
# 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, role: 'region', '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
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/helpers/blacklight/maps_helper.rb', line 23 def " <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" |