Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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-Core
Commits
175ac5ee
Commit
175ac5ee
authored
5 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
From friday 15:35 the smart plan shows the next week (issue
#271
)
parent
2e242f28
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!86
Merge school-apps
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
schoolapps/timetable/templates/timetable/plan.html
+14
-14
14 additions, 14 deletions
schoolapps/timetable/templates/timetable/plan.html
schoolapps/timetable/views.py
+5
-2
5 additions, 2 deletions
schoolapps/timetable/views.py
with
19 additions
and
16 deletions
schoolapps/timetable/templates/timetable/plan.html
+
14
−
14
View file @
175ac5ee
...
...
@@ -127,32 +127,32 @@
<div
class=
"col s2"
>
</div>
{# Show short weekdays on tablets #}
{# Show short weekdays on tablets #}
{% for day in short_week_days %}
<div
class=
"col s2 hide-on-large-only"
>
<div
class=
"card timetable-title-card"
>
<div
class=
"card-content"
>
<span
class=
"card-title"
>
{{ day.0 }}
</span>
{% if day.1 %}
<span
class=
"badge new blue center-align holiday-badge"
>
{{ day.1.0 }}
</span>
{% endif %}
<span
class=
"card-title"
>
{{ day.0 }}
</span>
{% if day.1 %}
<span
class=
"badge new blue center-align holiday-badge"
>
{{ day.1.0 }}
</span>
{% endif %}
</div>
</div>
</div>
{% endfor %}
{# Show long weekdays elsewere #}
{# Show long weekdays elsewere #}
{% for day in long_week_days %}
<div
class=
"col s2 hide-on-med-only"
>
<div
class=
"card timetable-title-card"
>
<div
class=
"card-content"
>
<span
class=
"card-title"
>
{{ day.0.0 }}
</span>
{% if day.1 %}
<span
class=
"badge new blue center-align holiday-badge"
>
{{ day.1.0 }}
</span>
{% endif %}
<span
class=
"card-title"
>
{{ day.0.0 }}
</span>
{% if day.1 %}
<span
class=
"badge new blue center-align holiday-badge"
>
{{ day.1.0 }}
</span>
{% endif %}
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
schoolapps/timetable/views.py
+
5
−
2
View file @
175ac5ee
...
...
@@ -125,8 +125,7 @@ def quicklaunch(request):
@login_required
@permission_required
(
"
timetable.show_plan
"
)
def
plan
(
request
,
plan_type
,
plan_id
,
regular
=
""
,
year
=
timezone
.
datetime
.
now
().
year
,
calendar_week
=
timezone
.
datetime
.
now
().
isocalendar
()[
1
]):
def
plan
(
request
,
plan_type
,
plan_id
,
regular
=
""
,
year
=
None
,
calendar_week
=
None
):
"""
[DJANGO VIEW]
Show a timetable (class, teacher, room, smart/regular)
...
...
@@ -138,6 +137,10 @@ def plan(request, plan_type, plan_id, regular="", year=timezone.datetime.now().y
:param calendar_week: calendar week in year (only for smart plan)
:return:
"""
if
year
is
None
or
calendar_week
is
None
:
date
=
get_next_weekday_with_time
(
timezone
.
datetime
.
now
(),
timezone
.
datetime
.
now
().
time
())
year
=
date
.
year
calendar_week
=
date
.
isocalendar
()[
1
]
# Regular or smart plan?
if
regular
==
"
regular
"
:
...
...
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