Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
6358e708
Commit
6358e708
authored
4 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Add missing context in the week_view view
parent
731f3091
No related branches found
No related tags found
1 merge request
!73
Resolve "Add week select to week view"
Pipeline
#3129
passed
4 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/views.py
+7
-0
7 additions, 0 deletions
aleksis/apps/alsijil/views.py
with
7 additions
and
0 deletions
aleksis/apps/alsijil/views.py
+
7
−
0
View file @
6358e708
...
...
@@ -16,6 +16,7 @@ from rules.contrib.views import PermissionRequiredMixin
from
aleksis.apps.chronos.managers
import
TimetableType
from
aleksis.apps.chronos.models
import
LessonPeriod
from
aleksis.apps.chronos.util.chronos_helpers
import
get_el_by_pk
from
aleksis.apps.chronos.util.date
import
get_weeks_for_year
from
aleksis.core.mixins
import
AdvancedCreateView
,
AdvancedDeleteView
,
AdvancedEditView
from
aleksis.core.models
import
Group
,
Person
,
SchoolTerm
from
aleksis.core.util
import
messages
...
...
@@ -265,6 +266,7 @@ def week_view(
)
context
[
"
week
"
]
=
wanted_week
context
[
"
weeks
"
]
=
get_weeks_for_year
(
year
=
wanted_week
.
year
)
context
[
"
lesson_periods
"
]
=
lesson_periods
context
[
"
persons
"
]
=
persons
context
[
"
group
"
]
=
group
...
...
@@ -273,6 +275,10 @@ def week_view(
week_prev
=
wanted_week
-
1
week_next
=
wanted_week
+
1
context
[
"
week_select
"
]
=
{
"
year
"
:
wanted_week
.
year
,
"
dest
"
:
reverse
(
"
week_view
"
,
),
# args=[wanted_week.year, wanted_week.week]),
}
context
[
"
url_prev
"
]
=
"
%s?%s
"
%
(
reverse
(
"
week_view_by_week
"
,
args
=
[
week_prev
.
year
,
week_prev
.
week
]),
request
.
GET
.
urlencode
(),
...
...
@@ -282,6 +288,7 @@ def week_view(
request
.
GET
.
urlencode
(),
)
print
(
"
NICE
"
)
return
render
(
request
,
"
alsijil/class_register/week_view.html
"
,
context
)
...
...
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