diff options
author | Alban Gruin | 2017-09-09 16:39:30 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-09 16:39:30 +0200 |
commit | 5c96538dfe708c4429d13397caedeb0b84a65b5a (patch) | |
tree | 855a9f31cb40a35805129d4f9edd3eac274cc11f /templates | |
parent | ab9df7a174e2debbf9c644c8ec3e2127eeeaa3cf (diff) | |
parent | 60ea5a0e2a5f61f7f764bcf01aafb362781c16da (diff) |
Merge branch 'stable/0.9.z' into prod/pa1ch/0.y.z
Diffstat (limited to 'templates')
-rw-r--r-- | templates/group_list.html | 11 | ||||
-rw-r--r-- | templates/index.html | 70 | ||||
-rw-r--r-- | templates/mail/mail_confirm.txt | 9 | ||||
-rw-r--r-- | templates/mail/mail_footer.txt | 2 | ||||
-rw-r--r-- | templates/mail/mail_timetable.txt | 7 | ||||
-rw-r--r-- | templates/mail/mail_unsubscribed.txt | 2 | ||||
-rw-r--r-- | templates/mention_list.html | 14 | ||||
-rw-r--r-- | templates/subscribe.html | 16 | ||||
-rw-r--r-- | templates/timetable.html | 16 | ||||
-rw-r--r-- | templates/timetable_common.html | 12 |
10 files changed, 55 insertions, 104 deletions
diff --git a/templates/group_list.html b/templates/group_list.html new file mode 100644 index 0000000..2530865 --- /dev/null +++ b/templates/group_list.html @@ -0,0 +1,11 @@ +{% extends "index.html" %} +{% load dt_week %} + +{% 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> {% empty %}<em>aucun cours</em>{% endfor %}</li> + {% endfor %} + </ul> +{% endblock %} diff --git a/templates/index.html b/templates/index.html index 4db748d..366e6f9 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,70 +1,26 @@ -{% load dt_week %}<!DOCTYPE html> +{% load static %}<!DOCTYPE html> <html lang="fr"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>{% block title %}{% endblock %}celcatsanitizer</title> - <style> -body { - max-width: 60em; - margin: 1em auto; - padding: 0 .62em; - font: 1.2em/1.62em sans-serif; - word-wrap: break-word; -} - -h1, h2, h3 { - line-height: 1.2em; -} - -a { - text-decoration: none; -} - -a:hover, a:focus { - text-decoration: underline; -} - -h1 a, h3 a, a.text { - color: #31363b; -} - -.content { - max-width: 50em; - margin: 0 auto; -} - -li { - line-height: 1.2em; - margin-bottom: 5px; -} - -li.course { - margin-bottom: 20px; -} - -@media print { - body, .content { - max-width: none; - } - - header, footer, a.subscribe { - display: none; - } -} - </style> + <link rel="stylesheet" href="{% static "celcatsanitizer/style.css" %}"> </head> <body> <header> <h1><a href="{% url "index" %}">celcatsanitizer</a></h1> </header> - <div class="content">{% block body %}{% for timetable in timetables %} - <section id="{{ timetable.slug }}"> - <h3><a href="{{ timetable.url }}">{{ timetable.name }}</a></h3> - <ul>{% for group in groups %}{% if group.timetable.id == timetable.id %} - <li><a class="text"{% if group.weeks is not None %} href="{% url "timetable" timetable.slug group.slug %}"{% endif %}>{{ group.name }}</a> – {% for week in group.weeks %}<a href="{% url "timetable" timetable.slug group.slug week.year week|dt_week %}">{{ week|dt_prettyprint }}</a> {% empty %}<em>aucun cours</em>{% endfor %}</li>{% endif %}{% endfor %} - </ul> - </section>{% endfor %}{% endblock %} + <div class="content"> + {% block body %} + <h3>Choisissez votre année</h3> + <ul> + {% for year in years %} + <li><a href="{% url "mentions" year.slug %}">{{ year }}</a></li> + {% empty %} + <p><em>Aucun emploi du temps à afficher</em></p> + {% endfor %} + </ul> + {% endblock %} </div> <footer> <p>(c) 2017 – Alban Gruin<br /> diff --git a/templates/mail/mail_confirm.txt b/templates/mail/mail_confirm.txt deleted file mode 100644 index 34aca3d..0000000 --- a/templates/mail/mail_confirm.txt +++ /dev/null @@ -1,9 +0,0 @@ -Vous avez été abonné à l’emploi du temps {{ group.timetable.name }} - {{ group.name }} - -Pour valider l’abonnement, suivez ce lien : {{ domain }}{% url "confirm" token %} - -Si vous pensez que vous avez été abonné par erreur, suivez ce lien : {{ domain }}{% url "cancel" token %} - -Vous ne recevrez aucun mail tant que vous n'avez pas validé votre abonnement. - -{% include "mail/mail_footer.txt" %} diff --git a/templates/mail/mail_footer.txt b/templates/mail/mail_footer.txt deleted file mode 100644 index b39f738..0000000 --- a/templates/mail/mail_footer.txt +++ /dev/null @@ -1,2 +0,0 @@ -Pour vous désinscrire de cet emploi du temps, suivez ce lien : {{ domain }}{% url "cancel" token %} -Pour contacter l’administrateur du service, envoyez un mail à cette adresse : {{ admins|first|last }} diff --git a/templates/mail/mail_timetable.txt b/templates/mail/mail_timetable.txt deleted file mode 100644 index 7cc6b26..0000000 --- a/templates/mail/mail_timetable.txt +++ /dev/null @@ -1,7 +0,0 @@ -{% load rooms %}{% autoescape off %}{% for day in courses %}{% 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 %} -{% for course in day %} * {{ course.name }} ({{ course.type }}), de {{ course.begin|date:"H:i" }} à {{ course.end|date:"H:i" }}{% if course.rooms.all|length > 0 %} - {{ course.rooms.all|format_rooms }}{% endif %}{% if course.notes is not None %} - Remarques : {{ course.notes }}{% endif %} - -{% endfor %}{% empty %}Aucun cours pour le groupe {{ group }} pendant la semaine {{ week }}. -{% endfor %}{% endautoescape %} diff --git a/templates/mail/mail_unsubscribed.txt b/templates/mail/mail_unsubscribed.txt deleted file mode 100644 index 8d75ccf..0000000 --- a/templates/mail/mail_unsubscribed.txt +++ /dev/null @@ -1,2 +0,0 @@ -Vous avez été désabonné de l’emploi du temps {{ group.timetable.name }} - {{ group.name }} -Notez que si vous vous êtes abonné à un autre emploi du temps, vous recevrez toujours les mails de ceux-ci. diff --git a/templates/mention_list.html b/templates/mention_list.html new file mode 100644 index 0000000..71cfaac --- /dev/null +++ b/templates/mention_list.html @@ -0,0 +1,14 @@ +{% extends "index.html" %} + +{% block title %}{{ year }} – {% endblock %} + +{% block body %} + <h3>{{ year }} – Choisissez votre mention</h3> + <ul> +{% for timetable in timetables %} + <li><a href="{% url "groups" year.slug timetable.slug %}">{{ timetable }}</a></li> +{% empty %} + <p>Aucun emploi du temps à afficher</p> +{% endfor %} + </ul> +{% endblock %} diff --git a/templates/subscribe.html b/templates/subscribe.html deleted file mode 100644 index 76780ac..0000000 --- a/templates/subscribe.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "index.html" %} - -{% block title %}S’abonner à {{ group.timetable.name }} – {{ group.name }}{% endblock %} - -{% block body %} - <h2>S'abonner à {{ group.timetable.name }} – {{ group.name }}</h2> - <form action="{% url "subscribe" group.timetable.slug group.slug year week %}" method="post"> - {% csrf_token %} - {{ form }} - <input type="submit" value="S'abonner" /> - </form> - <p>Après l’abonnement, vous allez recevoir un mail avec un lien de confirmation. Aucun autre mail ne vous sera envoyé si vous n'avez pas validé votre abonnement.<br /> - Vous pouvez vous désabonner à tout moment à l’aide d'un lien contenu dans tout les mails que nous vous enverrons.<br /> - Les mails sont envoyés tout les dimanche à minuit CET.<br /> - Nous ne partageons votre adresse à qui que se soit. Lorsque vous vous désabonnez, votre adresse est effacée de nos serveurs.</p> -{% endblock %} diff --git a/templates/timetable.html b/templates/timetable.html index 264a25c..7a30595 100644 --- a/templates/timetable.html +++ b/templates/timetable.html @@ -1,15 +1,9 @@ {% extends "index.html" %} -{% load rooms %} -{% block title %}{{ group.timetable.name }} – {{ group.name }} – Semaine {{ week }} – {% endblock %} +{% block title %}{{ group.timetable }} – {{ group }} – Semaine {{ week }} – {% endblock %} {% block body %} - <h2>{{ group.timetable.name }} – {{ group.name }} – Semaine {{ week }}</h2> - <p>Dernière mise à jour le {{ last_update|date:"l j F o" }} à {{ last_update|date:"H:i" }}</p>{% for day in courses %} - <section> - <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.name }}</b> ({{ course.type }}), 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 is not None %}<br /><small>Remarques : {{ course.notes }}</small>{% endif %}</li>{% endfor %} - </ul> - </section>{% endfor %} - <p><a class="subscribe" href="{% url "subscribe" group.timetable.slug group.slug year week %}">S’abonner à cet emploi du temps</a></p>{% endblock %} + <h2>{{ group.timetable }} – {{ group }} – Semaine {{ week }}</h2> + <p>Dernière mise à jour le {{ last_update|date:"l j F o" }} à {{ last_update|date:"H:i" }}</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 %} diff --git a/templates/timetable_common.html b/templates/timetable_common.html new file mode 100644 index 0000000..4319e60 --- /dev/null +++ b/templates/timetable_common.html @@ -0,0 +1,12 @@ +{% load rooms %} +{% for day in courses %} + <section> + <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 /> + <em>{{ course.rooms.all|format_rooms }}</em>{% endif %}{% if course.notes %}<br /> + <small>Remarques : {{ course.notes }}</small>{% endif %} + </li>{% endfor %} + </ul> + </section>{% endfor %} |