aboutsummaryrefslogtreecommitdiff
path: root/templates/category/table.html
blob: e05c84b63879d8762e9d484970d08b8b056547c3 (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
{% extends "base.html" %}

{% block title %}
  Catégories
{% endblock title %}

{% block main %}

  <section class="g-Section">

    {% if not categories %}
      <div class="g-Table__NoResults">
        Il n’y a aucune catégorie.
      </div>
    {% endif %}

    <div class="g-Paragraph">
      <a class="g-Button__Validate" href="/category">Ajouter une catégorie</a>
    </div>

    {% if categories %}
      <div class="g-Table">
        {% for category in categories %}
          <a
            class="g-Table__Row {% if highlight == category.id %} g-Table__Row--Highlight {% endif %}"
            href="/category/{{ category.id }}"
          >
            <span
              class="g-Table__Cell"
              style="color: {{ category.color }}"
            >
              {{ category.name }}
            </span>
          </a>
        {% endfor %}
      </div>
    {% endif %}

  </section>

{% endblock main %}