From 3f1b5603f6906e7a393cf2cff074e358aca69cd9 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 22 Mar 2017 10:55:15 +0000 Subject: [PATCH] Add a back to template link on job page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When you’ve sent message(s) using a template, often the next thing you want to do is go and send the same template again, or edit it. Currently there’s no way of getting to a template from a job except for going back to the list of templates and re-finding it. This commit adds a link at the bottom of the job page that gives you a shortcut back to the individual template, where you can find actions like edit/send/etc. --- app/templates/partials/jobs/notifications.html | 2 +- app/templates/views/jobs/job.html | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/templates/partials/jobs/notifications.html b/app/templates/partials/jobs/notifications.html index 6004a9471..9b7ef6817 100644 --- a/app/templates/partials/jobs/notifications.html +++ b/app/templates/partials/jobs/notifications.html @@ -19,7 +19,7 @@ {% else %} {% if notifications %} -
+
{% endif %} {% if not help %} diff --git a/app/templates/views/jobs/job.html b/app/templates/views/jobs/job.html index a80bd7ad6..14aa297bf 100644 --- a/app/templates/views/jobs/job.html +++ b/app/templates/views/jobs/job.html @@ -1,6 +1,7 @@ {% extends "withnav_template.html" %} {% from "components/banner.html" import banner %} {% from "components/ajax-block.html" import ajax_block %} +{% from "components/page-footer.html" import page_footer %} {% block service_page_title %} {{ uploaded_file_name }} @@ -18,4 +19,11 @@ {{ ajax_block(partials, updates_url, 'counts', finished=finished) }} {{ ajax_block(partials, updates_url, 'notifications', finished=finished) }} + {% if not help %} + {{ page_footer( + secondary_link=url_for('.view_template', service_id=current_service.id, template_id=template.id), + secondary_link_text='Back to {}'.format(template.name) + ) }} + {% endif %} + {% endblock %}