mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-31 11:30:28 -04:00
Added in notification row number for job pages.
This commit is contained in:
@@ -10,7 +10,33 @@
|
||||
>
|
||||
|
||||
<div>
|
||||
{% call(item, row_number) list_table(
|
||||
{% if notifications|length > 0 and notifications[0].job_row_number is not none %}
|
||||
{% call(item, row_number) list_table(
|
||||
notifications,
|
||||
caption=uploaded_file_name,
|
||||
caption_visible=False,
|
||||
empty_message="No messages to show yet",
|
||||
field_headings=[
|
||||
'1',
|
||||
'Recipient',
|
||||
right_aligned_field_heading('Status')
|
||||
]
|
||||
) %}
|
||||
{% call field() %}
|
||||
{{ item.job_row_number + 2 }}
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
{{ item.to }}
|
||||
{% endcall %}
|
||||
{% call field(
|
||||
align='right',
|
||||
status='error' if item.status == 'Failed' else 'default'
|
||||
) %}
|
||||
{{ item.status|format_notification_status }} at {{ item.updated_at|format_time }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
{% else %}
|
||||
{% call(item, row_number) list_table(
|
||||
notifications,
|
||||
caption=uploaded_file_name,
|
||||
caption_visible=False,
|
||||
@@ -30,6 +56,7 @@
|
||||
{{ item.status|format_notification_status }} at {{ item.updated_at|format_time }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -161,6 +161,7 @@ def notification_json(service_id,
|
||||
to='07123456789',
|
||||
status='delivered',
|
||||
sent_at=None,
|
||||
job_row_number=None,
|
||||
created_at=None,
|
||||
updated_at=None,
|
||||
with_links=False):
|
||||
@@ -193,6 +194,7 @@ def notification_json(service_id,
|
||||
'status': status,
|
||||
'created_at': created_at,
|
||||
'updated_at': updated_at,
|
||||
'job_row_number': job_row_number,
|
||||
'template_version': template['version']
|
||||
} for i in range(5)],
|
||||
'total': 5,
|
||||
|
||||
Reference in New Issue
Block a user