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:
Chris Hill-Scott
2016-06-09 11:26:45 +01:00
parent a9f79bcf07
commit 04ef730fd1

View File

@@ -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>