diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/income/create.html | 4 | ||||
| -rw-r--r-- | templates/income/update.html | 4 | ||||
| -rw-r--r-- | templates/payment/create.html | 4 | ||||
| -rw-r--r-- | templates/payment/table/search.html | 2 | ||||
| -rw-r--r-- | templates/payment/update.html | 4 | ||||
| -rw-r--r-- | templates/report/list.j2 | 14 | ||||
| -rw-r--r-- | templates/report/report.j2 | 50 | 
7 files changed, 9 insertions, 73 deletions
diff --git a/templates/income/create.html b/templates/income/create.html index 2f57250..6ea1fb0 100644 --- a/templates/income/create.html +++ b/templates/income/create.html @@ -49,7 +49,7 @@            {% for user in users %}              <option                value="{{ user.id }}" -              {% if ("" ~ user.id) == ("" ~ user_id) %} selected {% endif %} +              {% if "" ~ user.id == "" ~ user_id %} selected {% endif %}              >                {{ user.name }}              </option> @@ -65,7 +65,7 @@            {% for month in months %}              <option                value="{{ loop.index }}" -              {% if "" ~ loop.index == month_index %} +              {% if "" ~ loop.index == "" ~ month_index %}                  selected                {% endif %}              > diff --git a/templates/income/update.html b/templates/income/update.html index f5f976e..14d76d2 100644 --- a/templates/income/update.html +++ b/templates/income/update.html @@ -52,7 +52,7 @@              {% for user in users %}                <option                  value="{{ user.id }}" -                {% if "" ~ user.id == user_id %} selected {% endif %} +                {% if "" ~ user.id == "" ~ user_id %} selected {% endif %}                >                  {{ user.name }}                </option> @@ -68,7 +68,7 @@              {% for month in months %}                <option                  value="{{ loop.index }}" -                {% if "" ~ loop.index == month_index %} selected {% endif %} +                {% if "" ~ loop.index == "" ~ month_index %} selected {% endif %}                >                  {{ month }}                </option> diff --git a/templates/payment/create.html b/templates/payment/create.html index 8d18c13..379662a 100644 --- a/templates/payment/create.html +++ b/templates/payment/create.html @@ -69,7 +69,7 @@            {% for user in users %}              <option                value="{{ user.id }}" -              {% if ("" ~ user.id) == ("" ~ user_id) %} +              {% if "" ~ user.id == "" ~ user_id %}                  selected                {% endif %}              > @@ -88,7 +88,7 @@            {% for category in categories %}              <option                value="{{ category.id }}" -              {% if "" ~ category.id == category_id %} selected {% endif %} +              {% if "" ~ category.id == "" ~ category_id %} selected {% endif %}              >                {{ category.name }}              </option> diff --git a/templates/payment/table/search.html b/templates/payment/table/search.html index cb72282..3516da8 100644 --- a/templates/payment/table/search.html +++ b/templates/payment/table/search.html @@ -38,7 +38,7 @@        {% for user in users %}          <option            value="{{ user.id }}" -          {% if user.id == query.user %} selected {% endif %} +          {% if "" ~ user.id == "" ~ query.user %} selected {% endif %}          >            {{ user.name }}          </option> diff --git a/templates/payment/update.html b/templates/payment/update.html index dfa0892..0cd7a06 100644 --- a/templates/payment/update.html +++ b/templates/payment/update.html @@ -81,7 +81,7 @@              {% for user in users %}                <option                  value="{{ user.id }}" -                {% if "" ~ user.id == user_id %} selected {% endif %} +                {% if "" ~ user.id == "" ~ user_id %} selected {% endif %}                >                  {{ user.name }}                </option> @@ -97,7 +97,7 @@              {% for category in categories %}                <option                  value="{{ category.id }}" -                {% if "" ~ category.id == category_id %} selected {% endif %} +                {% if "" ~ category.id == "" ~ category_id %} selected {% endif %}                >                  {{ category.name }}                </option> diff --git a/templates/report/list.j2 b/templates/report/list.j2 deleted file mode 100644 index d683879..0000000 --- a/templates/report/list.j2 +++ /dev/null @@ -1,14 +0,0 @@ -{% macro list(resource, action, xs) -%} - -{% if xs -%} - -  {% set l = xs | length %} - -  {{ xs | length }} {{ pluralize(l, resource) }} {{ pluralize(l, action) }} : - -  {% for x in xs -%} -    - {{ x.date }} {{ x.name }} {{ x.amount | euros() }} -  {% endfor %} -{% endif -%} - -{% endmacro %} diff --git a/templates/report/report.j2 b/templates/report/report.j2 deleted file mode 100644 index 8711184..0000000 --- a/templates/report/report.j2 +++ /dev/null @@ -1,50 +0,0 @@ -{% import "report/list.j2" as list %} - -{% if exceeding_payers -%} - -  Équilibre : - -  {% for exceeding_payer in exceeding_payers -%} -    - {{ exceeding_payer[0] }} : +{{ exceeding_payer[1] | euros() }} -  {% endfor %} -{% else -%} - -  Les paiements sont équilibrés. - -{% endif %}{# - -#}{{ list.list( -  resource="paiement", -  action="créé", -  xs=payments | filter("action", "Created") -) }}{# - -#}{{ list.list( -  resource="paiement", -  action="modifié", -  xs=payments | filter("action", "Updated") -) }}{# - -#}{{ list.list( -  resource="paiement", -  action="supprimé", -  xs=payments | filter("action", "Deleted") -) }}{# - -#}{{ list.list( -  resource="revenu", -  action="créé", -  xs=incomes | filter("action", "Created") -) }}{# - -#}{{ list.list( -  resource="revenu", -  action="modifié", -  xs=incomes | filter("action", "Updated") -) }}{# - -#}{{ list.list( -  resource="revenu", -  action="supprimé", -  xs=incomes | filter("action", "Deleted") -) }}  | 
