aboutsummaryrefslogtreecommitdiff
path: root/templates/category/table.html
blob: d4147aa81cedfd77566f8a01417b0c69f798d92e (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
{% 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"
              is="colored-category" 
              data-color="{{ category.color }}"
            >
              {{ category.name }}
            </span>
          </a>
        {% endfor %}
      </div>
    {% endif %}

  </section>

{% endblock main %}