1.1 --- a/imipweb/calendar.py Fri Oct 23 20:01:38 2015 +0200
1.2 +++ b/imipweb/calendar.py Sat Oct 24 00:12:05 2015 +0200
1.3 @@ -370,6 +370,29 @@
1.4
1.5 return Period(view_start, view_end, self.get_tzid())
1.6
1.7 + def show_view_period(self, view_period):
1.8 +
1.9 + "Show a description of the 'view_period'."
1.10 +
1.11 + page = self.page
1.12 +
1.13 + view_start = view_period.get_start()
1.14 + view_end = view_period.get_end()
1.15 +
1.16 + if not (view_start or view_end):
1.17 + return
1.18 +
1.19 + page.p(class_="view-period")
1.20 +
1.21 + if view_start and view_end:
1.22 + page.add("Showing events from %s until %s" % (self.format_date(view_start, "full"), self.format_date(view_end, "full")))
1.23 + elif view_start:
1.24 + page.add("Showing events from %s" % self.format_date(view_start, "full"))
1.25 + elif view_end:
1.26 + page.add("Showing events until %s" % self.format_date(view_end, "full"))
1.27 +
1.28 + page.p.close()
1.29 +
1.30 def get_period_group_details(self, freebusy, participants, view_period):
1.31
1.32 """
1.33 @@ -535,6 +558,7 @@
1.34
1.35 # Show controls to change the calendar appearance.
1.36
1.37 + self.show_view_period(view_period)
1.38 self.show_calendar_controls()
1.39 self.show_time_navigation(view_period)
1.40