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/payment/table.html | 259 +++++++++++++++++++++---------------------- 1 file changed, 129 insertions(+), 130 deletions(-) (limited to 'templates/payment/table.html') diff --git a/templates/payment/table.html b/templates/payment/table.html index 5234e05..da15b22 100644 --- a/templates/payment/table.html +++ b/templates/payment/table.html @@ -8,139 +8,138 @@ {% block main %} -
-
-
- {% if query.frequency == "Monthly" %} - - Ponctuels - - / - - Mensuels - - {% else %} - - Ponctuels - - / - - Mensuels - - {% endif %} + + +
+ {% if not payments %} + +
+ Aucun paiement ne correspond à votre recherche.
- {% if query.frequency != "Monthly" %} - - {% endif %} -
- - - Nouveau - -
- - {% if not payments %} - -
- Aucun paiement ne correspond à votre recherche. -
- - {% else %} - -
- {{ count | numeric }} paiement{{ count | pluralize }} comptabilisant {{ total_cost | euros() }}. -
- -
-
- Nom - Coût - Personne - Catégorie - {% if query.frequency != "Monthly" %} - Date - {% endif %} + + Nouveau + + + {% else %} + +
+ {{ count | numeric }} paiement{{ count | pluralize }} comptabilisant {{ total_cost | euros() }}.
- {% for payment in payments %} - - {{ payment.name }} - - {{ payment.cost | euros() }} - - {{ payment.user }} - - - {{ payment.category_name }} - - + + + Ajouter un paiement + + +
+
+ Nom + Coût + Personne + Catégorie {% if query.frequency != "Monthly" %} - - {{ payment.date }} - + Date {% endif %} - - {% endfor %} -
- - {{ paging::paging( - url="/" ~ payments_params( - search=query.search, - frequency=query.frequency, - category=query.category - ), - page=page, - max_page=max_page - ) }} - - {% endif %} +
+ {% for payment in payments %} + + {{ payment.name }} + + {{ payment.cost | euros() }} + + {{ payment.user }} + + + {{ payment.category_name }} + + + {% if query.frequency != "Monthly" %} + + {{ payment.date }} + + {% endif %} + + {% endfor %} +
+ + {{ paging::paging( + url="/" ~ payments_params( + search=query.search, + frequency=query.frequency, + category=query.category + ), + page=page, + max_page=max_page + ) }} + + {% endif %} + + {% endblock main %} -- cgit v1.2.3