From a6d14aa482e322fcd1946ea2541272477b4f8c6b Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sat, 21 Apr 2018 15:20:01 +0200 Subject: Ajout d’une liste complète des groupes et d’une liste des semaines --- templates/group_list.html | 7 +++++- templates/group_weeks_list.html | 8 ++++++ templates/groups_all_list.html | 6 +++++ templates/index.html | 2 +- templates/room_weeks_list.html | 7 ++++++ templates/timetable.html | 10 ++++++-- urls.py | 3 +++ views.py | 54 +++++++++++++++++++++++++++++++++++++++++ 8 files changed, 93 insertions(+), 4 deletions(-) create mode 100644 templates/group_weeks_list.html create mode 100644 templates/groups_all_list.html create mode 100644 templates/room_weeks_list.html diff --git a/templates/group_list.html b/templates/group_list.html index 35536b6..9c9a7fc 100644 --- a/templates/group_list.html +++ b/templates/group_list.html @@ -10,5 +10,10 @@
  • {{ group }} — {% for week in group.weeks %}{{ week|dt_prettyprint }} {% if not forloop.last %}– {% endif %}{% empty %}aucun cours dans le mois à venir{% endfor %}
  • {% endfor %} - {% if timetable %}Retour à la liste des mentions{% else %}Retour à la liste des années{% endif %} + {% if timetable %} + Retour à la liste des mentions – + Tous les groupes + {% else %} + Retour à la liste des années + {% endif %} {% endblock %} diff --git a/templates/group_weeks_list.html b/templates/group_weeks_list.html new file mode 100644 index 0000000..c348d5d --- /dev/null +++ b/templates/group_weeks_list.html @@ -0,0 +1,8 @@ +{% extends "index.html" %} +{% load dt_week %} + +{% block title %}Semaines du groupe {{ group }} – {% endblock %} +{% block pagetitle %}Semaines du groupe {{ group }}{% endblock %} +{% block url %}{% url "timetable" timetable.year.slug timetable.slug group.slug element.year element|dt_week %}{% endblock %} +{% block element %}{{ element|dt_prettyprint }} (semaine {{ element|dt_week }}){% endblock %} +{% block navigation %}Liste des groupes{% endblock %} diff --git a/templates/groups_all_list.html b/templates/groups_all_list.html new file mode 100644 index 0000000..36bc447 --- /dev/null +++ b/templates/groups_all_list.html @@ -0,0 +1,6 @@ +{% extends "index.html" %} + +{% block title %}Liste des groupes de {{ timetable }} – {% endblock %} +{% block pagetitle %}Liste des groupes de {{ timetable }}{% endblock %} +{% block url %}{% url "group-weeks" timetable.year.slug timetable.slug element.slug %}{% endblock %} +{% block navigation %}Retour à la liste réduite{% endblock %} diff --git a/templates/index.html b/templates/index.html index c7c2543..cdab591 100644 --- a/templates/index.html +++ b/templates/index.html @@ -16,7 +16,7 @@

    {% block pagetitle %}{% endblock %}