2020-07-14 13:39:29 +01:00
|
|
|
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading %}
|
|
|
|
|
|
2020-07-14 15:22:48 +01:00
|
|
|
<div class='{% if broadcasts %}dashboard-table{% endif%} ajax-block-container'>
|
2020-07-14 13:39:29 +01:00
|
|
|
{% call(item, row_number) list_table(
|
|
|
|
|
broadcasts|sort|reverse|list,
|
|
|
|
|
caption="Live broadcasts",
|
|
|
|
|
caption_visible=False,
|
|
|
|
|
empty_message=empty_message,
|
|
|
|
|
field_headings=[
|
|
|
|
|
'Template name',
|
|
|
|
|
'Status'
|
|
|
|
|
],
|
|
|
|
|
field_headings_visible=False
|
|
|
|
|
) %}
|
|
|
|
|
{% call row_heading() %}
|
|
|
|
|
<div class="file-list">
|
|
|
|
|
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('.view_broadcast_message', service_id=current_service.id, broadcast_message_id=item.id) }}">{{ item.template_name }}</a>
|
2020-10-14 10:43:04 +01:00
|
|
|
<span class="file-list-hint-large govuk-!-margin-bottom-1">
|
2020-10-13 15:43:25 +01:00
|
|
|
{{ item.content }}
|
|
|
|
|
</span>
|
2020-10-14 10:43:04 +01:00
|
|
|
<ul class="area-list">
|
|
|
|
|
{% for area in item.areas %}
|
|
|
|
|
<li class="area-list-item area-list-item--unremoveable">{{ area.name }}</li>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</ul>
|
2020-07-14 13:39:29 +01:00
|
|
|
</div>
|
|
|
|
|
{% endcall %}
|
|
|
|
|
{% call field(align='right') %}
|
2020-07-17 08:07:40 +01:00
|
|
|
{% if item.status == 'pending-approval' %}
|
2020-07-17 08:37:19 +01:00
|
|
|
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 govuk-hint">
|
2020-07-17 08:07:40 +01:00
|
|
|
Prepared by {{ item.created_by.name }}
|
|
|
|
|
</p>
|
|
|
|
|
{% elif item.status == 'broadcasting' %}
|
2020-07-21 09:05:24 +01:00
|
|
|
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 live-broadcast">
|
2020-07-14 13:39:29 +01:00
|
|
|
Live until {{ item.finishes_at|format_datetime_relative }}
|
|
|
|
|
</p>
|
|
|
|
|
{% else %}
|
|
|
|
|
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 govuk-hint">
|
2020-10-14 14:05:14 +01:00
|
|
|
Broadcast {{ item.starts_at|format_datetime_relative }}
|
2020-07-14 13:39:29 +01:00
|
|
|
</p>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endcall %}
|
|
|
|
|
{% endcall %}
|
|
|
|
|
</div>
|