diff options
author | Alban Gruin | 2018-04-21 15:20:01 +0200 |
---|---|---|
committer | Alban Gruin | 2018-04-21 15:21:33 +0200 |
commit | a6d14aa482e322fcd1946ea2541272477b4f8c6b (patch) | |
tree | e8c32f4c75853e6917ea25ab35fdddb99b6a92cf /templates | |
parent | 7f0fa4871566050e283845ee0577603ded70df0f (diff) |
Ajout d’une liste complète des groupes et d’une liste des semaines
Diffstat (limited to 'templates')
-rw-r--r-- | templates/group_list.html | 7 | ||||
-rw-r--r-- | templates/group_weeks_list.html | 8 | ||||
-rw-r--r-- | templates/groups_all_list.html | 6 | ||||
-rw-r--r-- | templates/index.html | 2 | ||||
-rw-r--r-- | templates/room_weeks_list.html | 7 | ||||
-rw-r--r-- | templates/timetable.html | 10 |
6 files changed, 36 insertions, 4 deletions
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 @@ <li><a class="text"{% if group.weeks is not None %} href="{% if timetable %}{% url "timetable" timetable.year.slug timetable.slug group.slug %}{% else %}{% url "room-timetable" group.slug %}{% endif %}"{% endif %}>{{ group }}</a> — {% for week in group.weeks %}<a href="{% if timetable %}{% url "timetable" timetable.year.slug timetable.slug group.slug week.year week|dt_week %}{% else %}{% url "room-timetable" group.slug week.year week|dt_week %}{% endif %}">{{ week|dt_prettyprint }}</a> {% if not forloop.last %}– {% endif %}{% empty %}<em>aucun cours dans le mois à venir</em>{% endfor %}</li> {% endfor %} </ul> - {% if timetable %}<a href="{% url "mentions" timetable.year.slug %}">Retour à la liste des mentions</a>{% else %}<a href="{% url "index" %}">Retour à la liste des années</a>{% endif %} + {% if timetable %} + <a href="{% url "mentions" timetable.year.slug %}">Retour à la liste des mentions</a> – + <a href="{% url "groups-all" timetable.year.slug timetable.slug %}">Tous les groupes</a> + {% else %} + <a href="{% url "index" %}">Retour à la liste des années</a> + {% 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 %}<a href="{% url "groups" timetable.year.slug timetable.slug %}">Liste des groupes</a>{% 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 %}<a href="{% url "groups" timetable.year.slug timetable.slug %}">Retour à la liste réduite</a>{% 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 @@ <h3>{% block pagetitle %}{% endblock %}</h3> <ul> {% for element in elements %} - <li><a href="{% block url %}{% endblock %}">{{ element }}</a></li> + <li><a href="{% block url %}{% endblock %}">{% block element %}{{ element }}{% endblock %}</a></li> {% empty %} <p><em>{% block empty %}Aucun emploi du temps à afficher{% endblock %}</em></p> {% endfor %} diff --git a/templates/room_weeks_list.html b/templates/room_weeks_list.html new file mode 100644 index 0000000..6a4c3d9 --- /dev/null +++ b/templates/room_weeks_list.html @@ -0,0 +1,7 @@ +{% extends "group_weeks_list.html" %} +{% load dt_week %} + +{% block title %}Semaines de la salle {{ room }} – {% endblock %} +{% block pagetitle %}Semaines de la salle {{ room }}{% endblock %} +{% block url %}{% url "room-timetable" room.slug element.year element|dt_week %}{% endblock %} +{% block navigation %}<a href="{% url "rooms" %}">Liste des salles</a>{% endblock %} diff --git a/templates/timetable.html b/templates/timetable.html index 4bb3e10..a6dc1ab 100644 --- a/templates/timetable.html +++ b/templates/timetable.html @@ -31,15 +31,21 @@ <a href="{% if group_mode %}{% url "timetable" timetable.year.slug timetable.slug group.slug last_week.year last_week|dt_week %}{% else %}{% url "room-timetable" group.slug last_week.year last_week|dt_week %}{% endif %}"> Semaine {{ last_week|dt_week }} </a> - {% if next_week is not None %} – {% endif %} + – {% endif %} {% if next_week is not None %} <a href="{% if group_mode %}{% url "timetable" timetable.year.slug timetable.slug group.slug next_week.year next_week|dt_week %}{% else %}{% url "room-timetable" group.slug next_week.year next_week|dt_week %}{% endif %}"> Semaine {{ next_week|dt_week }} </a> + – {% endif %} {% if group_mode %} - {% if last_week is not None or next_week is not None %}<br />{% endif %} + <a href="{% url "group-weeks" timetable.year.slug timetable.slug group.slug %}">Liste des semaines</a> + {% else %} + <a href="{% url "room-weeks" group.slug %}">Liste des semaines</a> + {% endif %} + <br /> + {% if group_mode %} <a href="{% url "calendars" timetable.year.slug timetable.slug group.slug %}">ICS</a> – <a href="{% url "rss" timetable.year.slug timetable.slug group.slug %}">RSS</a> – <a href="{% url "atom" timetable.year.slug timetable.slug group.slug %}">Atom</a> |