diff options
Diffstat (limited to 'templates/web/base')
-rw-r--r-- | templates/web/base/maps/noscript_map.html | 23 | ||||
-rw-r--r-- | templates/web/base/maps/pin.html | 16 |
2 files changed, 17 insertions, 22 deletions
diff --git a/templates/web/base/maps/noscript_map.html b/templates/web/base/maps/noscript_map.html index 6ef2f813a..c477ec5ac 100644 --- a/templates/web/base/maps/noscript_map.html +++ b/templates/web/base/maps/noscript_map.html @@ -23,7 +23,7 @@ src="[% map.tiles.3 %]" style="top:256px; left:256px;"> </div> - <div id="[% nsm_prefix %]pins">[% FOR pin IN map.pins %][% INCLUDE pin %][% END %]</div> + <div id="[% nsm_prefix %]pins">[% FOR pin IN map.pins %][% INCLUDE 'maps/pin.html' %][% END %]</div> [% INCLUDE compass %] </div> @@ -49,24 +49,3 @@ <div style="position: absolute; left: 13px; top: 99px; width: 18px; height: 18px;"><a rel="nofollow" href="[% zoom_out %]"><img style="position: relative; width: 18px; height: 18px;" src="[% start %]/js/OpenLayers/img/zoom-minus-mini.png" border="0"></a></div> </div> [% END %] - - -[% BLOCK pin %] - -[% IF pin.id %] -<a title="[% pin.title | html %]" href="[% c.cobrand.base_url_for_report( pin.problem ) %][% pin.problem.url %]"> -[%- END -%] -<img border="0" src="[% start %][% c.cobrand.path_to_pin_icons _ 'pin-' _ pin.colour _ '.png' %]" -[% IF js -%] - class="pin js-pin" data-lat="[% pin.latitude %]" data-lon="[% pin.longitude %]" - data-colour="[% pin.colour %]" data-id="[% pin.id %]" - data-title="[% pin.title | html %]" data-type="[% pin.type %]" -[% ELSE -%] - class="pin" -[% END -%] - alt="[% loc('Problem') %]" style="top:[% pin.py - 64 %]px; left:[% pin.px - 24 %]px; position: absolute;"> -[%- IF pin.id -%] -</a> -[% END %] - -[% END %] diff --git a/templates/web/base/maps/pin.html b/templates/web/base/maps/pin.html new file mode 100644 index 000000000..7dfce0bb3 --- /dev/null +++ b/templates/web/base/maps/pin.html @@ -0,0 +1,16 @@ +[% DEFAULT pin_style = 'top:' _ (pin.py - 64) _ 'px; left:' _ (pin.px - 24) _ 'px; position: absolute;' -%] +[% IF pin.id %] +<a title="[% pin.title | html %]" href="[% c.cobrand.base_url_for_report( pin.problem ) %][% pin.problem.url %]"> +[%- END -%] +<img border="0" src="[% start %][% c.cobrand.path_to_pin_icons _ 'pin-' _ pin.colour _ '.png' %]" +[% IF js -%] + class="pin js-pin" data-lat="[% pin.latitude %]" data-lon="[% pin.longitude %]" + data-colour="[% pin.colour %]" data-id="[% pin.id %]" + data-title="[% pin.title | html %]" data-type="[% pin.type %]" +[% ELSE -%] + class="pin" +[% END -%] + alt="[% loc('Problem') %]" style="[% pin_style %]"> +[%- IF pin.id -%] +</a> +[% END %] |