From a6f648648896927c0ce39ab6bc7cf1ea10f11d69 Mon Sep 17 00:00:00 2001 From: Tom Teichler <tom.teichler@teckids.org> Date: Tue, 10 Sep 2019 22:52:52 +0200 Subject: [PATCH] Prepare view. Advances BiscuIT-ng#89. --- biscuit/apps/alsijil/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/biscuit/apps/alsijil/views.py b/biscuit/apps/alsijil/views.py index 90dcd4484..aa742d945 100644 --- a/biscuit/apps/alsijil/views.py +++ b/biscuit/apps/alsijil/views.py @@ -147,9 +147,12 @@ def group_week(request: HttpRequest, week: Optional[int] = None) -> HttpResponse # Add a form to filter the view select_form = SelectForm(request.GET or None) + + + context['current_head'] = _('Week (%s %s - %s) ') % (wanted_week, week_start, week_end) context['week'] = wanted_week - context['week_next'] = wanted_week + 1 - context['week_prev'] = wanted_week - 1 + context['url_next'] = '%s?%s' % (redirect('group_week_by_week', week=wanted_week + 1), request.GET.urlencode()) + context['url_prev'] = '%s?%s' % (redirect('group_week_by_week', week=wanted_week - 1), request.GET.urlencode()) context['group'] = group context['lesson_periods'] = lesson_periods context['persons'] = persons -- GitLab