{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading %} {% from "components/big-number.html" import big_number -%}
{% call(item, row_number) list_table( jobs, caption="Recent files uploaded", caption_visible=False, empty_message=( 'You have not uploaded any files yet.' ), field_headings=[ 'File', 'Status' ], field_headings_visible=False ) %} {% call row_heading() %}
{% if item.upload_type == 'contact_list' %} {{ item.original_file_name }} {% else %} {{ item.original_file_name }} {% endif %} {% if item.scheduled %} Sending {{ item.scheduled_for|format_datetime_relative }} {% elif item.upload_type == 'contact_list' %} {% if item.recent_job_count %} Used {{ item.recent_job_count|iteration_count }} in the last {{ current_service.get_days_of_retention(item.template_type) }} days {% elif item.has_jobs %} Not used in the last {{ current_service.get_days_of_retention(item.template_type) }} days {% else %} Not used yet {% endif %} {% else %} Sent {{ (item.scheduled_for or item.created_at)|format_datetime_relative }} {% endif %}
{% endcall %} {% call field() %} {% if item.scheduled %} {{ big_number( item.notification_count, smallest=True, label=item.notification_count|message_count_label( item.template_type, suffix='waiting to send' ) ) }} {% elif item.upload_type == 'contact_list' %} {{ big_number( item.row_count, smallest=True, label="saved {}".format(item.row_count|recipient_count_label(item.template_type)) ) }} {% else %}
{{ big_number( item.notifications_sending, smallest=True, label='sending', ) }}
{{ big_number(item.notifications_delivered, smallest=True, label='delivered') }}
{{ big_number(item.notifications_failed, smallest=True, label='failed') }}
{% endif %} {% endcall %} {% endcall %}