diff options
-rw-r--r-- | templates/qsjps.html | 17 | ||||
-rw-r--r-- | views.py | 2 |
2 files changed, 5 insertions, 14 deletions
diff --git a/templates/qsjps.html b/templates/qsjps.html index a166dbd..9fbdf8a 100644 --- a/templates/qsjps.html +++ b/templates/qsjps.html @@ -2,16 +2,7 @@ {% 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> - {% 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 %} +{% 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 %} @@ -274,7 +274,7 @@ def qsjps(request): rooms = Room.objects.qsjps(begin, end) return render(request, "qsjps.html", - {"rooms": rooms, "form": form}) + {"elements": rooms, "form": form}) # Si le formulaire est invalide, on ré-affiche le formulaire # avec les erreurs |