From e79a5d739d1a3253a88fac3f66f6a41e6dfd9d80 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 29 Nov 2010 16:53:19 +0100 Subject: Correct zoom to area shortcut doesn't work anymore (closes #284) --- chimere/main/templatetags/unlocalize_point.py | 16 ++++++++++++++++ chimere/templates/main_map.html | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 chimere/main/templatetags/unlocalize_point.py diff --git a/chimere/main/templatetags/unlocalize_point.py b/chimere/main/templatetags/unlocalize_point.py new file mode 100644 index 0000000..f52a90a --- /dev/null +++ b/chimere/main/templatetags/unlocalize_point.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from django import template +import re + +register = template.Library() + +def unlocalize_point(value): + """ + Basic unlocalize filter for django 1.2 + """ + return unicode(value).replace(',', '.') + +register.filter(unlocalize_point) + diff --git a/chimere/templates/main_map.html b/chimere/templates/main_map.html index 526bf32..8b8cc2e 100644 --- a/chimere/templates/main_map.html +++ b/chimere/templates/main_map.html @@ -1,5 +1,6 @@ {% extends "base_user.html" %} {% load i18n %} +{% load unlocalize_point %} {% block message_edit %}{% endblock %} {% block sidebar %}{{ block.super }}
@@ -14,7 +15,7 @@ {%if areas%}

{% trans "Shortcuts"%}

    {% for area in areas%} -
  • {% trans "Zoom to" %} {{area.name}} {{area.name}}
  • {%endfor%} +
  • {% trans "Zoom to" %} {{area.name}} {{area.name}}
  • {%endfor%}
{%endif%} -- cgit v1.2.3