From 144de217452f5e124cd898645075576c4b4399d3 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 11 Mar 2016 15:08:31 +0000 Subject: [PATCH] Make nav and page headings reflect permissions > If you have the Edit templates permission but not the Send messages permission, the navigation should read > > - Text message templates > - Email templates > - Letter templates > > The page headings should also read > > - Text message templates > - Email templates > - Letter templates respectively https://www.pivotaltracker.com/story/show/115488955 --- app/main/views/send.py | 4 ++-- app/templates/main_nav.html | 4 ++-- app/templates/views/letters.html | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/main/views/send.py b/app/main/views/send.py index f80da4eb3..155a55e22 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -37,8 +37,8 @@ send_messages_page_headings = { manage_templates_page_headings = { - 'email': 'Manage templates', - 'sms': 'Manage templates' + 'email': 'Email templates', + 'sms': 'Text message templates' } diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html index 3f2727e40..bafcfae2e 100644 --- a/app/templates/main_nav.html +++ b/app/templates/main_nav.html @@ -10,9 +10,9 @@ {% elif current_user.has_permissions(['manage_templates']) %} {% endif %} {% if current_user.has_permissions(['manage_users', 'manage_settings']) %} diff --git a/app/templates/views/letters.html b/app/templates/views/letters.html index 1086f1d50..5ef3e4d6f 100644 --- a/app/templates/views/letters.html +++ b/app/templates/views/letters.html @@ -7,7 +7,11 @@ {% block maincolumn_content %}

- Send letters + {% if current_user.has_permissions(['send_letters']) %} + Send letters + {% else %} + Letter templates + {% endif %}