diff options
-rw-r--r-- | templates/qsjps.html | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/templates/qsjps.html b/templates/qsjps.html index bb07b60..a166dbd 100644 --- a/templates/qsjps.html +++ b/templates/qsjps.html @@ -1,14 +1,17 @@ {% extends "index.html" %} +{% load dt_week %} {% block title %}Trouver une salle – {% endblock %} {% block body %} <h3>Trouver une salle entre {{ form.begin.value }} et {{ form.end.value }}</h3> <ul> - {% for room in rooms %} - <li>{{ room }}</li> - {% empty %} - <p>Aucune salle trouvée</p> - {% endfor %} + {% with year=form.cleaned_data.day.year week=form.cleaned_data.day|dt_week %} + {% for room in rooms %} + <li><a href="{% url "room-timetable" room.slug year week %}">{{ room }}</li> + {% empty %} + <p>Aucune salle trouvée</p> + {% endfor %} + {% endwith %} </ul> {% endblock %} |