summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--locale/fr/LC_MESSAGES/django.po10
-rw-r--r--main/actions.py9
-rw-r--r--main/views.py7
-rw-r--r--templates/base.html11
4 files changed, 26 insertions, 11 deletions
diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po
index 5ee9925..31b5c21 100644
--- a/locale/fr/LC_MESSAGES/django.po
+++ b/locale/fr/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-01-18 00:36+0100\n"
+"POT-Creation-Date: 2010-01-19 00:40+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -20,10 +20,14 @@ msgid "View"
msgstr "Voir"
#: main/actions.py:33
+msgid "Contribute"
+msgstr "Participer"
+
+#: main/actions.py:34
msgid "Add a new point of interest"
msgstr "Ajout d'un point remarquable"
-#: main/actions.py:34 templates/edit_route.html:8
+#: main/actions.py:35 templates/edit_route.html:8
msgid "Add a new route"
msgstr "Ajout d'un nouveau trajet"
@@ -251,7 +255,7 @@ msgstr "Commencer le tracé"
msgid "Stop drawing"
msgstr "Arrêter le tracé"
-#: templates/base.html:29
+#: templates/base.html:36
msgid "This site uses Chimère"
msgstr "Ce site utilise Chimère"
diff --git a/main/actions.py b/main/actions.py
index 4bd3ea1..d2cd409 100644
--- a/main/actions.py
+++ b/main/actions.py
@@ -29,6 +29,9 @@ class Action:
def __init__(self, id, path, label):
self.id, self.path, self.label = id, EXTRA_URL + path, label
-actions = [Action('view', '', _('View')),
- Action('edit', 'edit', _('Add a new point of interest')),
- Action('edit_route', 'edit_route', _('Add a new route'))]
+actions = ((Action('view', '', _('View')), []),
+ (Action('contribute', 'edit', _('Contribute')),
+ (Action('edit', 'edit', _('Add a new point of interest')),
+ Action('edit_route', 'edit_route', _('Add a new route')))
+ ),
+ )
diff --git a/main/views.py b/main/views.py
index d19c345..ce41c40 100644
--- a/main/views.py
+++ b/main/views.py
@@ -62,7 +62,7 @@ def index(request):
request.session['last_visit'] != today:
request.session['last_visit'] = today
display_welcome = True
- response_dct = {'actions':actions, 'action_selected':'view',
+ response_dct = {'actions':actions, 'action_selected':('view',),
'error_message':'',
'sub_categories':subcategories,
'extra_head':extra + getMapJS(),
@@ -107,7 +107,7 @@ def edit(request):
form = MarkerForm()
# get the « manualy » declared_fields. Ie: properties
declared_fields = form.declared_fields.keys()
- response_dct = {'actions':actions, 'action_selected':'edit',
+ response_dct = {'actions':actions, 'action_selected':('contribute', 'edit'),
'error_message':'',
'media_path':settings.MEDIA_URL,
'extra_url':settings.EXTRA_URL,
@@ -143,7 +143,8 @@ def editRoute(request):
form = RouteForm()
# get the « manualy » declared_fields. Ie: properties
declared_fields = form.declared_fields.keys()
- response_dct = {'actions':actions, 'action_selected':'edit_route',
+ response_dct = {'actions':actions,
+ 'action_selected':('contribute', 'edit_route'),
'error_message':'',
'media_path':settings.MEDIA_URL,
'map_layer':settings.MAP_LAYER,
diff --git a/templates/base.html b/templates/base.html
index ffa6025..b03563a 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -15,8 +15,15 @@
{% block top %}{% endblock %}
<div id="topbar">
<ul id='action'>
-{% for action in actions %}
- <li{% ifequal action.id action_selected %} id='selected'{% endifequal %}><a href='/{{ action.path }}' onclick='saveExtent();'>{{ action.label }}</a></li>
+{% for action, subactions in actions %}
+ <li{% ifequal action.id action_selected.0 %} class='selected'{% endifequal %}>
+ <a href='/{{ action.path }}' onclick='saveExtent();'>{{ action.label }}</a>
+ {% ifequal action.id action_selected.0 %}{% if subactions %}<ul>{% for subaction in subactions %}
+ <li{% ifequal subaction.id action_selected.1 %} class='selected'{% endifequal %}>
+ <a href='/{{ subaction.path }}' onclick='saveExtent();'>{{ subaction.label }}</a>
+ </li>
+ {% endfor %}</ul>{% endif %}{% endifequal %}
+ </li>
{% endfor %}
</ul>
</div>