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
cd55e32d
Verified
Commit
cd55e32d
authored
4 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Show buttons to get to next or previous lesson on lesson view
parent
43e6be1f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!56
Resolve "[Lesson view] Show buttons to go the previous/next lesson"
Pipeline
#2787
passed
4 years ago
Stage: test
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/alsijil/templates/alsijil/class_register/lesson.html
+20
-0
20 additions, 0 deletions
...apps/alsijil/templates/alsijil/class_register/lesson.html
aleksis/apps/alsijil/views.py
+1
-1
1 addition, 1 deletion
aleksis/apps/alsijil/views.py
with
21 additions
and
1 deletion
aleksis/apps/alsijil/templates/alsijil/class_register/lesson.html
+
20
−
0
View file @
cd55e32d
...
...
@@ -28,6 +28,26 @@
{% endblock %}
{% block content %}
<div
class=
"row"
>
<div
class=
"col s12"
>
{% with prev_lesson=lesson_period.prev %}
<a
class=
"btn-flat left waves-effect waves-light"
href=
"{% url "
lesson_by_week_and_period
"
prev_lesson.week.year
prev_lesson.week.week
prev_lesson.id
%}"
>
<i
class=
"material-icons left"
>
arrow_back
</i>
{% trans "Previous lesson" %}
</a>
{% endwith %}
{% with next_lesson=lesson_period.next %}
<a
class=
"btn-flat right waves-effect waves-light"
href=
"{% url "
lesson_by_week_and_period
"
next_lesson.week.year
next_lesson.week.week
next_lesson.id
%}"
>
<i
class=
"material-icons right"
>
arrow_forward
</i>
{% trans "Next lesson" %}
</a>
{% endwith %}
</div>
</div>
<form
method=
"post"
>
<div
class=
"row"
>
<div
class=
"col s12"
>
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/views.py
+
1
−
1
View file @
cd55e32d
...
...
@@ -38,8 +38,8 @@ def lesson(
if
year
and
week
and
period_id
:
# Get a specific lesson period if provided in URL
lesson_period
=
LessonPeriod
.
objects
.
get
(
pk
=
period_id
)
wanted_week
=
CalendarWeek
(
year
=
year
,
week
=
week
)
lesson_period
=
LessonPeriod
.
objects
.
annotate_week
(
wanted_week
).
get
(
pk
=
period_id
)
else
:
# Determine current lesson by current date and time
lesson_period
=
(
...
...
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