diff options
author | Alban Gruin | 2017-09-28 22:27:50 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-28 22:27:50 +0200 |
commit | 1d5068de5e4babb8c2c969c626fd1d8b53bc28ea (patch) | |
tree | 105d9ba1f39a8fc6b07495373cc33d2286e0d673 /templates/index.html | |
parent | 30b58f8b8229c7ac62d886dfd79cbf7ec027f6f2 (diff) |
Mise en commun de la template de sélection de l’année et de la mention
Diffstat (limited to 'templates/index.html')
-rw-r--r-- | templates/index.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/templates/index.html b/templates/index.html index efbb21c..8d7634e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> - <title>{% block title %}{% endblock %}celcatsanitizer</title> + <title>{% block title %}{% if year %}{{ year }} – {% endif %}{% endblock %}celcatsanitizer</title> <link rel="stylesheet" href="{% static "celcatsanitizer/style.css" %}"> </head> <body> @@ -12,13 +12,13 @@ </header> <div class="content"> {% block body %} - <h3>Choisissez votre année</h3> + <h3>{% if year %}{{ year }} – Choisissez votre mention{% else %}Choisissez votre année{% endif %}</h3> <ul> - {% for year in years %} - <li><a href="{% url "mentions" year.slug %}">{{ year }}</a></li> - {% empty %} - <p><em>Aucun emploi du temps à afficher</em></p> - {% endfor %} + {% 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> {% endblock %} </div> |