Sha256: cff3bfb05cf945b9e7cb343f0bd1f1dc8dc54b486110631f2faa289cf542c1e3
Contents?: true
Size: 1011 Bytes
Versions: 12
Compression:
Stored size: 1011 Bytes
Contents
module GeoConcerns class CoverageRenderer < CurationConcerns::Renderers::AttributeRenderer include BoundingBoxHelper def render coverage = values.first if values return '' unless coverage markup(coverage).html_safe end private def markup(coverage) markup = '' markup << %(<tr><th>#{label}</th>\n<td id='accordion'><ul class='tabular'>) markup << %(<div id='bbox' class='collapse in'></div>) markup << bbox_display_inputs markup << bbox_script_tag(coverage) markup << toggle_button markup << %(</ul></td></tr>) markup end def toggle_button %( <a data-toggle='collapse' data-parent='accordion' href='#bbox' class='btn btn-default'> Toggle Map</a> ) end def bbox_script_tag(coverage) %( <script> boundingBoxSelector({coverage: '#{coverage}', readonly: true}); </script> ) end end end
Version data entries
12 entries across 12 versions & 1 rubygems