aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/group_list.html6
-rw-r--r--templates/index.html14
-rw-r--r--templates/mention_list.html14
-rw-r--r--templates/timetable.html7
4 files changed, 17 insertions, 24 deletions
diff --git a/templates/group_list.html b/templates/group_list.html
index 2530865..aebb0db 100644
--- a/templates/group_list.html
+++ b/templates/group_list.html
@@ -1,11 +1,13 @@
{% extends "index.html" %}
{% load dt_week %}
+{% block title %}{{ timetable }} – {% endblock %}
+
{% block body %}
<h3><a href="{{ timetable.url }}">{{ timetable }}</a></h3>
<ul>
- {% for group in groups %}
+ {% for group in groups %}
<li><a class="text"{% if group.weeks is not None %} href="{% url "timetable" timetable.year.slug timetable.slug group.slug %}"{% endif %}>{{ group }}</a> &ndash; {% for week in group.weeks %}<a href="{% url "timetable" timetable.year.slug timetable.slug group.slug week.year week|dt_week %}">{{ week|dt_prettyprint }}</a> {% empty %}<em>aucun cours</em>{% endfor %}</li>
- {% endfor %}
+ {% endfor %}
</ul>
{% endblock %}
diff --git a/templates/index.html b/templates/index.html
index 6597158..43c567e 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 }} &ndash; {% 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 }} &ndash; 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>
diff --git a/templates/mention_list.html b/templates/mention_list.html
deleted file mode 100644
index 71cfaac..0000000
--- a/templates/mention_list.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{% extends "index.html" %}
-
-{% block title %}{{ year }} &ndash; {% endblock %}
-
-{% block body %}
- <h3>{{ year }} &ndash; Choisissez votre mention</h3>
- <ul>
-{% for timetable in timetables %}
- <li><a href="{% url "groups" year.slug timetable.slug %}">{{ timetable }}</a></li>
-{% empty %}
- <p>Aucun emploi du temps à afficher</p>
-{% endfor %}
- </ul>
-{% endblock %}
diff --git a/templates/timetable.html b/templates/timetable.html
index 7a30595..9143c2f 100644
--- a/templates/timetable.html
+++ b/templates/timetable.html
@@ -4,6 +4,11 @@
{% block body %}
<h2>{{ group.timetable }} &ndash; {{ group }} &ndash; Semaine {{ week }}</h2>
- <p>Dernière mise à jour le {{ last_update|date:"l j F o" }} à {{ last_update|date:"H:i" }}</p>
+ <p>
+ {% if is_old_timetable %}
+ <b><a href="{% url "timetable" group.timetable.year.slug group.timetable.slug group.slug %}">Accéder à l’emploi du temps de cette semaine.</b></a><br />
+ {% endif %}
+ Dernière mise à jour le {{ last_update|date:"l j F o" }} à {{ last_update|date:"H:i" }}
+ </p>
{% include "timetable_common.html" %}
<p class="subscribe"><a href="{% url "ics" group.timetable.year.slug group.timetable.slug group.slug %}">ICS</a> &ndash; <a href="{% url "rss" group.timetable.year.slug group.timetable.slug group.slug %}">RSS</a> &ndash; <a href="{% url "atom" group.timetable.year.slug group.timetable.slug group.slug %}">Atom</a></p>{% endblock %}