mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-04 21:40:23 -04:00
We have a reckon that live broadcasts don’t feel prominent, consequential or active enough on the dashboard. This commit adds an animated component, similar to an ‘on air’ indicator in a broadcast studio, or a ‘recording’ indicator on a video camera. This is one option for addressing our reckon. We shouldn’t merge this until we have a better understanding of the problem from another round of user research.
44 lines
1.8 KiB
HTML
44 lines
1.8 KiB
HTML
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading %}
|
|
|
|
<div class='{% if broadcasts %}dashboard-table{% endif%} ajax-block-container'>
|
|
{% 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>
|
|
<span class="file-list-hint-large">
|
|
To {{ item.initial_area_names|formatted_list(before_each='', after_each='') }}
|
|
</span>
|
|
</div>
|
|
{% endcall %}
|
|
{% call field(align='right') %}
|
|
{% if item.status == 'pending-approval' %}
|
|
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 govuk-hint">
|
|
Prepared by {{ item.created_by.name }}
|
|
</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 }}
|
|
</p>
|
|
{% else %}
|
|
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 govuk-hint">
|
|
Finished {{ item.finishes_at|format_datetime_relative }}
|
|
</p>
|
|
{% endif %}
|
|
{% endcall %}
|
|
{% endcall %}
|
|
</div>
|