Don’t mix errors with valid rows

Brings in: https://github.com/alphagov/notifications-utils/pull/11

Changes the number of rows shown to be at most 15 (either 15 rows with errors
or 15 valid rows.
This commit is contained in:
Chris Hill-Scott
2016-03-10 20:03:53 +00:00
parent 41b278359c
commit 91b4545adc
4 changed files with 54 additions and 21 deletions

View File

@@ -72,7 +72,7 @@
{% endif %}
{% call(item) list_table(
recipients.rows_annotated_and_truncated,
recipients.initial_annotated_rows_with_errors if rows_have_errors else recipients.initial_annotated_rows,
caption=original_file_name,
field_headings=['1'] + recipients.column_headers_with_placeholders_highlighted
) %}
@@ -99,7 +99,7 @@
{% if count_of_displayed_recipients < count_of_recipients %}
<p class="table-show-more-link">
{{ count_of_recipients - count_of_displayed_recipients }} more {{ "row" if 1 == (count_of_recipients - count_of_displayed_recipients) else "rows"}} not shown
{{ count_of_recipients - count_of_displayed_recipients }} {{ "row" if 1 == (count_of_recipients - count_of_displayed_recipients) else "rows"}} not shown
</p>
{% endif %}