diff options
author | Alban Gruin | 2017-01-22 12:22:14 +0100 |
---|---|---|
committer | Alban Gruin | 2017-01-22 12:22:14 +0100 |
commit | 9e8d4c492b0178214fb1997ff46335cfd4015557 (patch) | |
tree | 5b703ec4a712e3a19e0549354a017aa38b3258ff /templates/timetable.html | |
parent | df2b69af6923aa9ef00e4e3070a28906b17593fc (diff) |
Affichage des jours et des horaires sur la page des emplois du temps
Nouveau design inspiré par https://bestmotherfucking.website/
Utilisation des templates héritées
Diffstat (limited to 'templates/timetable.html')
-rw-r--r-- | templates/timetable.html | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/templates/timetable.html b/templates/timetable.html index 23de166..f4be3a3 100644 --- a/templates/timetable.html +++ b/templates/timetable.html @@ -1,16 +1,12 @@ -<!DOCTYPE html> -<html lang="fr"> - <head> - <meta charset="utf-8" /> - <title>{{ timetable.name }} – {{ group.name }} – celcatsanitizer</title> - </head> - <body> - <h1>celcatsanitizer</h1> - <h3>{{ timetable.name }} – {{ group.name }}</h3> - <ul> - {% for course in courses %} - <li>{{ course.name }}</li> - {% endfor %} - </ul> - </body> -</html> +{% extends "index.html" %} + +{% block title %}{{ timetable.name }} – {{ group.name }} – Semaine {{ week }} – {% endblock %} + +{% block body %} + <h2>{{ timetable.name }} – {{ group.name }} – Semaine {{ week }}</h2>{% for day in courses %} + <section> + <h3>{{ day.0.begin|date:"l j F o" }} – 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.name }}</b>, de {{ course.begin|date:"H:i" }} à {{ course.end|date:"H:i" }}{% if course.rooms.all|length > 0 %}<br /><em>Salle{% if course.rooms.all|length > 1 %}s{% endif %} {% for room in course.rooms.all %}{{ room }} {% endfor %}</em>{% endif %}</li>{% endfor %} + </ul> + </section>{% endfor %}{% endblock %} |