From 1670d48f16e741b05d34f45736c612cee94a06c0 Mon Sep 17 00:00:00 2001 From: John Giannelos Date: Thu, 25 Sep 2014 12:37:04 +0300 Subject: [PATCH] [Fix bug 1067147] Allow admins and council to change activities and campaigns. --- remo/base/content_urls.py | 8 ++++++++ remo/base/templates/settings.html | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/remo/base/content_urls.py b/remo/base/content_urls.py index efdd83e40..f9b36eae2 100644 --- a/remo/base/content_urls.py +++ b/remo/base/content_urls.py @@ -15,37 +15,45 @@ '', url('^activities/$', BaseListView.as_view( + groups=['Admin', 'Council'], model=Activity, create_object_url=reverse_lazy('create_activity')), name='list_activities'), url('^activities/(?P\d+)/delete/$', BaseDeleteView.as_view( + groups=['Admin', 'Council'], model=Activity, success_url=reverse_lazy('list_activities')), name='delete_activity'), url('^activities/new/$', BaseCreateView.as_view( + groups=['Admin', 'Council'], model=Activity, form_class=ActivityForm, success_url=reverse_lazy('list_activities')), name='create_activity'), url('^activities/(?P\d+)/edit/$', BaseUpdateView.as_view( + groups=['Admin', 'Council'], model=Activity, form_class=ActivityForm, success_url=reverse_lazy('list_activities')), name='edit_activity'), url('^campaigns/$', BaseListView.as_view( + groups=['Admin', 'Council'], model=Campaign, create_object_url=reverse_lazy('create_campaign')), name='list_campaigns'), url('^campaigns/(?P\d+)/delete/$', BaseDeleteView.as_view( + groups=['Admin', 'Council'], model=Campaign, success_url=reverse_lazy('list_campaigns')), name='delete_campaign'), url('^campaigns/new/$', BaseCreateView.as_view( + groups=['Admin', 'Council'], model=Campaign, form_class=CampaignForm, success_url=reverse_lazy('list_campaigns')), name='create_campaign'), url('^campaigns/(?P\d+)/edit/$', BaseUpdateView.as_view( + groups=['Admin', 'Council'], model=Campaign, form_class=CampaignForm, success_url=reverse_lazy('list_campaigns')), name='edit_campaign'), diff --git a/remo/base/templates/settings.html b/remo/base/templates/settings.html index 0159aaaaa..2339c7967 100644 --- a/remo/base/templates/settings.html +++ b/remo/base/templates/settings.html @@ -73,15 +73,15 @@

Content

Edit functional areas

- Edit activities + Edit event goals

+ {% endif %}

- Edit campaigns + Edit activities

- Edit event goals + Edit campaigns

- {% endif %}

Edit event metrics