diff options
author | Joris | 2025-01-26 17:58:57 +0100 |
---|---|---|
committer | Joris | 2025-01-26 17:58:57 +0100 |
commit | 24eeb54a6b7159964e8887ade7fa5173b50feb3a (patch) | |
tree | 91af6253df784445db9b084b02b38b37a83224e8 /templates/report | |
parent | c5759f348e70cf54b4bfa4cd17e1fe1828ead30a (diff) |
Replace tera by minijinjamain
tera was doing the job all right, but minijinja has fewer dependencies.
Diffstat (limited to 'templates/report')
-rw-r--r-- | templates/report/list.j2 | 6 | ||||
-rw-r--r-- | templates/report/report.j2 | 26 |
2 files changed, 16 insertions, 16 deletions
diff --git a/templates/report/list.j2 b/templates/report/list.j2 index ef53244..d683879 100644 --- a/templates/report/list.j2 +++ b/templates/report/list.j2 @@ -2,13 +2,13 @@ {% if xs -%} - {% set s = xs | length | pluralize -%} + {% set l = xs | length %} - {{ xs | length }} {{ resource }}{{ s }} {{ action }}{{ s }} : + {{ xs | length }} {{ pluralize(l, resource) }} {{ pluralize(l, action) }} : {% for x in xs -%} - {{ x.date }} {{ x.name }} {{ x.amount | euros() }} {% endfor %} {% endif -%} -{% endmacro paging %} +{% endmacro %} diff --git a/templates/report/report.j2 b/templates/report/report.j2 index d36f3ce..8711184 100644 --- a/templates/report/report.j2 +++ b/templates/report/report.j2 @@ -5,7 +5,7 @@ Équilibre : {% for exceeding_payer in exceeding_payers -%} - - {{ exceeding_payer.0 }} : +{{ exceeding_payer.1 | euros() }} + - {{ exceeding_payer[0] }} : +{{ exceeding_payer[1] | euros() }} {% endfor %} {% else -%} @@ -13,38 +13,38 @@ {% endif %}{# -#}{{ list::list( +#}{{ list.list( resource="paiement", action="créé", - xs=payments | filter(attribute="action", value="Created") + xs=payments | filter("action", "Created") ) }}{# -#}{{ list::list( +#}{{ list.list( resource="paiement", action="modifié", - xs=payments | filter(attribute="action", value="Updated") + xs=payments | filter("action", "Updated") ) }}{# -#}{{ list::list( +#}{{ list.list( resource="paiement", action="supprimé", - xs=payments | filter(attribute="action", value="Deleted") + xs=payments | filter("action", "Deleted") ) }}{# -#}{{ list::list( +#}{{ list.list( resource="revenu", action="créé", - xs=incomes | filter(attribute="action", value="Created") + xs=incomes | filter("action", "Created") ) }}{# -#}{{ list::list( +#}{{ list.list( resource="revenu", action="modifié", - xs=incomes | filter(attribute="action", value="Updated") + xs=incomes | filter("action", "Updated") ) }}{# -#}{{ list::list( +#}{{ list.list( resource="revenu", action="supprimé", - xs=incomes | filter(attribute="action", value="Deleted") + xs=incomes | filter("action", "Deleted") ) }} |