Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CelcatSanitizer Teacher
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Léo Grange
CelcatSanitizer Teacher
Commits
60e3b389
Commit
60e3b389
authored
7 years ago
by
Alban Gruin
Browse files
Options
Downloads
Patches
Plain Diff
qsjps: abstraction et navigation de la template
parent
8a533b6f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
templates/qsjps.html
+4
-13
4 additions, 13 deletions
templates/qsjps.html
views.py
+1
-1
1 addition, 1 deletion
views.py
with
5 additions
and
14 deletions
templates/qsjps.html
+
4
−
13
View file @
60e3b389
...
...
@@ -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 %}
This diff is collapsed.
Click to expand it.
views.py
+
1
−
1
View file @
60e3b389
...
...
@@ -274,7 +274,7 @@ def qsjps(request):
rooms
=
Room
.
objects
.
qsjps
(
begin
,
end
)
return
render
(
request
,
"
qsjps.html
"
,
{
"
room
s
"
:
rooms
,
"
form
"
:
form
})
{
"
element
s
"
:
rooms
,
"
form
"
:
form
})
# Si le formulaire est invalide, on ré-affiche le formulaire
# avec les erreurs
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment