From 8ccd762bfc3d7da2716749d709cf5cc216882a23 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 10 Oct 2021 18:20:57 +0200 Subject: Search payments by categories explicitely It was already possible to search by categories in the full text input, but it could have matched other fields as well. Explicitely add a select to search by categories. Also put the search form in a left aside. The mobile view is not done for the moment. --- templates/income/create.html | 96 ++++++++++++++++++++++-------------------- templates/income/table.html | 73 ++++++++++++++++---------------- templates/income/update.html | 99 +++++++++++++++++++++++--------------------- 3 files changed, 140 insertions(+), 128 deletions(-) (limited to 'templates/income') diff --git a/templates/income/create.html b/templates/income/create.html index b74dddd..3c899ca 100644 --- a/templates/income/create.html +++ b/templates/income/create.html @@ -6,7 +6,7 @@ {% block main %} -
+

{{ error }}

{% endif %} - - + {% set user_id = form.user_id | default(value="" ~ connected_user.id) %} - - + {% set month_index = form.month | default(value="" ~ current_month) %} - - + - - +
- + {% endblock main %} diff --git a/templates/income/table.html b/templates/income/table.html index efd82a7..60cd6e0 100644 --- a/templates/income/table.html +++ b/templates/income/table.html @@ -8,48 +8,49 @@ {% block main %} -
+
+ + {% if not incomes %} +
+ Il n’y a aucun revenu. +
+ {% endif %} +
- Nouveau + Ajouter un revenu -
- {% if not incomes %} + {% if incomes %} +
+
+ Montant + Personne + Mois +
+ {% for income in incomes %} + + + {{ income.amount | euros() }} + + {{ income.user }} + {{ income.date }} + + {% endfor %} +
-
- Il n’y a aucun revenu. -
+ {{ paging::paging( + url="/incomes", + page=page, + max_page=max_page + ) }} + {% endif %} - {% else %} + -
-
- Montant - Personne - Mois -
- {% for income in incomes %} - - - {{ income.amount | euros() }} - - {{ income.user }} - {{ income.date }} - - {% endfor %} -
- - {{ paging::paging( - url="/incomes", - page=page, - max_page=max_page - ) }} - - {% endif %} {% endblock main %} diff --git a/templates/income/update.html b/templates/income/update.html index 6dd649a..855d5c4 100644 --- a/templates/income/update.html +++ b/templates/income/update.html @@ -6,7 +6,7 @@ {% block main %} -
+

Modification

- - + {% set user_id = form.user_id | default(value="" ~ income.user_id) %} - - + {% set month_index = form.month | default(value="" ~ income.month) %} - - - - - + + +
@@ -99,19 +105,18 @@ utilisée.

{% else %} -
+
{% endblock main %} -- cgit v1.2.3