diff --git a/RIGS/rigboard.py b/RIGS/rigboard.py index 42a79b3b..a6ccde09 100644 --- a/RIGS/rigboard.py +++ b/RIGS/rigboard.py @@ -37,6 +37,12 @@ class RigboardIndex(generic.TemplateView): class WebCalendar(generic.TemplateView): template_name = 'RIGS/calendar.html' + def get_context_data(self, **kwargs): + context = super(WebCalendar, self).get_context_data(**kwargs) + context['view'] = kwargs.get('view','') + context['date'] = kwargs.get('date','') + return context + class EventDetail(generic.DetailView): model = models.Event diff --git a/RIGS/templates/RIGS/calendar.html b/RIGS/templates/RIGS/calendar.html index 23a0b1b8..f6891d84 100644 --- a/RIGS/templates/RIGS/calendar.html +++ b/RIGS/templates/RIGS/calendar.html @@ -14,8 +14,28 @@ diff --git a/RIGS/urls.py b/RIGS/urls.py index 93028bb2..4338df08 100644 --- a/RIGS/urls.py +++ b/RIGS/urls.py @@ -69,6 +69,8 @@ urlpatterns = patterns('', # Rigboard url(r'^rigboard/$', login_required(rigboard.RigboardIndex.as_view()), name='rigboard'), url(r'^rigboard/calendar/$', login_required()(rigboard.WebCalendar.as_view()), name='web_calendar'), + url(r'^rigboard/calendar/(?P(month|week|day))/$', login_required()(rigboard.WebCalendar.as_view()), name='web_calendar'), + url(r'^rigboard/calendar/(?P(month|week|day))/(?P(\d{4}-\d{2}-\d{2}))/$', login_required()(rigboard.WebCalendar.as_view()), name='web_calendar'), url(r'^rigboard/archive/$', RedirectView.as_view(permanent=True,pattern_name='event_archive')), url(r'^rigboard/activity/$', permission_required_with_403('RIGS.view_event')(versioning.ActivityTable.as_view()),