diff options
-rw-r--r-- | chimere/templates/chimere/blocks/map.html (renamed from chimere/templates/chimere/blocks/map_params.html) | 4 | ||||
-rw-r--r-- | chimere/templates/chimere/main_map.html | 6 | ||||
-rw-r--r-- | chimere/templatetags/chimere_tags.py | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/chimere/templates/chimere/blocks/map_params.html b/chimere/templates/chimere/blocks/map.html index 57ced90..7855bbf 100644 --- a/chimere/templates/chimere/blocks/map_params.html +++ b/chimere/templates/chimere/blocks/map.html @@ -1,4 +1,8 @@ {% load i18n %} +<div id='{{map_id}}'></div> +<script type="text/javascript"> + $("#{{map_id}}").show(); +</script> <script type="text/javascript"> {% if single_category %} $(function() {$('#panel').hide()});{% endif %} diff --git a/chimere/templates/chimere/main_map.html b/chimere/templates/chimere/main_map.html index 5a49e46..b87c31e 100644 --- a/chimere/templates/chimere/main_map.html +++ b/chimere/templates/chimere/main_map.html @@ -30,11 +30,7 @@ {% endblock %} {% block content %} {{block.super}} - <div id='main-map'></div> -<script type="text/javascript"> - $("#main-map").show(); -</script> - {% map_params %} + {% map 'main-map' %} {% endblock %} {% block footer %} <p class='map-footer'>{% include "chimere/blocks/footer.html" %}</p> diff --git a/chimere/templatetags/chimere_tags.py b/chimere/templatetags/chimere_tags.py index 46fb422..538f0fa 100644 --- a/chimere/templatetags/chimere_tags.py +++ b/chimere/templatetags/chimere_tags.py @@ -111,9 +111,9 @@ def head_chimere(context): } return context_data -@register.inclusion_tag('chimere/blocks/map_params.html', takes_context=True) -def map_params(context): - context_data = {} +@register.inclusion_tag('chimere/blocks/map.html', takes_context=True) +def map(context, map_id='map'): + context_data = {'map_id':map_id} context_data['icon_offset_x'] = settings.CHIMERE_ICON_OFFSET_X context_data['icon_offset_y'] = settings.CHIMERE_ICON_OFFSET_Y context_data['icon_width'] = settings.CHIMERE_ICON_WIDTH |