aboutsummaryrefslogtreecommitdiff
path: root/templates/index.html
diff options
context:
space:
mode:
authorAlban Gruin2018-04-21 12:59:32 +0200
committerAlban Gruin2018-04-21 15:21:33 +0200
commit7f0fa4871566050e283845ee0577603ded70df0f (patch)
tree1edd81f767182d762f41fa116eaa7797a113aaf6 /templates/index.html
parent88c1ca07d9846e43f3ce2c785a60fa85224dfe6d (diff)
templates: abstraction et séparation des templates de liste
Diffstat (limited to 'templates/index.html')
-rw-r--r--templates/index.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/templates/index.html b/templates/index.html
index 007ab35..c7c2543 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
{% block head %}{% endblock %}
- <title>{% block title %}{% if year %}{{ year }} &ndash; {% endif %}{% endblock %}celcatsanitizer</title>
+ <title>{% block title %}{% endblock %}celcatsanitizer</title>
<link rel="stylesheet" href="{% static "celcatsanitizer/style.css" %}">
</head>
<body>
@@ -13,15 +13,15 @@
</header>
<div class="content">
{% block body %}
- <h3>{% if year %}{{ year }} &ndash; Choisissez votre mention{% else %}Choisissez votre année{% endif %}</h3>
- <ul>
- {% for element in elements %}
- <li><a href="{% if year %}{% url "groups" year.slug element.slug %}{% else %}{% url "mentions" element.slug %}{% endif %}">{{ element }}</a></li>
- {% empty %}
- <p><em>Aucun emploi du temps à afficher</em></p>
- {% endfor %}
- </ul>
- {% if year %}<a href="{% url "index" %}">Retour à la liste des années</a>{% else %}<a href="{% url "rooms" %}">Emploi du temps des salles</a>{% endif %}
+ <h3>{% block pagetitle %}{% endblock %}</h3>
+ <ul>
+ {% for element in elements %}
+ <li><a href="{% block url %}{% endblock %}">{{ element }}</a></li>
+ {% empty %}
+ <p><em>{% block empty %}Aucun emploi du temps à afficher{% endblock %}</em></p>
+ {% endfor %}
+ </ul>
+ {% block navigation %}{% endblock %}
{% endblock %}
</div>
<footer>