Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Chronos
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-Chronos
Commits
0973743d
Commit
0973743d
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
fa15954d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
biscuit/apps/chronos/templates/timetable/plan.html
+14
-14
14 additions, 14 deletions
biscuit/apps/chronos/templates/timetable/plan.html
biscuit/apps/chronos/views.py
+5
-2
5 additions, 2 deletions
biscuit/apps/chronos/views.py
with
19 additions
and
16 deletions
biscuit/apps/chronos/templates/timetable/plan.html
+
14
−
14
View file @
0973743d
...
...
@@ -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.
biscuit/apps/chronos/views.py
+
5
−
2
View file @
0973743d
...
...
@@ -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