mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Merge pull request #3681 from alphagov/adjust-hierarchy-broadcast-page
Re-order hierarchy of information when viewing a single broadcast
This commit is contained in:
@@ -32,15 +32,11 @@
|
||||
</p>
|
||||
{% elif item.status == 'broadcasting' %}
|
||||
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 live-broadcast">
|
||||
Live until {{ item.finishes_at|format_datetime_relative }}
|
||||
</p>
|
||||
{% elif item.status == 'cancelled' %}
|
||||
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 govuk-hint">
|
||||
Stopped {{ item.cancelled_at|format_datetime_relative }}
|
||||
Live since {{ item.starts_at|format_datetime_relative }}
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 govuk-hint">
|
||||
Finished {{ item.finishes_at|format_datetime_relative }}
|
||||
Broadcast {{ item.starts_at|format_datetime_relative }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
|
||||
@@ -14,19 +14,17 @@
|
||||
|
||||
{{ page_header("Preview", back_link=url_for('.preview_broadcast_areas', service_id=current_service.id, broadcast_message_id=broadcast_message.id)) }}
|
||||
|
||||
{% for area in broadcast_message.areas %}
|
||||
{% if loop.first %}
|
||||
<ul class="area-list">
|
||||
{% endif %}
|
||||
{{ broadcast_message.template|string }}
|
||||
|
||||
<div class="govuk-!-margin-bottom-3">
|
||||
<ul class="area-list">
|
||||
{% for area in broadcast_message.areas %}
|
||||
<li class="area-list-item area-list-item--unremoveable">
|
||||
{{ area.name }}
|
||||
</li>
|
||||
{% if loop.last %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{{ broadcast_message.template|string }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% call form_wrapper() %}
|
||||
{{ page_footer('Submit for approval') }}
|
||||
|
||||
@@ -99,36 +99,27 @@
|
||||
{% else %}
|
||||
{{ page_header(broadcast_message.template_name) }}
|
||||
|
||||
<p class="govuk-body govuk-!-margin-bottom-3">
|
||||
Created by {{ broadcast_message.created_by.name }} and approved by
|
||||
{{ broadcast_message.approved_by.name }}.
|
||||
</p>
|
||||
|
||||
<p class="govuk-body govuk-!-margin-bottom-3">
|
||||
Started broadcasting
|
||||
{{ broadcast_message.starts_at|format_datetime_human }}.
|
||||
</p>
|
||||
|
||||
<p class="govuk-body">
|
||||
{% if broadcast_message.status == 'pending-approval' %}
|
||||
Will broadcast until {{ broadcast_message.finishes_at|format_datetime_relative }}.
|
||||
{% elif broadcast_message.status == 'broadcasting' %}
|
||||
Live until {{ broadcast_message.finishes_at|format_datetime_relative }} 
|
||||
{% if broadcast_message.status == 'broadcasting' %}
|
||||
<p class="govuk-body govuk-!-margin-bottom-2 live-broadcast live-broadcast--left">
|
||||
Live since {{ broadcast_message.starts_at|format_datetime_relative }} 
|
||||
{%- if not hide_stop_link %}
|
||||
<a href="{{ url_for('.cancel_broadcast_message', service_id=current_service.id, broadcast_message_id=broadcast_message.id) }}" class="destructive-link destructive-link--no-visited-state">Stop broadcast early</a>
|
||||
<a href="{{ url_for('.cancel_broadcast_message', service_id=current_service.id, broadcast_message_id=broadcast_message.id) }}" class="destructive-link destructive-link--no-visited-state">Stop broadcasting</a>
|
||||
{% endif %}
|
||||
{% elif broadcast_message.status == 'cancelled' %}
|
||||
Stopped by {{ broadcast_message.cancelled_by.name }}
|
||||
{{ broadcast_message.cancelled_at|format_datetime_human }}.
|
||||
{% else %}
|
||||
Finished broadcasting {{ broadcast_message.finishes_at|format_datetime_human }}.
|
||||
{% endif %}
|
||||
</p>
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="govuk-body govuk-!-margin-bottom-4">
|
||||
Broadcast
|
||||
{{ broadcast_message.starts_at|format_datetime_human }}.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{{ broadcast_message.template|string }}
|
||||
|
||||
{% for area in broadcast_message.areas %}
|
||||
{% if loop.first %}
|
||||
<ul class="area-list govuk-!-margin-bottom-4">
|
||||
<ul class="area-list">
|
||||
{% endif %}
|
||||
<li class="area-list-item area-list-item--unremoveable">
|
||||
{{ area.name }}
|
||||
@@ -145,6 +136,26 @@
|
||||
}) }}
|
||||
</div>
|
||||
|
||||
{{ broadcast_message.template|string }}
|
||||
{% if broadcast_message.status != 'pending-approval' %}
|
||||
<p class="govuk-body govuk-!-margin-bottom-3">
|
||||
Prepared by {{ broadcast_message.created_by.name }} and approved by
|
||||
{{ broadcast_message.approved_by.name }}.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if broadcast_message.status == 'broadcasting' %}
|
||||
<p class="govuk-body">
|
||||
Broadcasting stops {{ broadcast_message.finishes_at|format_datetime_human }}.
|
||||
</p>
|
||||
{% elif broadcast_message.status == 'cancelled' %}
|
||||
<p class="govuk-body">
|
||||
Stopped by {{ broadcast_message.cancelled_by.name }}
|
||||
{{ broadcast_message.cancelled_at|format_datetime_human }}.
|
||||
</p>
|
||||
{% elif broadcast_message.status == 'completed' %}
|
||||
<p class="govuk-body">
|
||||
Finished broadcasting {{ broadcast_message.finishes_at|format_datetime_human }}.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user