mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-23 08:49:46 -04:00
Remove redundant if statement on job page
We had this if statement to lay out the table differently with and without row numbers. Since we don’t show row numbers at all, this isn’t needed.
This commit is contained in:
@@ -9,55 +9,30 @@
|
||||
{% endif %}
|
||||
>
|
||||
|
||||
<div>
|
||||
{% 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=[
|
||||
'Recipient',
|
||||
'Time',
|
||||
right_aligned_field_heading('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
|
||||
) %}
|
||||
{{ item.status|format_notification_status(item.template.template_type) }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
{% else %}
|
||||
{% call(item, row_number) list_table(
|
||||
notifications,
|
||||
caption=uploaded_file_name,
|
||||
caption_visible=False,
|
||||
empty_message="No messages to show yet",
|
||||
field_headings=[
|
||||
'Recipient',
|
||||
right_aligned_field_heading('Status')
|
||||
]
|
||||
) %}
|
||||
{% 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 %}
|
||||
{% call(item, row_number) list_table(
|
||||
notifications,
|
||||
caption=uploaded_file_name,
|
||||
caption_visible=False,
|
||||
empty_message="No messages to show yet",
|
||||
field_headings=[
|
||||
'Recipient',
|
||||
'Time',
|
||||
'Status'
|
||||
],
|
||||
field_headings_visible=False
|
||||
) %}
|
||||
{% call row_heading() %}
|
||||
{{ item.to }}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ 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
|
||||
) %}
|
||||
{{ item.status|format_notification_status(item.template.template_type) }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user