From ba93be5ea5d8f699415fc380f66d77e86c84599f Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 19 Jun 2017 14:44:47 +0100 Subject: [PATCH] Remove template from job page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Showing the template on the job page was semi-useful when you couldn’t see the contents of each individual message. It was still a bit weird because it just showed the template, never the actual messages that went out, with the placeholders. Now that users can click through to see individual messages, and can see a short preview of the content on each row I think we can safely lose the template preview on this page. --- app/main/views/jobs.py | 16 +--------------- app/templates/main_nav.html | 2 +- app/templates/views/jobs/job.html | 9 --------- tests/app/main/views/test_jobs.py | 3 --- 4 files changed, 2 insertions(+), 28 deletions(-) diff --git a/app/main/views/jobs.py b/app/main/views/jobs.py index dba4adeb4..0b9f06106 100644 --- a/app/main/views/jobs.py +++ b/app/main/views/jobs.py @@ -114,21 +114,7 @@ def view_job(service_id, job_id): 'views/jobs/job.html', finished=(total_notifications == processed_notifications), uploaded_file_name=job['original_file_name'], - template=get_template( - service_api_client.get_service_template( - service_id=service_id, - template_id=job['template'], - version=job['template_version'] - )['data'], - current_service, - letter_preview_url=url_for( - '.view_template_version_preview', - service_id=service_id, - template_id=job['template'], - version=job['template_version'], - filetype='png', - ), - ), + template_id=job['template'], status=request.args.get('status', ''), updates_url=url_for( ".view_job_updates", diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html index 2dc588d0e..3c0ca9ef2 100644 --- a/app/templates/main_nav.html +++ b/app/templates/main_nav.html @@ -32,7 +32,7 @@ Notify delivers the message

{% if help == '3' %} - + Now go to your dashboard {% endif %} diff --git a/app/templates/views/jobs/job.html b/app/templates/views/jobs/job.html index 14aa297bf..45d0b8892 100644 --- a/app/templates/views/jobs/job.html +++ b/app/templates/views/jobs/job.html @@ -13,17 +13,8 @@ {{ uploaded_file_name }} - {{ template|string }} - {{ ajax_block(partials, updates_url, 'status', finished=finished) }} {{ 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 %} diff --git a/tests/app/main/views/test_jobs.py b/tests/app/main/views/test_jobs.py index decd53bdb..3cf2a086d 100644 --- a/tests/app/main/views/test_jobs.py +++ b/tests/app/main/views/test_jobs.py @@ -91,9 +91,6 @@ def test_should_show_page_for_one_job( assert response.status_code == 200 page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser') assert page.h1.text.strip() == 'thisisatest.csv' - assert page.find('div', {'class': 'sms-message-wrapper'}).text.strip() == ( - '{}: Template content with & entity'.format(service_one['name']) - ) assert ' '.join(page.find('tbody').find('tr').text.split()) == ( '07123456789 template content Delivered 1 January at 11:10am' )