summaryrefslogtreecommitdiff
path: root/chimere/main/widgets.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2011-09-09 01:26:34 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2011-09-09 01:26:34 +0200
commit0ccc30e337bb046000fb76d2337c2fb9792bc71f (patch)
treebbf2307438389f91fdae1e618d0816238b0a015a /chimere/main/widgets.py
parent5833aa61d039bf3d1f4372e0390ffc53b7d63eb9 (diff)
downloadChimère-0ccc30e337bb046000fb76d2337c2fb9792bc71f.tar.bz2
Chimère-0ccc30e337bb046000fb76d2337c2fb9792bc71f.zip
Association of a GPX (or KML) file to a route (refs #302)
- new table in the model - new form in route edition - uploaded gpx file simplification - automatic route creation from the GPX file
Diffstat (limited to 'chimere/main/widgets.py')
-rw-r--r--chimere/main/widgets.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/chimere/main/widgets.py b/chimere/main/widgets.py
index 06c75c6..caac0ea 100644
--- a/chimere/main/widgets.py
+++ b/chimere/main/widgets.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (C) 2008 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+# Copyright (C) 2008-2011 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
@@ -212,6 +212,9 @@ initFeature(geometry);""" % val.json
tpl += """
// --></script>
"""
+ tpl += u'<a href="#" class="add-button" '\
+ u'onclick="open_window(\'%supload_file\');">%s</a>' % (
+ settings.BASE_URL, _(u"Upload a route file (GPX or KML)"))
return mark_safe(tpl)
class RouteField(models.LineStringField):