mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-30 19:29:43 -04:00
24px with 19px is what we use on the uploads page. On notifications page we use 19px with 16px. There’s some loose idea that the bigger size is for items that contain other items. This also increases the line height for recipients of PDF letters to make things line up.
108 lines
3.9 KiB
HTML
108 lines
3.9 KiB
HTML
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading %}
|
|
{% from "components/big-number.html" import big_number -%}
|
|
{% from "components/message-count-label.html" import message_count_label, recipient_count_label -%}
|
|
|
|
<div class='dashboard-table ajax-block-container'>
|
|
{% call(item, row_number) list_table(
|
|
jobs,
|
|
caption="Recent files uploaded",
|
|
caption_visible=False,
|
|
empty_message=(
|
|
'Upload a letter and Notify will print, pack and post it for you.' if current_service.can_upload_letters else 'You have not uploaded any files yet'
|
|
),
|
|
field_headings=[
|
|
'File',
|
|
'Status'
|
|
],
|
|
field_headings_visible=False
|
|
) %}
|
|
{% call row_heading() %}
|
|
<div class="file-list">
|
|
{% if item.upload_type == 'letter' %}
|
|
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('.view_notification', service_id=current_service.id, notification_id=item.id) }}">{{ item.original_file_name }}</a>
|
|
{% elif item.upload_type == 'contact_list' %}
|
|
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('.contact_list', service_id=current_service.id, contact_list_id=item.id) }}">{{ item.original_file_name }}</a>
|
|
{% else %}
|
|
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('.view_job', service_id=current_service.id, job_id=item.id) }}">{{ item.original_file_name }}</a>
|
|
{% endif %}
|
|
{% if item.scheduled %}
|
|
<span class="file-list-hint-large">
|
|
Sending {{
|
|
item.scheduled_for|format_datetime_relative
|
|
}}
|
|
</span>
|
|
{% elif item.upload_type == 'contact_list' %}
|
|
<span class="file-list-hint-large">
|
|
Uploaded {{
|
|
item.created_at|format_datetime_relative
|
|
}}
|
|
</span>
|
|
{% else %}
|
|
<span class="file-list-hint-large">
|
|
Sent {{
|
|
(item.scheduled_for or item.created_at)|format_datetime_relative
|
|
}}
|
|
</span>
|
|
{% endif %}
|
|
|
|
</div>
|
|
{% endcall %}
|
|
{% call field() %}
|
|
{% if item.scheduled %}
|
|
{{ big_number(
|
|
item.notification_count,
|
|
smallest=True,
|
|
label=message_count_label(
|
|
item.notification_count,
|
|
item.template_type,
|
|
suffix='waiting to send'
|
|
)
|
|
) }}
|
|
{% elif item.template_type == 'letter' %}
|
|
{{ big_number(
|
|
item.notification_count,
|
|
smallest=True,
|
|
label=message_count_label(
|
|
item.notification_count,
|
|
item.template_type,
|
|
suffix=''
|
|
)
|
|
) }}
|
|
{% elif item.upload_type == 'contact_list' %}
|
|
{{ big_number(
|
|
item.row_count,
|
|
smallest=True,
|
|
label="saved {}".format(recipient_count_label(
|
|
item.row_count,
|
|
item.template_type
|
|
))
|
|
) }}
|
|
{% elif item.pdf_letter %}
|
|
<p class="govuk-body letter-recipient-summary">
|
|
{% for line in item.recipient.splitlines() %}
|
|
{% if loop.index < 3 %}
|
|
{{ line }}<br>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</p>
|
|
{% else %}
|
|
<div class="govuk-grid-row">
|
|
<div class="govuk-grid-column-one-third">
|
|
{{ big_number(
|
|
item.notifications_sending,
|
|
smallest=True,
|
|
label='sending',
|
|
) }}
|
|
</div>
|
|
<div class="govuk-grid-column-one-third">
|
|
{{ big_number(item.notifications_delivered, smallest=True, label='delivered') }}
|
|
</div>
|
|
<div class="govuk-grid-column-one-third">
|
|
{{ big_number(item.notifications_failed, smallest=True, label='failed') }}
|
|
</div></div>
|
|
|
|
{% endif %}
|
|
{% endcall %}
|
|
{% endcall %}
|
|
</div>
|