diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/actions.py | 9 | ||||
-rw-r--r-- | main/views.py | 7 |
2 files changed, 10 insertions, 6 deletions
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, |