mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
Add page for broadcast in pending state
Since we’ll be linking to pending broadcasts from the dashboard, the page needs to be ready to display them. Pending broadcasts lack a few bits of information that live or previous broadcasts have (like the start date for example). So this commit hides the code that displays those bits of information.
This commit is contained in:
@@ -16,26 +16,35 @@
|
|||||||
back_link=url_for('.broadcast_dashboard', service_id=current_service.id)
|
back_link=url_for('.broadcast_dashboard', service_id=current_service.id)
|
||||||
) }}
|
) }}
|
||||||
|
|
||||||
<p class="govuk-body govuk-!-margin-bottom-3">
|
{% if broadcast_message.status == 'pending-approval' %}
|
||||||
Created by {{ broadcast_message.created_by.name }} and approved by
|
<p class="govuk-body govuk-!-margin-bottom-3">
|
||||||
{{ broadcast_message.approved_by.name }}.
|
{{ broadcast_message.created_by.name }} wants to broadcast this
|
||||||
</p>
|
message until {{ broadcast_message.finishes_at|format_datetime_relative }}.
|
||||||
|
</p>
|
||||||
|
{% else %}
|
||||||
|
<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">
|
<p class="govuk-body govuk-!-margin-bottom-3">
|
||||||
Started broadcasting
|
Started broadcasting
|
||||||
{{ broadcast_message.starts_at|format_datetime_human }}.
|
{{ broadcast_message.starts_at|format_datetime_human }}.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="govuk-body">
|
<p class="govuk-body">
|
||||||
{% if broadcast_message.status == 'broadcasting' %}
|
{% if broadcast_message.status == 'pending-approval' %}
|
||||||
Live until {{ broadcast_message.finishes_at|format_datetime_relative }} <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>
|
Will broadcast until {{ broadcast_message.finishes_at|format_datetime_relative }}.
|
||||||
{% elif broadcast_message.status == 'cancelled' %}
|
{% elif broadcast_message.status == 'broadcasting' %}
|
||||||
Stopped by {{ broadcast_message.cancelled_by.name }}
|
Live until {{ broadcast_message.finishes_at|format_datetime_relative }} <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>
|
||||||
{{ broadcast_message.cancelled_at|format_datetime_human }}.
|
{% elif broadcast_message.status == 'cancelled' %}
|
||||||
{% else %}
|
Stopped by {{ broadcast_message.cancelled_by.name }}
|
||||||
Finished broadcasting {{ broadcast_message.finishes_at|format_datetime_human }}.
|
{{ broadcast_message.cancelled_at|format_datetime_human }}.
|
||||||
{% endif %}
|
{% else %}
|
||||||
</p>
|
Finished broadcasting {{ broadcast_message.finishes_at|format_datetime_human }}.
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% for area in broadcast_message.areas %}
|
{% for area in broadcast_message.areas %}
|
||||||
{% if loop.first %}
|
{% if loop.first %}
|
||||||
|
|||||||
Reference in New Issue
Block a user