Files
notifications-admin/app/templates/partials/jobs/notifications.html
Chris Hill-Scott d0ef913520 Add a message if there are more than 50 rows
Similar to how we do it on the check page, we should indicate if there
are more results than we can show. No-one’s really complained about the
absence of this, but it can’t hurt.
2016-08-05 10:59:49 +01:00

62 lines
1.7 KiB
HTML

{% from "components/table.html" import list_table, field, right_aligned_field_heading, date_field, row_heading %}
{% if notifications %}
<div class="dashboard-table">
{% endif %}
{% if not help %}
{% if percentage_complete < 100 %}
<p class="bottom-gutter-1-2 hint">
Report is {{ "{:.0f}%".format(percentage_complete) }} complete…
</p>
{% elif notifications %}
<p class="bottom-gutter-1-2">
<a href="{{ download_link }}" download="download" class="heading-small">Download this report</a>
&emsp;
<span id="time-left">{{ time_left }}</span>
</p>
{% endif %}
{% endif %}
{% call(item, row_number) list_table(
notifications,
caption=uploaded_file_name,
caption_visible=False,
empty_message="No messages to show",
field_headings=[
'Recipient',
'Time',
'Status'
],
field_headings_visible=False
) %}
{% call row_heading() %}
{{ item.to }}
{% endcall %}
{{ date_field(
(item.updated_at or item.created_at)|format_datetime_short
) }}
{% call field(
align='right',
status=item.status|format_notification_status_as_field_status
) %}
{% if item.status|format_notification_status_as_url %}
<a href="{{ item.status|format_notification_status_as_url }}">
{% endif %}
{{ item.status|format_notification_status(item.template.template_type) }}
{% if item.status|format_notification_status_as_url %}
</a>
{% endif %}
{% endcall %}
{% endcall %}
{% if more_than_one_page %}
<p class="table-show-more-link">
Only showing the first 50 rows
</p>
{% endif %}
{% if notifications %}
</div>
{% endif %}