aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/calendars.html13
-rw-r--r--templates/contact.html9
-rw-r--r--templates/flatpages/about.html6
-rw-r--r--templates/flatpages/default.html8
-rw-r--r--templates/index.html7
-rw-r--r--templates/timetable.html11
-rw-r--r--templates/timetable_common.html5
7 files changed, 42 insertions, 17 deletions
diff --git a/templates/calendars.html b/templates/calendars.html
new file mode 100644
index 0000000..d97ea78
--- /dev/null
+++ b/templates/calendars.html
@@ -0,0 +1,13 @@
+{% extends "index.html" %}
+
+{% block title %}ICS disponibles pour le groupe {{ group }} – {% endblock %}
+
+{% block body %}
+ <h2>ICS disponibles pour le groupe {{ group }}</h2>
+ <ul>
+ <li><a href="{% url "ics" group.timetable.year.slug group.timetable.slug group.slug %}">Un seul ICS pour tous les cours</a></li>
+{% for group in groups %}
+ <li><a href="{% url "ics-group" group.timetable.year.slug group.timetable.slug group.slug %}">ICS des cours du groupe {{ group }} uniquement</a></li>
+{% endfor %}
+ </ul>
+{% endblock %}
diff --git a/templates/contact.html b/templates/contact.html
deleted file mode 100644
index 1359a16..0000000
--- a/templates/contact.html
+++ /dev/null
@@ -1,9 +0,0 @@
-{% extends "index.html" %}
-{% load email %}
-
-{% block title %}Contacter &ndash; {% endblock %}
-
-{% block body %}
- <h3>Contacter</h3>
- <p>Pour contacter l’administrateur du service, envoyez un mail à l’adresse suivante :<br/>{{ email|format_email }}.</p>
-{% endblock %}
diff --git a/templates/flatpages/about.html b/templates/flatpages/about.html
new file mode 100644
index 0000000..3df7c53
--- /dev/null
+++ b/templates/flatpages/about.html
@@ -0,0 +1,6 @@
+{% extends "flatpages/default.html" %}
+
+{% block body %}
+ <h3>{{ flatpage.title }} &ndash; celcatsanitizer {{ celcatsanitizer_version }}</h3>
+ {{ flatpage.content }}
+{% endblock %}
diff --git a/templates/flatpages/default.html b/templates/flatpages/default.html
new file mode 100644
index 0000000..913cda9
--- /dev/null
+++ b/templates/flatpages/default.html
@@ -0,0 +1,8 @@
+{% extends "index.html" %}
+
+{% block title %}{{ flatpage.title }} &ndash; {% endblock %}
+
+{% block body %}
+ <h3>{{ flatpage.title }}</h3>
+ {{ flatpage.content }}
+{% endblock %}
diff --git a/templates/index.html b/templates/index.html
index 43c567e..71665bc 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -3,6 +3,7 @@
<head>
<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>
<link rel="stylesheet" href="{% static "celcatsanitizer/style.css" %}">
</head>
@@ -23,10 +24,8 @@
{% endblock %}
</div>
<footer>
- <p>(c) 2017 &ndash; Alban Gruin &ndash; <a href="{% url "contact" %}">contacter</a><br />
- Design inspiré par <a href="https://bestmotherfucking.website/">https://bestmotherfucking.website/</a><br />
- Les informations affichées sur ce site sont actualisées tout les jours à minuit CET.
- </p>
+ <p>(c) 2017 &ndash; Alban Gruin &ndash; <a href="{% url "django.contrib.flatpages.views.flatpage" url="contact/" %}">contacter</a> &ndash; celcatsanitizer {{ celcatsanitizer_version }} &ndash; <a href="{% url "django.contrib.flatpages.views.flatpage" url="a-propos/" %}">à propos</a><br />
+ Design inspiré par <a href="https://bestmotherfucking.website/">https://bestmotherfucking.website/</a></p>
</footer>
</body>
</html>
diff --git a/templates/timetable.html b/templates/timetable.html
index 9143c2f..fc2065f 100644
--- a/templates/timetable.html
+++ b/templates/timetable.html
@@ -1,5 +1,12 @@
{% extends "index.html" %}
+{% block head %}
+ <meta name="description" content="Emploi du temps du groupe {{ group }} &ndash; Semaine {{ week }}" />
+ <link rel="alternate" type="application/atom+xml" title="Emploi du temps du groupe {{ group }} (Atom)" href="{% url "atom" group.timetable.year.slug group.timetable.slug group.slug %}" />
+ <link rel="alternate" type="application/rss+xml" title="Emploi du temps du groupe {{ group }} (RSS)" href="{% url "rss" group.timetable.year.slug group.timetable.slug group.slug %}" />
+ <link rel="alternate" type="text/calendar" title="Emploi du temps du groupe {{ group }} (iCalendar)" href="{% url "ics" group.timetable.year.slug group.timetable.slug group.slug %}">
+{% endblock %}
+
{% block title %}{{ group.timetable }} &ndash; {{ group }} &ndash; Semaine {{ week }} &ndash; {% endblock %}
{% block body %}
@@ -8,7 +15,7 @@
{% 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" }}
+ {% if last_update %}Dernière mise à jour le {{ last_update|date:"l j F o" }} à {{ last_update|date:"H:i" }}{% endif %}
</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 %}
+ <p class="subscribe"><a href="{% url "calendars" 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 %}
diff --git a/templates/timetable_common.html b/templates/timetable_common.html
index 4319e60..62b1d71 100644
--- a/templates/timetable_common.html
+++ b/templates/timetable_common.html
@@ -4,9 +4,10 @@
<h3>{% filter title %}{{ day.0.begin|date:"l j F o" }}{% endfilter %} &ndash; de {{ day.0.begin|date:"H:i" }} à {% with day|last as last %}{{ last.end|date:"H:i" }}{% endwith %}</h3>
<ul>{% for course in day %}
<li class="course">
- <b>{{ course }}</b> ({{ course.type }}), de {{ course.begin|date:"H:i" }} à {{ course.end|date:"H:i" }}{% if course.rooms.all|length > 0 %}<br />
+ <b>{{ course }}</b>{% if course.type %} ({{ course.type }}){% endif %}, de {{ course.begin|date:"H:i" }} à {{ course.end|date:"H:i" }}{% if course.rooms.all|length > 0 %}<br />
<em>{{ course.rooms.all|format_rooms }}</em>{% endif %}{% if course.notes %}<br />
<small>Remarques : {{ course.notes }}</small>{% endif %}
</li>{% endfor %}
</ul>
- </section>{% endfor %}
+ </section>{% empty %}
+ <p>Aucun cours cette semaine.</p>{% endfor %}