diff options
author | Dave Arter <davea@mysociety.org> | 2016-08-23 17:28:11 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2016-09-08 09:45:58 +0100 |
commit | 1444841970096122c9aeb5e86c82bede01b1bee6 (patch) | |
tree | 79b96fda21ce35037d05065644a1043077bf1717 /perllib/FixMyStreet/Cobrand/Default.pm | |
parent | 80a01c11f656f19d6df4c2e4294f613db14689b1 (diff) |
Extend response templates to work across all cobrands
This builds on the response templates in the Zürich cobrand:
- Allow response templates to be assigned to categories
- Also adds a auto_response flag, which will be used to automatically create
updates when reports are made.
- Include response templates select box on update form
For mysociety/fixmystreetforcouncils#31
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/Default.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index ee110a18b..a58f50b18 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -646,7 +646,7 @@ sub admin_pages { 'summary' => [_('Summary'), 0], 'bodies' => [_('Bodies'), 1], 'reports' => [_('Reports'), 2], - 'timeline' => [_('Timeline'), 3], + 'timeline' => [_('Timeline'), 4], 'users' => [_('Users'), 5], 'flagged' => [_('Flagged'), 6], 'stats' => [_('Stats'), 7], @@ -661,6 +661,12 @@ sub admin_pages { if ( $user->is_superuser ) { $pages->{config} = [ _('Configuration'), 8]; }; + # And some that need special permissions + if ( $user->is_superuser || $user->has_body_permission_to('template_edit') ) { + $pages->{templates} = [_('Templates'), 3], + $pages->{template_edit} = [undef, undef], + }; + return $pages; } @@ -711,6 +717,9 @@ sub available_permissions { user_assign_body => _("Grant access to the admin"), user_assign_areas => _("Assign users to areas"), # future use }, + _("Bodies") => { + template_edit => _("Add/edit response templates"), + }, }; } |