diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/calendars.html | 13 | ||||
-rw-r--r-- | templates/contact.html | 9 | ||||
-rw-r--r-- | templates/flatpages/about.html | 6 | ||||
-rw-r--r-- | templates/flatpages/default.html | 8 | ||||
-rw-r--r-- | templates/index.html | 7 | ||||
-rw-r--r-- | templates/timetable.html | 11 | ||||
-rw-r--r-- | templates/timetable_common.html | 5 |
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 – {% 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 }} – 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 }} – {% 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 }} – {% endif %}{% endblock %}celcatsanitizer</title> <link rel="stylesheet" href="{% static "celcatsanitizer/style.css" %}"> </head> @@ -23,10 +24,8 @@ {% endblock %} </div> <footer> - <p>(c) 2017 – Alban Gruin – <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 – Alban Gruin – <a href="{% url "django.contrib.flatpages.views.flatpage" url="contact/" %}">contacter</a> – celcatsanitizer {{ celcatsanitizer_version }} – <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 }} – 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 }} – {{ group }} – Semaine {{ week }} – {% 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> – <a href="{% url "rss" group.timetable.year.slug group.timetable.slug group.slug %}">RSS</a> – <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> – <a href="{% url "rss" group.timetable.year.slug group.timetable.slug group.slug %}">RSS</a> – <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 %} – 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 %} |