aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAlban Gruin2017-09-07 23:12:57 +0200
committerAlban Gruin2017-09-07 23:12:57 +0200
commit5767fe2b49858dd8174193ffa8c2e8b3fda1fc6c (patch)
tree5176298f82739e146621f8661bdf4a01f9062b0e /templates
parentdaa35602eeee6b15cea2b4e92a0556de2a1b4905 (diff)
Utilisation du modèle Year où nécessaire
Diffstat (limited to 'templates')
-rw-r--r--templates/group_list.html16
-rw-r--r--templates/index.html4
-rw-r--r--templates/mention_list.html4
3 files changed, 13 insertions, 11 deletions
diff --git a/templates/group_list.html b/templates/group_list.html
index d4c3579..d8d7227 100644
--- a/templates/group_list.html
+++ b/templates/group_list.html
@@ -1,9 +1,11 @@
{% extends "index.html" %}
+{% load dt_week %}
-{% block body %}{% for timetable in timetables %}
- <section id="{{ timetable.slug }}">
- <h3><a href="{{ timetable.url }}">{{ timetable.name }}</a></h3>
- <ul>{% for group in groups %}{% if group.timetable.id == timetable.id %}
- <li><a class="text"{% if group.weeks is not None %} href="{% url "timetable" timetable.slug group.slug %}"{% endif %}>{{ group.name }}</a> &ndash; {% for week in group.weeks %}<a href="{% url "timetable" timetable.slug group.slug week.year week|dt_week %}">{{ week|dt_prettyprint }}</a> {% empty %}<em>aucun cours</em>{% endfor %}</li>{% endif %}{% endfor %}
- </ul>
- </section>{% endfor %}{% endblock %}
+{% block body %}
+ <h3><a href="{{ timetable.url }}">{{ timetable }}</a></h3>
+ <ul>
+ {% for group in groups %}
+ <li><a class="text"{% if group.weeks is not None %} href="{% url "timetable" timetable.slug group.slug %}"{% endif %}>{{ group }}</a> &ndash; {% for week in group.weeks %}<a href="{% url "timetable" timetable.slug group.slug week.year week|dt_week %}">{{ week|dt_prettyprint }}</a> {% empty %}<em>aucun cours</em>{% endfor %}</li>
+ {% endfor %}
+ </ul>
+{% endblock %}
diff --git a/templates/index.html b/templates/index.html
index 09bb0f6..e33f92a 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,4 +1,4 @@
-{% load dt_week %}<!DOCTYPE html>
+<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8" />
@@ -63,7 +63,7 @@ li.course {
<h3>Choisissez votre année</h3>
<ul>
{% for year in years %}
- <li><a href="{% url "mentions" year.year %}">{{ year.year }}</a> <small>({{ year.count }})</small></li>
+ <li><a href="{% url "mentions" year.slug %}">{{ year }}</a></li>
{% empty %}
<p><em>Aucun emploi du temps à afficher</em></p>
{% endfor %}
diff --git a/templates/mention_list.html b/templates/mention_list.html
index 142a17a..71cfaac 100644
--- a/templates/mention_list.html
+++ b/templates/mention_list.html
@@ -3,10 +3,10 @@
{% block title %}{{ year }} &ndash; {% endblock %}
{% block body %}
- <h3>Choisissez votre mention</h3>
+ <h3>{{ year }} &ndash; Choisissez votre mention</h3>
<ul>
{% for timetable in timetables %}
- <li><a href="{% url "groups" year timetable.slug %}">{{ timetable.name }}</a></li>
+ <li><a href="{% url "groups" year.slug timetable.slug %}">{{ timetable }}</a></li>
{% empty %}
<p>Aucun emploi du temps à afficher</p>
{% endfor %}