mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-13 09:50:08 -04:00
Replace iteration count macro with formatters
We prefer formatters now. Removing uses of the aliasing macro lets remove it entirely.
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
{% macro message_count_label(count, template_type, suffix='sent') -%}
|
||||
{{ count|message_count_noun(template_type) }} {{ suffix }}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro iteration_count(count) -%}
|
||||
{{ count|iteration_count }}
|
||||
{% endmacro %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading %}
|
||||
{% from "components/big-number.html" import big_number -%}
|
||||
{% from "components/message-count-label.html" import message_count_label, iteration_count -%}
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
|
||||
<div class='dashboard-table ajax-block-container'>
|
||||
{% call(item, row_number) list_table(
|
||||
@@ -36,7 +36,7 @@
|
||||
{% elif item.upload_type == 'contact_list' %}
|
||||
<span class="file-list-hint-large">
|
||||
{% if item.recent_job_count %}
|
||||
Used {{ iteration_count(item.recent_job_count) }}
|
||||
Used {{ item.recent_job_count|iteration_count }}
|
||||
in the last
|
||||
{{ current_service.get_days_of_retention(item.template_type) }}
|
||||
days
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{% from "components/radios.html" import radio_select %}
|
||||
{% from "components/table.html" import list_table, field, text_field, index_field, hidden_field_heading, row, row_heading %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/message-count-label.html" import message_count_label, iteration_count %}
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
{% from "components/button/macro.njk" import govukButton %}
|
||||
|
||||
{% block service_page_title %}
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
{% if jobs %}
|
||||
<p class="govuk-body">
|
||||
Used {{ iteration_count(jobs|length) }}
|
||||
Used {{ jobs|length|iteration_count }}
|
||||
in the last {{ current_service.get_days_of_retention(contact_list.template_type) }}
|
||||
days.
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user