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/income/create.html | 89 ++++++++++++++++++++++++++++++++ templates/income/table.html | 55 ++++++++++++++++++++ templates/income/update.html | 117 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 261 insertions(+) create mode 100644 templates/income/create.html create mode 100644 templates/income/table.html create mode 100644 templates/income/update.html (limited to 'templates/income') diff --git a/templates/income/create.html b/templates/income/create.html new file mode 100644 index 0000000..b74dddd --- /dev/null +++ b/templates/income/create.html @@ -0,0 +1,89 @@ +{% extends "base.html" %} + +{% block title %} + Nouveau revenu +{% endblock title %} + +{% block main %} + +
+

+ + Retour aux revenus + +

+ +
+

+ Nouveau revenu +

+ + {% if error %} +
{{ 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 new file mode 100644 index 0000000..efd82a7 --- /dev/null +++ b/templates/income/table.html @@ -0,0 +1,55 @@ +{% import "macros/paging.html" as paging %} + +{% extends "base.html" %} + +{% block title %} + Revenus +{% endblock title %} + +{% block main %} + +
+ + Nouveau + +
+ + {% if not incomes %} + +
+ Il n’y a aucun revenu. +
+ + {% 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 new file mode 100644 index 0000000..6dd649a --- /dev/null +++ b/templates/income/update.html @@ -0,0 +1,117 @@ +{% extends "base.html" %} + +{% block title %} + Revenu {{ id }} +{% endblock title %} + +{% block main %} + +
+

+ + Retour aux revenus + +

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

Modification

+ + + + + {% set user_id = form.user_id | default(value="" ~ income.user_id) %} + + + + + {% set month_index = form.month | default(value="" ~ income.month) %} + + + + + + + +
+ +
+
+ +
+

Suppression

+ + {% if is_category_used %} +

+ La catégorie ne peut pas être supprimée car elle est actuellement + utilisée. +

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