aboutsummaryrefslogtreecommitdiff
path: root/templates/income/table.html
blob: efd82a701f9f64a37075652d559a2cae7976027d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{% import "macros/paging.html" as paging %}

{% extends "base.html" %}

{% block title %}
  Revenus
{% endblock title %}

{% block main %}

  <div class="g-Paragraph g-Payments__Header">
    <a
      class="g-Button__Validate"
      href="/income?page={{ page | default(value=1) }}"
    >
      Nouveau
    </a>
  </div>

  {% if not incomes %}

    <div class="g-Payments__NoResults">
      Il n’y a aucun revenu.
    </div>

  {% else %}

    <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">Personne</span>
        <span class="g-Table__Cell">Mois</span>
      </div>
      {% 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) }}"
        >
          <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>
        </a>
      {% endfor %}
    </div>

    {{ paging::paging(
      url="/incomes",
      page=page,
      max_page=max_page
    ) }}

  {% endif %}
{% endblock main %}