diff options
Diffstat (limited to 'templates/income')
-rw-r--r-- | templates/income/create.html | 16 | ||||
-rw-r--r-- | templates/income/table.html | 6 | ||||
-rw-r--r-- | templates/income/update.html | 14 |
3 files changed, 18 insertions, 18 deletions
diff --git a/templates/income/create.html b/templates/income/create.html index 3c899ca..6ea1fb0 100644 --- a/templates/income/create.html +++ b/templates/income/create.html @@ -10,7 +10,7 @@ <p class="g-Paragraph"> <a class="g-Link g-Media__Large" - href="/incomes?page={{ query.page | default(value=1) }}" + href="/incomes?page={{ query.page or 1 }}" > Retour aux revenus </a> @@ -18,7 +18,7 @@ <form class="g-Form" - action="/income/create?page={{ query.page | default(value=1) }}" + action="/income/create?page={{ query.page or 1 }}" method="POST" > <h1 class="g-H1"> @@ -35,13 +35,13 @@ name="amount" type="number" class="g-Form__Input" - value="{{ form.amount | default(value="") }}" + value="{{ form.amount or "" }}" required {% if not form %} autofocus {% endif %} /> </label> - {% set user_id = form.user_id | default(value="" ~ connected_user.id) %} + {% set user_id = form.user_id or connected_user.id %} <label class="g-Form__Label"> Personne @@ -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> @@ -57,7 +57,7 @@ </select> </label> - {% set month_index = form.month | default(value="" ~ current_month) %} + {% set month_index = form.month or current_month %} <label class="g-Form__Label"> Mois @@ -65,7 +65,7 @@ {% for month in months %} <option value="{{ loop.index }}" - {% if "" ~ loop.index == month_index %} + {% if "" ~ loop.index == "" ~ month_index %} selected {% endif %} > @@ -81,7 +81,7 @@ name="year" type="number" class="g-Form__Input" - value="{{ form.year | default(value=now() | date(format="%Y")) }}" + value="{{ form.year or now("%Y") }}" required /> </label> diff --git a/templates/income/table.html b/templates/income/table.html index 60cd6e0..34ee096 100644 --- a/templates/income/table.html +++ b/templates/income/table.html @@ -18,7 +18,7 @@ <a class="g-Paragraph g-Button__Validate" - href="/income?page={{ page | default(value=1) }}" + href="/income?page={{ page or 1 }}" > Ajouter un revenu </a> @@ -33,7 +33,7 @@ {% for income in incomes %} <a class="g-Table__Row {% if highlight == income.id %} g-Table__Row--Highlight {% endif %}" - href="/income/{{ income.id }}?page={{ page | default(value=1) }}" + href="/income/{{ income.id }}?page={{ page or 1 }}" > <span class="g-Table__Cell g-Table__NumericCell"> {{ income.amount | euros() }} @@ -44,7 +44,7 @@ {% endfor %} </div> - {{ paging::paging( + {{ paging.view( url="/incomes", page=page, max_page=max_page diff --git a/templates/income/update.html b/templates/income/update.html index 855d5c4..14d76d2 100644 --- a/templates/income/update.html +++ b/templates/income/update.html @@ -10,7 +10,7 @@ <p class="g-Paragraph"> <a class="g-Link g-Media__Large" - href="/incomes?page={{ query.page | default(value=1) }}" + href="/incomes?page={{ query.page or 1 }}" > Retour aux revenus </a> @@ -39,12 +39,12 @@ name="amount" type="number" class="g-Form__Input" - value="{{ form.amount | default(value=income.amount) }}" + value="{{ form.amount or income.amount }}" required /> </label> - {% set user_id = form.user_id | default(value="" ~ income.user_id) %} + {% set user_id = form.user_id or income.user_id %} <label class="g-Form__Label"> Personne @@ -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> @@ -60,7 +60,7 @@ </select> </label> - {% set month_index = form.month | default(value="" ~ income.month) %} + {% set month_index = form.month or income.month %} <label class="g-Form__Label"> Mois @@ -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> @@ -82,7 +82,7 @@ name="year" type="number" class="g-Form__Input" - value="{{ form.year | default(value=income.year) }}" + value="{{ form.year or income.year }}" required /> </label> |