From 0a3567ec485e25eb9db207f28c67f6b67037e92d Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 4 Apr 2016 16:54:28 +0100 Subject: [PATCH] Add page ``s to tour pages --- app/main/views/tour.py | 11 ++++++++++- app/templates/views/tour/1.html | 2 +- app/templates/views/tour/2.html | 2 +- app/templates/views/tour/3.html | 2 +- app/templates/views/tour/4.html | 4 ++-- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/main/views/tour.py b/app/main/views/tour.py index 3615b2a9c..222b2d0fa 100644 --- a/app/main/views/tour.py +++ b/app/main/views/tour.py @@ -4,6 +4,14 @@ from flask_login import login_required from app.main import main +headings = [ + 'Trial mode', + 'Start with templates', + 'Add recipients', + 'Send your messages', +] + + @main.route("/services/<service_id>/tour/<int:page>") @login_required def tour(service_id, page): @@ -11,5 +19,6 @@ def tour(service_id, page): 'views/tour/{}.html'.format(page), service_id=service_id, # TODO: fix when Nick’s PR is merged current_page=page, - next_page=(page + 1) + next_page=(page + 1), + heading=headings[page - 1] ) diff --git a/app/templates/views/tour/1.html b/app/templates/views/tour/1.html index c25116f6a..bd2d6d0db 100644 --- a/app/templates/views/tour/1.html +++ b/app/templates/views/tour/1.html @@ -10,7 +10,7 @@ {% block maincolumn_content %} {% call banner_wrapper(type='tour') %} - <h2 class="heading-large">Trial mode</h2> + <h2 class="heading-large">{{ heading }}</h2> <p> To start off with, you can only send messages to yourself. </p> diff --git a/app/templates/views/tour/2.html b/app/templates/views/tour/2.html index 85f1b4068..d3bfe1b2f 100644 --- a/app/templates/views/tour/2.html +++ b/app/templates/views/tour/2.html @@ -10,7 +10,7 @@ {% block maincolumn_content %} {% call banner_wrapper(type='tour') %} - <h2 class="heading-large">Start with templates</h2> + <h2 class="heading-large">{{ heading }}</h2> <p> Set up a template like this: </p> diff --git a/app/templates/views/tour/3.html b/app/templates/views/tour/3.html index 7b56ce674..2e71ead07 100644 --- a/app/templates/views/tour/3.html +++ b/app/templates/views/tour/3.html @@ -10,7 +10,7 @@ {% block maincolumn_content %} {% call banner_wrapper(type='tour') %} - <h2 class="heading-large">Add recipients</h2> + <h2 class="heading-large">{{ heading }}</h2> <p> Add recipients by uploading a .csv spreadsheet: </p> diff --git a/app/templates/views/tour/4.html b/app/templates/views/tour/4.html index 4b4e6f6a6..f1d5b0145 100644 --- a/app/templates/views/tour/4.html +++ b/app/templates/views/tour/4.html @@ -4,13 +4,13 @@ {% from "components/banner.html" import banner_wrapper %} {% block page_title %} - {{heading}} – GOV.UK Notify + {{ heading }} – GOV.UK Notify {% endblock %} {% block maincolumn_content %} {% call banner_wrapper(type='tour') %} - <h2 class="heading-large">Send your messages</h2> + <h2 class="heading-large">{{ heading }}</h2> <p> Notify merges your data with the template and sends the messages </p>