From 6937e06ad546b7b8d99cca794b925f1ae219bc98 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 14 Oct 2020 14:00:12 +0100 Subject: [PATCH] =?UTF-8?q?Move=20the=20=E2=80=98who=20did=20what=E2=80=99?= =?UTF-8?q?=20stuff=20to=20the=20bottom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The most important part of the broadcast is what content was sent where (and when). This commit reduces the priority of the ‘meta’ information, like who prepared and approved the broadcast. I also think that the ‘end’ time is a lot less important than the start time, since most people will receive the alert at or near to the start time. --- app/templates/views/broadcast/view-message.html | 12 +++++++----- tests/app/main/views/test_broadcast.py | 10 +++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/app/templates/views/broadcast/view-message.html b/app/templates/views/broadcast/view-message.html index a191f0585..5133839aa 100644 --- a/app/templates/views/broadcast/view-message.html +++ b/app/templates/views/broadcast/view-message.html @@ -99,11 +99,6 @@ {% else %} {{ page_header(broadcast_message.template_name) }} -

- Created by {{ broadcast_message.created_by.name }} and approved by - {{ broadcast_message.approved_by.name }}. -

-

Started broadcasting {{ broadcast_message.starts_at|format_datetime_human }}. @@ -147,4 +142,11 @@ }) }} + {% if broadcast_message.status != 'pending-approval' %} +

+ Prepared by {{ broadcast_message.created_by.name }} and approved by + {{ broadcast_message.approved_by.name }}. +

+ {% endif %} + {% endblock %} diff --git a/tests/app/main/views/test_broadcast.py b/tests/app/main/views/test_broadcast.py index be55d22bf..3693abeb2 100644 --- a/tests/app/main/views/test_broadcast.py +++ b/tests/app/main/views/test_broadcast.py @@ -1037,34 +1037,34 @@ def test_start_broadcasting( 'status': 'broadcasting', 'finishes_at': '2020-02-23T23:23:23.000000', }, [ - 'Created by Alice and approved by Bob.', 'Started broadcasting on 20 February at 8:20pm.', 'Live until tomorrow at 11:23pm Stop broadcast early', + 'Prepared by Alice and approved by Bob.', ]), ({ 'status': 'broadcasting', 'finishes_at': '2020-02-22T22:20:20.000000', # 2 mins before now() }, [ - 'Created by Alice and approved by Bob.', 'Started broadcasting on 20 February at 8:20pm.', 'Finished broadcasting today at 10:20pm.', + 'Prepared by Alice and approved by Bob.', ]), ({ 'status': 'finished', 'finishes_at': '2020-02-21T21:21:21.000000', }, [ - 'Created by Alice and approved by Bob.', 'Started broadcasting on 20 February at 8:20pm.', 'Finished broadcasting yesterday at 9:21pm.', + 'Prepared by Alice and approved by Bob.', ]), ({ 'status': 'cancelled', 'cancelled_by_id': sample_uuid, 'cancelled_at': '2020-02-21T21:21:21.000000', }, [ - 'Created by Alice and approved by Bob.', 'Started broadcasting on 20 February at 8:20pm.', - 'Stopped by Carol yesterday at 9:21pm.', + 'Stopped by Alice yesterday at 9:21pm.', + 'Prepared by Bob and approved by Carol.', ]), )) @freeze_time('2020-02-22T22:22:22.000000')