Skip to content
Snippets Groups Projects
Verified Commit afa74623 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Show announcements in weekly timetable views (SMART PLAN)

Closes "SMART PLAN" on #63
parent 794946dc
No related branches found
No related tags found
1 merge request!41Show announcements in timetable views
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
{% endif %} {% endif %}
</div> </div>
{# {% include "chronos/hintsinplan.html" %}#} {% include "core/announcements.html" with announcements=announcements show_interval=1 %}
{# show full timetable on tablets, laptops and pcs #} {# show full timetable on tablets, laptops and pcs #}
<div class="timetable-plan hide-on-small-and-down"> <div class="timetable-plan hide-on-small-and-down">
......
...@@ -168,6 +168,11 @@ def timetable( ...@@ -168,6 +168,11 @@ def timetable(
"dest": reverse("timetable", args=[type_, pk]) "dest": reverse("timetable", args=[type_, pk])
} }
if is_smart:
start = wanted_week[TimePeriod.weekday_min]
stop = wanted_week[TimePeriod.weekday_max]
context["announcements"] = Announcement.for_timetables().relevant_for(el).in_days(start, stop)
week_prev = wanted_week - 1 week_prev = wanted_week - 1
week_next = wanted_week + 1 week_next = wanted_week + 1
......
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