mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Merge pull request #597 from alphagov/job_row_number
Added in notification row number for job pages.
This commit is contained in:
@@ -10,7 +10,33 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
<div>
|
<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,
|
notifications,
|
||||||
caption=uploaded_file_name,
|
caption=uploaded_file_name,
|
||||||
caption_visible=False,
|
caption_visible=False,
|
||||||
@@ -30,6 +56,7 @@
|
|||||||
{{ item.status|format_notification_status }} at {{ item.updated_at|format_time }}
|
{{ item.status|format_notification_status }} at {{ item.updated_at|format_time }}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ def notification_json(service_id,
|
|||||||
to='07123456789',
|
to='07123456789',
|
||||||
status='delivered',
|
status='delivered',
|
||||||
sent_at=None,
|
sent_at=None,
|
||||||
|
job_row_number=None,
|
||||||
created_at=None,
|
created_at=None,
|
||||||
updated_at=None,
|
updated_at=None,
|
||||||
with_links=False):
|
with_links=False):
|
||||||
@@ -193,6 +194,7 @@ def notification_json(service_id,
|
|||||||
'status': status,
|
'status': status,
|
||||||
'created_at': created_at,
|
'created_at': created_at,
|
||||||
'updated_at': updated_at,
|
'updated_at': updated_at,
|
||||||
|
'job_row_number': job_row_number,
|
||||||
'template_version': template['version']
|
'template_version': template['version']
|
||||||
} for i in range(5)],
|
} for i in range(5)],
|
||||||
'total': 5,
|
'total': 5,
|
||||||
|
|||||||
Reference in New Issue
Block a user