From 11052951b74b9ad4b6a9412ae490086235f9154b Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 3 Jan 2021 13:40:40 +0100 Subject: Rewrite in Rust --- templates/payment/create.html | 120 +++++++++++++++++++++++++++++++++++ templates/payment/table.html | 128 +++++++++++++++++++++++++++++++++++++ templates/payment/update.html | 144 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 392 insertions(+) create mode 100644 templates/payment/create.html create mode 100644 templates/payment/table.html create mode 100644 templates/payment/update.html (limited to 'templates/payment') diff --git a/templates/payment/create.html b/templates/payment/create.html new file mode 100644 index 0000000..aea6fcd --- /dev/null +++ b/templates/payment/create.html @@ -0,0 +1,120 @@ +{% extends "base.html" %} + +{% block title %} + Nouveau paiement +{% endblock title %} + +{% block main %} + +
+

+ + Retour aux paiements + +

+ +
+

+ Nouveau paiement + {% if query.frequency != "Monthly" %} + ponctuel + {% else %} + mensuel + {% endif %} +

+ + {% if error %} +
{{ error }}
+ {% endif %} + + + + + + + + {% set user_id = form.user_id | default(value="" ~ connected_user.id) %} + + + + + {% set category_id = form.category_id | default(value="") %} + + + + + {% set date = form.date | default(value=now() | date(format="%Y-%m-%d")) %} + + {% if query.frequency != "Monthly" %} + + + {% else %} + + {% endif %} + + + +
+ +
+
+
+ +{% endblock main %} diff --git a/templates/payment/table.html b/templates/payment/table.html new file mode 100644 index 0000000..19b56b4 --- /dev/null +++ b/templates/payment/table.html @@ -0,0 +1,128 @@ +{% import "macros/paging.html" as paging %} + +{% extends "base.html" %} + +{% block title %} + Paiements +{% endblock title %} + +{% block main %} + +
+
+
+ {% if query.frequency == "Monthly" %} + + Ponctuels + + / + + Mensuels + + {% else %} + + Ponctuels + + / + + Mensuels + + {% endif %} +
+ + {% 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 %} +
+ {% 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 + ), + page=page, + max_page=max_page + ) }} + + {% endif %} +{% endblock main %} diff --git a/templates/payment/update.html b/templates/payment/update.html new file mode 100644 index 0000000..25e6915 --- /dev/null +++ b/templates/payment/update.html @@ -0,0 +1,144 @@ +{% extends "base.html" %} + +{% block title %} + Paiement {{ id }} +{% endblock title %} + +{% block main %} + +
+

+ + Retour aux paiements + +

+ + {% if error %} +
{{ error }}
+ {% endif %} + + {% if not payment %} + + Le paiement n’a pas été trouvé. + + {% else %} + +
+

Modification

+ + + + + + + + {% set user_id = form.user_id | default(value="" ~ payment.user_id) %} + + + + + {% set category_id = form.category_id | default(value="" ~ payment.category_id) %} + + + + + {% set date = form.date | default(value=payment.date) %} + + {% if payment.frequency == "Punctual" %} + + + {% else %} + + {% endif %} + +
+ +
+
+ +
+

Suppression

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