Skip to content
Snippets Groups Projects
Commit f1f0419b authored by Julian's avatar Julian
Browse files

Show holidays on "MyPlan"

parent d47497d0
No related branches found
No related tags found
1 merge request!86Merge school-apps
......@@ -29,6 +29,10 @@
<div class="card-content">
<span class="card-title">
{% include "timetable/datepicker.html" %}
{% if holiday %}
<span class="badge new blue center-align holiday-badge">{{ holiday.0 }}</span>
{{ week_day }}
{% endif %}
</span>
</div>
</div>
......
......@@ -162,6 +162,9 @@ def my_plan(request, year=None, day=None, month=None):
plan, holidays = get_plan(_type, plan_id, smart=True, monday_of_week=monday_of_week)
# print(parse_lesson_times())
holiday_for_the_day = holidays[date.isoweekday() - 1]
# print(holiday_for_the_day)
context = {
"type": _type,
"raw_type": raw_type,
......@@ -172,7 +175,8 @@ def my_plan(request, year=None, day=None, month=None):
"week_day": date.isoweekday() - 1,
"date": date,
"date_js": int(date.timestamp()) * 1000,
"display_date_only": True
"display_date_only": True,
"holiday": holiday_for_the_day,
}
# print(context["week_day"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment