diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/calendars.html | 9 | ||||
-rw-r--r-- | templates/group_list.html | 17 | ||||
-rw-r--r-- | templates/group_weeks_list.html | 8 | ||||
-rw-r--r-- | templates/groups_all_list.html | 6 | ||||
-rw-r--r-- | templates/index.html | 19 | ||||
-rw-r--r-- | templates/mention_list.html | 6 | ||||
-rw-r--r-- | templates/qsjps.html | 8 | ||||
-rw-r--r-- | templates/qsjps_form.html | 19 | ||||
-rw-r--r-- | templates/room_list.html | 9 | ||||
-rw-r--r-- | templates/room_weeks_list.html | 7 | ||||
-rw-r--r-- | templates/timetable.html | 51 | ||||
-rw-r--r-- | templates/timetable_common.html | 4 | ||||
-rw-r--r-- | templates/year_list.html | 5 |
13 files changed, 139 insertions, 29 deletions
diff --git a/templates/calendars.html b/templates/calendars.html index d97ea78..e6fcd9f 100644 --- a/templates/calendars.html +++ b/templates/calendars.html @@ -4,10 +4,15 @@ {% block body %} <h2>ICS disponibles pour le groupe {{ group }}</h2> + <p> + Le format ICS (ou iCalendar) permet d’importer un calendrier + dans un agenda électronique.<br /> + <a href="https://fr.wikipedia.org/wiki/ICalendar">En savoir plus</a> + </p> <ul> - <li><a href="{% url "ics" group.timetable.year.slug group.timetable.slug group.slug %}">Un seul ICS pour tous les cours</a></li> + <li><a href="{% url "ics" timetable.year.slug 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> + <li><a href="{% url "ics-group" timetable.year.slug timetable.slug group.slug %}">ICS des cours du groupe {{ group }} uniquement</a></li> {% endfor %} </ul> {% endblock %} diff --git a/templates/group_list.html b/templates/group_list.html index f21b2b1..d88f144 100644 --- a/templates/group_list.html +++ b/templates/group_list.html @@ -2,12 +2,15 @@ {% load dt_week %} {% block title %}{{ timetable }} – {% endblock %} +{% block pagetitle %}<a href="{{ timetable.source.url }}">{{ timetable }}</a>{% endblock %} -{% block body %} - <h3><a href="{{ timetable.url }}">{{ timetable }}</a></h3> - <ul> - {% for group in groups %} - <li><a class="text"{% if group.weeks is not None %} href="{% url "timetable" timetable.year.slug timetable.slug group.slug %}"{% endif %}>{{ group }}</a> — {% for week in group.weeks %}<a href="{% url "timetable" timetable.year.slug timetable.slug group.slug week.year week|dt_week %}">{{ week|dt_prettyprint }}</a> {% if not forloop.last %}– {% endif %}{% empty %}<em>aucun cours dans le mois à venir</em>{% endfor %}</li> - {% endfor %} - </ul> +{% block lelement %}<a class="text"{% if element.weeks is not None %} href="{% block gurl %}{% url "timetable" timetable.year.slug timetable.slug element.slug %}{% endblock %}"{% endif %}>{{ element }}</a> — +{% for week in element.weeks %} + <a href="{% block wurl %}{% url "timetable" timetable.year.slug timetable.slug element.slug week.year week|dt_week %}{% endblock %}">{{ week|date:"Y/m/d" }}</a> {% if not forloop.last %}– {% endif %} +{% empty %} + <em>aucun cours dans le mois à venir</em> +{% endfor %} {% endblock %} + +{% block navigation %}<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>{% endblock %} diff --git a/templates/group_weeks_list.html b/templates/group_weeks_list.html new file mode 100644 index 0000000..baf312e --- /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|date:"Y/m/d" }} (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 081f663..e86038e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,7 +4,7 @@ <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> + <title>{% block title %}{% endblock %}celcatsanitizer</title> <link rel="stylesheet" href="{% static "celcatsanitizer/style.css" %}"> </head> <body> @@ -13,14 +13,15 @@ </header> <div class="content"> {% block body %} - <h3>{% if year %}{{ year }} – Choisissez votre mention{% else %}Choisissez votre année{% endif %}</h3> - <ul> - {% for element in elements %} - <li><a href="{% if year %}{% url "groups" year.slug element.slug %}{% else %}{% url "mentions" element.slug %}{% endif %}">{{ element }}</a></li> - {% empty %} - <p><em>Aucun emploi du temps à afficher</em></p> - {% endfor %} - </ul> + <h3>{% block pagetitle %}{% endblock %}</h3> + <ul> + {% for element in elements %} + <li>{% block lelement %}<a href="{% block url %}{% endblock %}">{% block element %}{{ element }}{% endblock %}</a>{% endblock %}</li> + {% empty %} + <p><em>{% block empty %}Aucun emploi du temps à afficher{% endblock %}</em></p> + {% endfor %} + </ul> + {% block navigation %}{% endblock %} {% endblock %} </div> <footer> diff --git a/templates/mention_list.html b/templates/mention_list.html new file mode 100644 index 0000000..3b9d8e8 --- /dev/null +++ b/templates/mention_list.html @@ -0,0 +1,6 @@ +{% extends "index.html" %} + +{% block title %}{{ year }} – {% endblock %} +{% block pagetitle %}{{ year }} – Choississez votre mention{% endblock %} +{% block url %}{% url "groups" year.slug element.slug %}{% endblock %} +{% block navigation %}<a href="{% url "index" %}">Retour à la liste des années</a>{% endblock %} diff --git a/templates/qsjps.html b/templates/qsjps.html new file mode 100644 index 0000000..9fbdf8a --- /dev/null +++ b/templates/qsjps.html @@ -0,0 +1,8 @@ +{% extends "index.html" %} +{% load dt_week %} + +{% block title %}Trouver une salle – {% endblock %} +{% block pagetitle %}Trouver une salle entre {{ form.begin.value }} et {{ form.end.value }}</h3>{% endblock %} +{% block url %}{% url "room-timetable" element.slug form.cleaned_data.day.year form.cleaned_data.day|dt_week %}{% endblock %} +{% block navigation %}<a href="{% url "rooms" %}">Retour à la liste des salles</a> – +<a href="{% url "qsjps" %}">Nouvelle recherche</a>{% endblock %} diff --git a/templates/qsjps_form.html b/templates/qsjps_form.html new file mode 100644 index 0000000..280a7ad --- /dev/null +++ b/templates/qsjps_form.html @@ -0,0 +1,19 @@ +{% extends "index.html" %} + +{% block title %}Trouver une salle – {% endblock %} + +{% block body %} + <h3>Trouver une salle</h3> + <form action="{% url "qsjps" %}" method="post"> + <table> + {% for field in form.visible_fields %} + <tr> + <th>{{ field.label_tag }}</th> + <td>{{ field }}{% if field.errors %}<br /><small>{{ field.errors|join:" " }}</small>{% endif %}</td> + </tr> + {% endfor %} + <tr><th></th><td><input type="submit" value="Trouver une salle" /></td></tr> + </table> + </form> + <a href="{% url "rooms" %}">Retour à la liste des salles</a> +{% endblock %} diff --git a/templates/room_list.html b/templates/room_list.html new file mode 100644 index 0000000..1b8497d --- /dev/null +++ b/templates/room_list.html @@ -0,0 +1,9 @@ +{% extends "group_list.html" %} +{% load dt_week %} + +{% block title %}Emploi du temps des salles – {% endblock %} +{% block pagetitle %}Emploi du temps des salles{% endblock %} +{% block gurl %}{% url "room-timetable" element.slug %}{% endblock %} +{% block wurl %}{% url "room-timetable" element.slug week.year week|dt_week %}{% endblock %} +{% block navigation %}<a href="{% url "index" %}">Retour à la liste des années</a> – +<a href="{% url "qsjps" %}">Trouver une salle libre</a>{% endblock %} 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 fc2065f..a6dc1ab 100644 --- a/templates/timetable.html +++ b/templates/timetable.html @@ -1,21 +1,54 @@ {% extends "index.html" %} +{% load dt_week %} -{% block head %} +{% block head %}{% if group_mode %} <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 %} + <link rel="alternate" type="application/atom+xml" title="Emploi du temps du groupe {{ group }} (Atom)" href="{% url "atom" timetable.year.slug timetable.slug group.slug %}" /> + <link rel="alternate" type="application/rss+xml" title="Emploi du temps du groupe {{ group }} (RSS)" href="{% url "rss" timetable.year.slug timetable.slug group.slug %}" /> + <link rel="alternate" type="text/calendar" title="Emploi du temps du groupe {{ group }} (iCalendar)" href="{% url "ics" timetable.year.slug timetable.slug group.slug %}"> +{% endif %}{% endblock %} -{% block title %}{{ group.timetable }} – {{ group }} – Semaine {{ week }} – {% endblock %} +{% block title %}{% if group_mode %}{{ timetable }} –{% else %}Salle{% endif %} {{ group }} – Semaine {{ week }} – {% endblock %} {% block body %} - <h2>{{ group.timetable }} – {{ group }} – Semaine {{ week }}</h2> + <h2>{% if group_mode %}{{ timetable }} –{% else %}Salle{% endif %} {{ group }} – Semaine {{ week }}</h2> <p> {% 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 /> + <b><a href="{% if group_mode %}{% url "timetable" timetable.year.slug timetable.slug group.slug %}{% else %}{% url "room-timetable" group.slug %}{% endif %}"> + Accéder à l’emploi du temps de cette semaine. + </b></a><br /> {% endif %} {% 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 "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 %} + <p class="subscribe"> + {% if group_mode %} + <a href="{% url "groups" timetable.year.slug timetable.slug %}">Retour à la liste des groupes</a> + {% else %} + <a href="{% url "rooms" %}">Retour à la liste des salles</a> + {% endif %} – + {% if last_week is not None %} + <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> + – + {% 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 %} + <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> + {% endif %} + </p> +{% endblock %} diff --git a/templates/timetable_common.html b/templates/timetable_common.html index 533f6c9..6e59322 100644 --- a/templates/timetable_common.html +++ b/templates/timetable_common.html @@ -4,8 +4,8 @@ <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>{% 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 /> + <b>{{ course }}</b>{% if course.type %} ({{ course.type }}){% endif %}, de {{ course.begin|date:"H:i" }} à {{ course.end|date:"H:i" }}{% if group_mode and course.rooms.all|length > 0 or not group_mode and course.groups.all|length > 0 %}<br /> + <em>{% if group_mode %}{{ course.rooms.all|format_rooms }}{% else %}{{ course.groups.all|join:", " }}{% endif %}</em>{% endif %}{% if course.notes %}<br /> <small>Remarques : {{ course.notes|linebreaksbr }}</small>{% endif %} </li>{% endfor %} </ul> diff --git a/templates/year_list.html b/templates/year_list.html new file mode 100644 index 0000000..4256ec1 --- /dev/null +++ b/templates/year_list.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} + +{% block pagetitle %}Choisissez votre année{% endblock %} +{% block url %}{% url "mentions" element.slug %}{% endblock %} +{% block navigation %}<a href="{% url "rooms" %}">Emploi du temps des salles</a>{% endblock %} |