aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/balance.html14
-rw-r--r--templates/balancing/create.html79
-rw-r--r--templates/balancing/table.html58
-rw-r--r--templates/balancing/update.html105
-rw-r--r--templates/base.html16
-rw-r--r--templates/category/create.html4
-rw-r--r--templates/category/update.html4
-rw-r--r--templates/income/create.html16
-rw-r--r--templates/income/table.html8
-rw-r--r--templates/income/update.html14
-rw-r--r--templates/macros/paging.html16
-rw-r--r--templates/payment/create.html16
-rw-r--r--templates/payment/table.html8
-rw-r--r--templates/payment/table/search.html10
-rw-r--r--templates/payment/update.html14
-rw-r--r--templates/report/list.j214
-rw-r--r--templates/report/report.j250
-rw-r--r--templates/statistics.html2
18 files changed, 315 insertions, 133 deletions
diff --git a/templates/balance.html b/templates/balance.html
index b97ea40..c7f68e8 100644
--- a/templates/balance.html
+++ b/templates/balance.html
@@ -11,7 +11,7 @@
<ul class="g-Balance__ExceedingPayers">
{% for exceeding_payer in exceeding_payers %}
<li class="g-Balance__ExceedingPayer">
- {{ exceeding_payer.0 }} : +{{ exceeding_payer.1 | euros() }}
+ {{ exceeding_payer[0] }} : +{{ exceeding_payer[1] | euros() }}
</li>
{% endfor %}
</ul>
@@ -35,14 +35,14 @@
{% for user_income in user_incomes %}
<div class="g-Table__Row">
<span class="g-Table__Cell">
- {{ user_income.0 }}
+ {{ user_income[0] }}
</span>
<span class="g-Table__Cell g-Table__NumericCell">
- {{ user_income.1 | euros() }}
+ {{ user_income[1] | euros() }}
</span>
<span class="g-Table__Cell g-Table__NumericCell">
{% if total_income > 0 %}
- {{ user_income.1 / total_income * 100 | round() }} %
+ {{ (user_income[1] / total_income * 100) | round }} %
{% else %}
{% endif %}
@@ -76,14 +76,14 @@
{% for user_payment in user_payments %}
<div class="g-Table__Row">
<span class="g-Table__Cell">
- {{ user_payment.0 }}
+ {{ user_payment[0] }}
</span>
<span class="g-Table__Cell g-Table__NumericCell">
- {{ user_payment.1 | euros() }}
+ {{ user_payment[1] | euros() }}
</span>
<span class="g-Table__Cell g-Table__NumericCell">
{% if total_payments > 0 %}
- {{ user_payment.1 / total_payments * 100 | round() }} %
+ {{ (user_payment[1] / total_payments * 100) | round }} %
{% else %}
{% endif %}
diff --git a/templates/balancing/create.html b/templates/balancing/create.html
new file mode 100644
index 0000000..c9bfdba
--- /dev/null
+++ b/templates/balancing/create.html
@@ -0,0 +1,79 @@
+{% extends "base.html" %}
+
+{% block title %}
+ Nouvel équilibrage
+{% endblock title %}
+
+{% block main %}
+
+ <section class="g-Section">
+ <p class="g-Paragraph">
+ <a
+ class="g-Link g-Media__Large"
+ href="/balancings?page={{ query.page or 1 }}"
+ >
+ Retour aux équilibrages
+ </a>
+ </p>
+
+ <form
+ class="g-Form"
+ action="/balancing/create?page={{ query.page or 1 }}"
+ method="POST"
+ >
+ <h1 class="g-H1">
+ Nouvel équilibrage
+ </h1>
+
+ {% if error %}
+ <div class="g-Form__Error">{{ error }}</div>
+ {% endif %}
+
+ <label class="g-Form__Label">
+ Montant
+ <input
+ name="amount"
+ type="number"
+ class="g-Form__Input"
+ value="{{ form.amount or "" }}"
+ min=1
+ required
+ {% if not form %} autofocus {% endif %}
+ />
+ </label>
+
+ {% set user_id = form.user_id or connected_user.id %}
+
+ <label class="g-Form__Label">
+ De
+ <select name="source" class="g-Form__Select" required>
+ {% for user in users %}
+ <option
+ value="{{ user.id }}"
+ {% if "" ~ user.id == "" ~ user_id %} selected {% endif %}
+ >
+ {{ user.name }}
+ </option>
+ {% endfor %}
+ </select>
+ </label>
+
+ <label class="g-Form__Label">
+ Vers
+ <select name="destination" class="g-Form__Select" required>
+ <option value="" disabled selected></option>
+ {% for user in users %}
+ <option value="{{ user.id }}">
+ {{ user.name }}
+ </option>
+ {% endfor %}
+ </select>
+ </label>
+
+ <div>
+ <input class="g-Button__Validate" type="submit" value="Créer" />
+ </div>
+ </form>
+ </section>
+
+{% endblock main %}
diff --git a/templates/balancing/table.html b/templates/balancing/table.html
new file mode 100644
index 0000000..07687fb
--- /dev/null
+++ b/templates/balancing/table.html
@@ -0,0 +1,58 @@
+{% import "macros/paging.html" as paging %}
+
+{% extends "base.html" %}
+
+{% block title %}
+ Équilibrages
+{% endblock title %}
+
+{% block main %}
+
+ <section class="g-Section">
+
+ {% if not balancings %}
+ <div class="g-Table__NoResults">
+ Il n’y a aucun équilibrage.
+ </div>
+ {% endif %}
+
+ <a
+ class="g-Paragraph g-Button__Validate"
+ href="/balancing?page={{ page or 1 }}"
+ >
+ Ajouter un équilibrage
+ </a>
+
+ {% if balancings %}
+ <div class="g-Table">
+ <div class="g-Table__Row g-Table__Row--Header">
+ <span class="g-Table__Cell">Montant</span>
+ <span class="g-Table__Cell">De</span>
+ <span class="g-Table__Cell">Vers</span>
+ <span class="g-Table__Cell">Date</span>
+ </div>
+ {% for balancing in balancings %}
+ <a
+ class="g-Table__Row {% if highlight == balancing.id %} g-Table__Row--Highlight {% endif %}"
+ href="/balancing/{{ balancing.id }}?page={{ page or 1 }}"
+ >
+ <span class="g-Table__Cell g-Table__NumericCell">
+ {{ balancing.amount | euros() }}
+ </span>
+ <span class="g-Table__Cell">{{ balancing.source }}</span>
+ <span class="g-Table__Cell">{{ balancing.destination }}</span>
+ <span class="g-Table__Cell">{{ balancing.date }}</span>
+ </a>
+ {% endfor %}
+ </div>
+
+ {{ paging.view(
+ url="/balancings",
+ page=page,
+ max_page=max_page
+ ) }}
+ {% endif %}
+
+ </section>
+
+{% endblock main %}
diff --git a/templates/balancing/update.html b/templates/balancing/update.html
new file mode 100644
index 0000000..9c98e93
--- /dev/null
+++ b/templates/balancing/update.html
@@ -0,0 +1,105 @@
+{% extends "base.html" %}
+
+{% block title %}
+ Équilibrage {{ id }}
+{% endblock title %}
+
+{% block main %}
+
+ <section class="g-Section">
+ <p class="g-Paragraph">
+ <a
+ class="g-Link g-Media__Large"
+ href="/balancings?page={{ query.page or 1 }}"
+ >
+ Retour aux équilibrages
+ </a>
+ </p>
+
+ {% if error %}
+ <div class="g-Form__Error">{{ error }}</div>
+ {% endif %}
+
+ {% if not balancing %}
+
+ L’équilibrage n’a pas été trouvé.
+
+ {% else %}
+
+ <form
+ class="g-Form"
+ action="/balancing/{{ balancing.id }}/update"
+ method="POST"
+ >
+ <h1 class="g-H1">Modification</h1>
+
+ <label class="g-Form__Label">
+ Montant
+ <input
+ name="amount"
+ type="number"
+ class="g-Form__Input"
+ value="{{ form.amount or balancing.amount }}"
+ min=1
+ required
+ />
+ </label>
+
+ {% set source = form.source or balancing.source %}
+
+ <label class="g-Form__Label">
+ De
+ <select name="source" class="g-Form__Select" required>
+ {% for user in users %}
+ <option
+ value="{{ user.id }}"
+ {% if "" ~ user.id == "" ~ source %} selected {% endif %}
+ >
+ {{ user.name }}
+ </option>
+ {% endfor %}
+ </select>
+ </label>
+
+ {% set destination = form.destination or balancing.destination %}
+
+ <label class="g-Form__Label">
+ Vers
+ <select name="destination" class="g-Form__Select" required>
+ {% for user in users %}
+ <option
+ value="{{ user.id }}"
+ {% if "" ~ user.id == "" ~ destination %} selected {% endif %}
+ >
+ {{ user.name }}
+ </option>
+ {% endfor %}
+ </select>
+ </label>
+
+ <div>
+ <input class="g-Button__Validate" type="submit" value="Modifier" />
+ </div>
+ </form>
+
+ <form
+ class="g-Form"
+ action="/balancing/{{ balancing.id }}/delete"
+ method="POST"
+ >
+ <h1 class="g-H1">Suppression</h1>
+
+ <label class="g-Form__Label">
+ Veuillez recopier le montant de l’équilibrage : « {{ balancing.amount }} ».
+ <input name="remove-input" class="g-Form__Input" data-name="{{ balancing.amount }}" />
+ </label>
+
+ <div>
+ <input id="remove-button" class="g-Button__Danger" type="submit" value="Supprimer" disabled />
+ </div>
+ </form>
+
+ {% endif %}
+ </section>
+
+{% endblock main %}
diff --git a/templates/base.html b/templates/base.html
index c7dc9f0..e6f38aa 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -4,8 +4,8 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Budget — {% block title %}{% endblock title %}</title>
-<link rel="stylesheet" href="{{ assets | get(key="main.css") }}">
-<link rel="icon" href="{{ assets | get(key="icon.png") }}">
+<link rel="stylesheet" href="{{ assets["main.css"] }}">
+<link rel="icon" href="{{ assets["icon.png"] }}">
{% if connected_user %}
<header class="g-Header">
@@ -52,6 +52,16 @@
</a>
<a
+ href="/balancings"
+ class="
+ g-Nav__Link
+ {% if header == "Balancing" %} g-Nav__Link--Current {% endif %}
+ "
+ >
+ Équilibrage
+ </a>
+
+ <a
href="/balance"
class="
g-Nav__Link
@@ -78,5 +88,5 @@
{% block main %}{% endblock main %}
</main>
-<script src="{{ assets | get(key="main.js") }}">
+<script src="{{ assets["main.js"] }}">
</script>
diff --git a/templates/category/create.html b/templates/category/create.html
index af95e16..f5395bf 100644
--- a/templates/category/create.html
+++ b/templates/category/create.html
@@ -27,7 +27,7 @@
<input
name="name"
class="g-Form__Input"
- value="{{ form.name | default(value="") }}"
+ value="{{ form.name or "" }}"
required
{% if not form %} autofocus {% endif %}
/>
@@ -39,7 +39,7 @@
name="color"
type="color"
class="g-Form__Input g-Form__InputColor"
- value="{{ form.color | default(value="") }}"
+ value="{{ form.color or "" }}"
required
/>
</label>
diff --git a/templates/category/update.html b/templates/category/update.html
index 48dda06..544c583 100644
--- a/templates/category/update.html
+++ b/templates/category/update.html
@@ -35,7 +35,7 @@
<input
name="name"
class="g-Form__Input"
- value="{{ form.name | default(value=category.name) }}"
+ value="{{ form.name or category.name }}"
required
/>
</label>
@@ -46,7 +46,7 @@
name="color"
type="color"
class="g-Form__Input g-Form__InputColor"
- value="{{ form.color | default(value=category.color) }}"
+ value="{{ form.color or category.color }}"
required
/>
</label>
diff --git a/templates/income/create.html b/templates/income/create.html
index 3c899ca..6ea1fb0 100644
--- a/templates/income/create.html
+++ b/templates/income/create.html
@@ -10,7 +10,7 @@
<p class="g-Paragraph">
<a
class="g-Link g-Media__Large"
- href="/incomes?page={{ query.page | default(value=1) }}"
+ href="/incomes?page={{ query.page or 1 }}"
>
Retour aux revenus
</a>
@@ -18,7 +18,7 @@
<form
class="g-Form"
- action="/income/create?page={{ query.page | default(value=1) }}"
+ action="/income/create?page={{ query.page or 1 }}"
method="POST"
>
<h1 class="g-H1">
@@ -35,13 +35,13 @@
name="amount"
type="number"
class="g-Form__Input"
- value="{{ form.amount | default(value="") }}"
+ value="{{ form.amount or "" }}"
required
{% if not form %} autofocus {% endif %}
/>
</label>
- {% set user_id = form.user_id | default(value="" ~ connected_user.id) %}
+ {% set user_id = form.user_id or connected_user.id %}
<label class="g-Form__Label">
Personne
@@ -49,7 +49,7 @@
{% for user in users %}
<option
value="{{ user.id }}"
- {% if "" ~ user.id == user_id %} selected {% endif %}
+ {% if "" ~ user.id == "" ~ user_id %} selected {% endif %}
>
{{ user.name }}
</option>
@@ -57,7 +57,7 @@
</select>
</label>
- {% set month_index = form.month | default(value="" ~ current_month) %}
+ {% set month_index = form.month or current_month %}
<label class="g-Form__Label">
Mois
@@ -65,7 +65,7 @@
{% for month in months %}
<option
value="{{ loop.index }}"
- {% if "" ~ loop.index == month_index %}
+ {% if "" ~ loop.index == "" ~ month_index %}
selected
{% endif %}
>
@@ -81,7 +81,7 @@
name="year"
type="number"
class="g-Form__Input"
- value="{{ form.year | default(value=now() | date(format="%Y")) }}"
+ value="{{ form.year or now("%Y") }}"
required
/>
</label>
diff --git a/templates/income/table.html b/templates/income/table.html
index 60cd6e0..079e80a 100644
--- a/templates/income/table.html
+++ b/templates/income/table.html
@@ -18,7 +18,7 @@
<a
class="g-Paragraph g-Button__Validate"
- href="/income?page={{ page | default(value=1) }}"
+ href="/income?page={{ page or 1 }}"
>
Ajouter un revenu
</a>
@@ -33,18 +33,18 @@
{% for income in incomes %}
<a
class="g-Table__Row {% if highlight == income.id %} g-Table__Row--Highlight {% endif %}"
- href="/income/{{ income.id }}?page={{ page | default(value=1) }}"
+ href="/income/{{ income.id }}?page={{ page or 1 }}"
>
<span class="g-Table__Cell g-Table__NumericCell">
{{ income.amount | euros() }}
</span>
- <span class="g-Table__Cell">{{ income.user }}</span>
<span class="g-Table__Cell">{{ income.date }}</span>
+ <span class="g-Table__Cell">{{ income.user }}</span>
</a>
{% endfor %}
</div>
- {{ paging::paging(
+ {{ paging.view(
url="/incomes",
page=page,
max_page=max_page
diff --git a/templates/income/update.html b/templates/income/update.html
index 855d5c4..14d76d2 100644
--- a/templates/income/update.html
+++ b/templates/income/update.html
@@ -10,7 +10,7 @@
<p class="g-Paragraph">
<a
class="g-Link g-Media__Large"
- href="/incomes?page={{ query.page | default(value=1) }}"
+ href="/incomes?page={{ query.page or 1 }}"
>
Retour aux revenus
</a>
@@ -39,12 +39,12 @@
name="amount"
type="number"
class="g-Form__Input"
- value="{{ form.amount | default(value=income.amount) }}"
+ value="{{ form.amount or income.amount }}"
required
/>
</label>
- {% set user_id = form.user_id | default(value="" ~ income.user_id) %}
+ {% set user_id = form.user_id or income.user_id %}
<label class="g-Form__Label">
Personne
@@ -52,7 +52,7 @@
{% for user in users %}
<option
value="{{ user.id }}"
- {% if "" ~ user.id == user_id %} selected {% endif %}
+ {% if "" ~ user.id == "" ~ user_id %} selected {% endif %}
>
{{ user.name }}
</option>
@@ -60,7 +60,7 @@
</select>
</label>
- {% set month_index = form.month | default(value="" ~ income.month) %}
+ {% set month_index = form.month or income.month %}
<label class="g-Form__Label">
Mois
@@ -68,7 +68,7 @@
{% for month in months %}
<option
value="{{ loop.index }}"
- {% if "" ~ loop.index == month_index %} selected {% endif %}
+ {% if "" ~ loop.index == "" ~ month_index %} selected {% endif %}
>
{{ month }}
</option>
@@ -82,7 +82,7 @@
name="year"
type="number"
class="g-Form__Input"
- value="{{ form.year | default(value=income.year) }}"
+ value="{{ form.year or income.year }}"
required
/>
</label>
diff --git a/templates/macros/paging.html b/templates/macros/paging.html
index 59ba617..840e8f4 100644
--- a/templates/macros/paging.html
+++ b/templates/macros/paging.html
@@ -1,10 +1,4 @@
-{% macro paging(url, page, max_page) %}
- {% if url is containing("?") %}
- {% set sign = "&" %}
- {% else %}
- {% set sign = "?" %}
- {% endif %}
-
+{% macro view(url, page, max_page) %}
<div class="g-Paging">
{% if page > 1 %}
<a
@@ -15,7 +9,7 @@
</a>
<a
class="g-Paging__Link g-Paging__Link--Active"
- href="{{ url }}{{ sign }}page={{ page - 1 }}"
+ href="{{ url | with_param("page", page - 1) }}"
>
</a>
@@ -33,13 +27,13 @@
{% if page < max_page %}
<a
class="g-Paging__Link g-Paging__Link--Active"
- href="{{ url }}{{ sign }}page={{ page + 1 }}"
+ href="{{ url | with_param("page", page + 1) }}"
>
</a>
<a
class="g-Paging__Link g-Paging__Link--Active"
- href="{{ url }}{{ sign }}page={{ max_page }}"
+ href="{{ url | with_param("page", max_page) }}"
>
❭❭
</a>
@@ -52,4 +46,4 @@
</span>
{% endif %}
</div>
-{% endmacro paging %}
+{% endmacro %}
diff --git a/templates/payment/create.html b/templates/payment/create.html
index 4ac73de..379662a 100644
--- a/templates/payment/create.html
+++ b/templates/payment/create.html
@@ -44,7 +44,7 @@
<input
name="name"
class="g-Form__Input"
- value="{{ form.name | default(value="") }}"
+ value="{{ form.name or "" }}"
required
{% if not form %} autofocus {% endif %}
/>
@@ -56,12 +56,12 @@
name="cost"
type="number"
class="g-Form__Input"
- value="{{ form.cost | default(value="") }}"
+ value="{{ form.cost or "" }}"
required
/>
</label>
- {% set user_id = form.user_id | default(value="" ~ connected_user.id) %}
+ {% set user_id = form.user_id or connected_user.id %}
<label class="g-Form__Label">
Personne
@@ -69,7 +69,7 @@
{% for user in users %}
<option
value="{{ user.id }}"
- {% if "" ~ user.id == user_id %}
+ {% if "" ~ user.id == "" ~ user_id %}
selected
{% endif %}
>
@@ -79,7 +79,7 @@
</select>
</label>
- {% set category_id = form.category_id | default(value="") %}
+ {% set category_id = form.category_id or "" %}
<label class="g-Form__Label">
Catégorie
@@ -88,7 +88,7 @@
{% for category in categories %}
<option
value="{{ category.id }}"
- {% if "" ~ category.id == category_id %} selected {% endif %}
+ {% if "" ~ category.id == "" ~ category_id %} selected {% endif %}
>
{{ category.name }}
</option>
@@ -96,7 +96,7 @@
</select>
</label>
- {% set date = form.date | default(value=now() | date(format="%Y-%m-%d")) %}
+ {% set date = form.date or now("%Y-%m-%d") %}
{% if query.frequency != "Monthly" %}
<label class="g-Form__Label">
@@ -120,7 +120,7 @@
<input
type="hidden"
name="frequency"
- value="{{ query.frequency | default(value="Punctual") }}"
+ value="{{ query.frequency or "Punctual" }}"
/>
<div>
diff --git a/templates/payment/table.html b/templates/payment/table.html
index 450d84b..5bdc8b3 100644
--- a/templates/payment/table.html
+++ b/templates/payment/table.html
@@ -20,7 +20,7 @@
</div>
{% else %}
<div class="g-Paragraph">
- {{ count | numeric }} paiement{{ count | pluralize }} comptabilisant {{ total_cost | euros() }}.
+ {{ count | numeric }} {{ pluralize(count, "paiement") }} comptabilisant {{ total_cost | euros() }}.
</div>
{% endif %}
@@ -81,9 +81,9 @@
{{ payment.cost | euros() }}
</span>
<span class="g-Table__Cell">{{ payment.user }}</span>
- <span
+ <span
class="g-Table__Cell g-Media__Large"
- is="colored-category"
+ is="colored-category"
data-color="{{ payment.category_color }}"
>
{{ payment.category_name }}
@@ -97,7 +97,7 @@
{% endfor %}
</div>
- {{ paging::paging(
+ {{ paging.view(
url="/" ~ payments_params(
frequency=query.frequency,
name=query.name,
diff --git a/templates/payment/table/search.html b/templates/payment/table/search.html
index 9fedb78..3516da8 100644
--- a/templates/payment/table/search.html
+++ b/templates/payment/table/search.html
@@ -17,7 +17,7 @@
type="search"
name="name"
class="g-Form__Input"
- value="{{ query.name }}"
+ value="{{ query.name or '' }}"
/>
</label>
@@ -27,7 +27,7 @@
type="number"
name="cost"
class="g-Form__Input"
- value="{{ query.cost }}"
+ value="{{ query.cost or '' }}"
/>
</label>
@@ -38,7 +38,7 @@
{% for user in users %}
<option
value="{{ user.id }}"
- {% if user.id == query.user %} selected {% endif %}
+ {% if "" ~ user.id == "" ~ query.user %} selected {% endif %}
>
{{ user.name }}
</option>
@@ -67,7 +67,7 @@
type="date"
name="start_date"
class="g-Form__Input"
- value="{{ query.start_date }}"
+ value="{{ query.start_date or '' }}"
/>
</label>
@@ -77,7 +77,7 @@
type="date"
name="end_date"
class="g-Form__Input"
- value="{{ query.end_date }}"
+ value="{{ query.end_date or '' }}"
/>
</label>
diff --git a/templates/payment/update.html b/templates/payment/update.html
index 22a4d01..0cd7a06 100644
--- a/templates/payment/update.html
+++ b/templates/payment/update.html
@@ -57,7 +57,7 @@
<input
name="name"
class="g-Form__Input"
- value="{{ form.name | default(value=payment.name) }}"
+ value="{{ form.name or payment.name }}"
required
/>
</label>
@@ -68,12 +68,12 @@
name="cost"
type="number"
class="g-Form__Input"
- value="{{ form.cost | default(value=payment.cost) }}"
+ value="{{ form.cost or payment.cost }}"
required
/>
</label>
- {% set user_id = form.user_id | default(value="" ~ payment.user_id) %}
+ {% set user_id = form.user_id or payment.user_id %}
<label class="g-Form__Label">
Personne
@@ -81,7 +81,7 @@
{% for user in users %}
<option
value="{{ user.id }}"
- {% if "" ~ user.id == user_id %} selected {% endif %}
+ {% if "" ~ user.id == "" ~ user_id %} selected {% endif %}
>
{{ user.name }}
</option>
@@ -89,7 +89,7 @@
</select>
</label>
- {% set category_id = form.category_id | default(value="" ~ payment.category_id) %}
+ {% set category_id = form.category_id or payment.category_id %}
<label class="g-Form__Label">
Catégorie
@@ -97,7 +97,7 @@
{% for category in categories %}
<option
value="{{ category.id }}"
- {% if "" ~ category.id == category_id %} selected {% endif %}
+ {% if "" ~ category.id == "" ~ category_id %} selected {% endif %}
>
{{ category.name }}
</option>
@@ -105,7 +105,7 @@
</select>
</label>
- {% set date = form.date | default(value=payment.date) %}
+ {% set date = form.date or payment.date %}
{% if payment.frequency == "Punctual" %}
<label class="g-Form__Label">
diff --git a/templates/report/list.j2 b/templates/report/list.j2
deleted file mode 100644
index ef53244..0000000
--- a/templates/report/list.j2
+++ /dev/null
@@ -1,14 +0,0 @@
-{% macro list(resource, action, xs) -%}
-
-{% if xs -%}
-
- {% set s = xs | length | pluralize -%}
-
- {{ xs | length }} {{ resource }}{{ s }} {{ action }}{{ s }} :
-
- {% for x in xs -%}
- - {{ x.date }} {{ x.name }} {{ x.amount | euros() }}
- {% endfor %}
-{% endif -%}
-
-{% endmacro paging %}
diff --git a/templates/report/report.j2 b/templates/report/report.j2
deleted file mode 100644
index d36f3ce..0000000
--- a/templates/report/report.j2
+++ /dev/null
@@ -1,50 +0,0 @@
-{% import "report/list.j2" as list %}
-
-{% if exceeding_payers -%}
-
- Équilibre :
-
- {% for exceeding_payer in exceeding_payers -%}
- - {{ exceeding_payer.0 }} : +{{ exceeding_payer.1 | euros() }}
- {% endfor %}
-{% else -%}
-
- Les paiements sont équilibrés.
-
-{% endif %}{#
-
-#}{{ list::list(
- resource="paiement",
- action="créé",
- xs=payments | filter(attribute="action", value="Created")
-) }}{#
-
-#}{{ list::list(
- resource="paiement",
- action="modifié",
- xs=payments | filter(attribute="action", value="Updated")
-) }}{#
-
-#}{{ list::list(
- resource="paiement",
- action="supprimé",
- xs=payments | filter(attribute="action", value="Deleted")
-) }}{#
-
-#}{{ list::list(
- resource="revenu",
- action="créé",
- xs=incomes | filter(attribute="action", value="Created")
-) }}{#
-
-#}{{ list::list(
- resource="revenu",
- action="modifié",
- xs=incomes | filter(attribute="action", value="Updated")
-) }}{#
-
-#}{{ list::list(
- resource="revenu",
- action="supprimé",
- xs=incomes | filter(attribute="action", value="Deleted")
-) }}
diff --git a/templates/statistics.html b/templates/statistics.html
index 21e8fcd..8f9b673 100644
--- a/templates/statistics.html
+++ b/templates/statistics.html
@@ -25,7 +25,7 @@
{{ json_payments }}
</div>
- <script src="{{ assets | get(key="chart.js") }}">
+ <script src="{{ assets["chart.js"] }}">
</script>
{% endblock main %}