aboutsummaryrefslogtreecommitdiff
path: root/templates/balance.html
diff options
context:
space:
mode:
authorJoris2021-01-03 13:40:40 +0100
committerJoris2021-01-03 13:54:20 +0100
commit11052951b74b9ad4b6a9412ae490086235f9154b (patch)
tree64526ac926c1bf470ea113f6cac8a33158684e8d /templates/balance.html
parent371449b0e312a03162b78797b83dee9d81706669 (diff)
Rewrite in Rust
Diffstat (limited to 'templates/balance.html')
-rw-r--r--templates/balance.html107
1 files changed, 107 insertions, 0 deletions
diff --git a/templates/balance.html b/templates/balance.html
new file mode 100644
index 0000000..15da854
--- /dev/null
+++ b/templates/balance.html
@@ -0,0 +1,107 @@
+{% extends "base.html" %}
+
+{% block title %}
+ Équilibre
+{% endblock title %}
+
+{% block main %}
+
+ <div>
+ {% if exceeding_payers %}
+ <ul class="g-Balance__ExceedingPayers">
+ {% for exceeding_payer in exceeding_payers %}
+ <li class="g-Balance__ExceedingPayer">
+ {{ exceeding_payer.0 }} : +{{ exceeding_payer.1 | euros() }}
+ </li>
+ {% endfor %}
+ </ul>
+ {% else %}
+ <p class="g-Paragraph">
+ Les paiements sont équilibrés.
+ </p>
+ {% endif %}
+
+ {% if incomes_from %}
+ <h1 class="g-Title">
+ Revenus
+ </h1>
+
+ <div class="g-Table">
+ <div class="g-Table__Row g-Table__Row--Header">
+ <span class="g-Table__Cell"></span>
+ <span class="g-Table__Cell">Montant</span>
+ <span class="g-Table__Cell">Part</span>
+ </div>
+ {% for user_income in user_incomes %}
+ <div class="g-Table__Row">
+ <span class="g-Table__Cell">
+ {{ user_income.0 }}
+ </span>
+ <span class="g-Table__Cell g-Table__NumericCell">
+ {{ user_income.1 | euros() }}
+ </span>
+ <span class="g-Table__Cell g-Table__NumericCell">
+ {% if total_income > 0 %}
+ {{ user_income.1 / total_income * 100 | round() }} %
+ {% else %}
+ –
+ {% endif %}
+ </span>
+ </div>
+ {% endfor %}
+ <div class="g-Table__Row">
+ <span class="g-Table__Cell">
+ Total
+ </span>
+ <span class="g-Table__Cell g-Table__NumericCell">
+ {{ total_income | euros() }}
+ </span>
+ <span class="g-Table__Cell g-Table__NumericCell">
+ 100 %
+ </span>
+ </div>
+ </div>
+ {% endif %}
+
+ <h1 class="g-Title">
+ Paiements
+ </h1>
+
+ <div class="g-Table">
+ <div class="g-Table__Row g-Table__Row--Header">
+ <span class="g-Table__Cell"></span>
+ <span class="g-Table__Cell">Montant</span>
+ <span class="g-Table__Cell">Part</span>
+ </div>
+ {% for user_payment in user_payments %}
+ <div class="g-Table__Row">
+ <span class="g-Table__Cell">
+ {{ user_payment.0 }}
+ </span>
+ <span class="g-Table__Cell g-Table__NumericCell">
+ {{ user_payment.1 | euros() }}
+ </span>
+ <span class="g-Table__Cell g-Table__NumericCell">
+ {% if total_payments > 0 %}
+ {{ user_payment.1 / total_payments * 100 | round() }} %
+ {% else %}
+ –
+ {% endif %}
+ </span>
+ </div>
+ {% endfor %}
+ <div class="g-Table__Row">
+ <span class="g-Table__Cell">
+ Total
+ </span>
+ <span class="g-Table__Cell g-Table__NumericCell">
+ {{ total_payments | euros() }}
+ </span>
+ <span class="g-Table__Cell g-Table__NumericCell">
+ 100 %
+ </span>
+ </div>
+ </div>
+ </div>
+
+{% endblock main %}