From 6e695bf7a0253b4f6d1db78fa4310616d8a1357f Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 10 Oct 2021 19:27:22 +0200 Subject: Search by name, cost and user --- templates/payment/create.html | 3 +- templates/payment/table.html | 91 +++++++++---------------------------- templates/payment/table/search.html | 68 +++++++++++++++++++++++++++ templates/payment/update.html | 9 ++-- 4 files changed, 97 insertions(+), 74 deletions(-) create mode 100644 templates/payment/table/search.html (limited to 'templates/payment') diff --git a/templates/payment/create.html b/templates/payment/create.html index 8defad3..4fc3245 100644 --- a/templates/payment/create.html +++ b/templates/payment/create.html @@ -12,7 +12,8 @@ class="g-Link g-Media__Large" href="/{{ payments_params( page=query.page, - search=query.search, + name=query.name, + cost=query.cost, frequency=query.frequency ) }}" > diff --git a/templates/payment/table.html b/templates/payment/table.html index da15b22..c187f17 100644 --- a/templates/payment/table.html +++ b/templates/payment/table.html @@ -9,84 +9,34 @@ {% block main %}
- {% if not payments %} -
+ {% if not payments %} +
Aucun paiement ne correspond à votre recherche.
- - - Nouveau - - {% else %} -
{{ count | numeric }} paiement{{ count | pluralize }} comptabilisant {{ total_cost | euros() }}.
+ {% endif %} - - Ajouter un paiement - - + + Ajouter un paiement + + + {% if payments %}
Nom @@ -102,7 +52,8 @@ class="g-Table__Row {% if query.highlight == payment.id %} g-Table__Row--Highlight {% endif %}" href="/payment/{{ payment.id }}{{ payments_params( page=query.page, - search=query.search, + name=query.name, + cost=query.cost, frequency=query.frequency ) }}" > @@ -131,14 +82,14 @@ {{ paging::paging( url="/" ~ payments_params( - search=query.search, + name=query.name, + cost=query.cost, frequency=query.frequency, category=query.category ), page=page, max_page=max_page ) }} - {% endif %}
diff --git a/templates/payment/table/search.html b/templates/payment/table/search.html new file mode 100644 index 0000000..8805cbb --- /dev/null +++ b/templates/payment/table/search.html @@ -0,0 +1,68 @@ +
+ + + + + + + + + + + + + +
diff --git a/templates/payment/update.html b/templates/payment/update.html index 4e244f4..002117e 100644 --- a/templates/payment/update.html +++ b/templates/payment/update.html @@ -12,7 +12,8 @@ class="g-Link g-Media__Large" href="/{{ payments_params( page=query.page, - search=query.search, + name=query.name, + cost=query.cost, frequency=query.frequency ) }}" > @@ -34,7 +35,8 @@ class="g-Form" action="/payment/{{ payment.id }}/update{{ payments_params( page=query.page, - search=query.search, + name=query.name, + cost=query.cost, frequency=query.frequency, highlight=query.highlight ) }}" @@ -126,7 +128,8 @@ class="g-Form" action="/payment/{{ payment.id }}/delete{{ payments_params( page=query.page, - search=query.search, + name=query.name, + cost=query.cost, frequency=query.frequency, highlight=query.highlight ) }}" -- cgit v1.2.3