From a6ad82994703e691714a78851dd65a20e7ae271d Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 17 Jun 2016 14:32:32 +0100 Subject: [PATCH 1/2] Redirect to the templates page after the tour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When you’re dropped straight into the ‘edit template’ page it’s still a bit confusing what the thing you’re typing is—the mental model isn’t quite there yet. I think it will help (rather than redirect to the dashboard) to redirect to the choose template page. You can then choose to edit the example or add your own template. This should help people understand that the example is one of a number of templates that you create. --- app/templates/main_nav.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html index c8cebae6b..18b9c9d71 100644 --- a/app/templates/main_nav.html +++ b/app/templates/main_nav.html @@ -33,11 +33,11 @@

{% if request.args['help'] == '3' %} {% if first_email_template %} - + Write an email {% endif %} - + Write a text message {% endif %} From fb6cf3b3f4dd70a160520386434d46fc2fe7000d Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 17 Jun 2016 16:15:51 +0100 Subject: [PATCH 2/2] Removed unused get template call --- app/main/views/jobs.py | 4 ---- app/templates/main_nav.html | 8 +++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/main/views/jobs.py b/app/main/views/jobs.py index ae6087aa2..931e03324 100644 --- a/app/main/views/jobs.py +++ b/app/main/views/jobs.py @@ -92,10 +92,6 @@ def view_job(service_id, job_id): job.get('notifications_failed', 0) ) == 0), uploaded_file_name=job['original_file_name'], - first_email_template=[ - template for template in service_api_client.get_service_templates(service_id)['data'] - if template['template_type'] == 'email' - ][0] if request.args.get('help') else None, template=Template( template, prefix=current_service['name'] diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html index 18b9c9d71..8996b9ed7 100644 --- a/app/templates/main_nav.html +++ b/app/templates/main_nav.html @@ -32,11 +32,9 @@ Now try it with your own message

{% if request.args['help'] == '3' %} - {% if first_email_template %} - - Write an email - - {% endif %} + + Write an email + Write a text message