1.1 --- a/macros/EventAggregator.py Fri Oct 22 01:13:28 2010 +0200
1.2 +++ b/macros/EventAggregator.py Fri Oct 22 22:06:18 2010 +0200
1.3 @@ -66,9 +66,23 @@
1.4 self.next_set_end = last.month_update(self.number_of_months)
1.5
1.6 def getQualifiedParameterName(self, argname):
1.7 +
1.8 + "Return the 'argname' qualified using the calendar name."
1.9 +
1.10 return EventAggregatorSupport.getQualifiedParameterName(self.calendar_name, argname)
1.11
1.12 def getMonthYearQueryString(self, argname, year_month, prefix=1):
1.13 +
1.14 + """
1.15 + Return a query string fragment for the given 'argname', referring to the
1.16 + month given by the specified 'year_month' object, appropriate for this
1.17 + calendar.
1.18 +
1.19 + If 'prefix' is specified and set to a false value, the parameters in the
1.20 + query string will not be calendar-specific, but could be used with the
1.21 + summary action.
1.22 + """
1.23 +
1.24 if year_month is not None:
1.25 year, month = year_month.as_tuple()
1.26 month_argname = "%s-month" % argname
1.27 @@ -81,6 +95,17 @@
1.28 return ""
1.29
1.30 def getMonthQueryString(self, argname, month, prefix=1):
1.31 +
1.32 + """
1.33 + Return a query string fragment for the given 'argname', referring to the
1.34 + month given by the specified 'month' value, appropriate for this
1.35 + calendar.
1.36 +
1.37 + If 'prefix' is specified and set to a false value, the parameters in the
1.38 + query string will not be calendar-specific, but could be used with the
1.39 + summary action.
1.40 + """
1.41 +
1.42 if month is not None:
1.43 if prefix:
1.44 argname = self.getQualifiedParameterName(argname)
1.45 @@ -89,6 +114,13 @@
1.46 return ""
1.47
1.48 def getNavigationLink(self, start, end, mode=None):
1.49 +
1.50 + """
1.51 + Return a query string fragment for navigation to a view showing months
1.52 + from 'start' to 'end' inclusive, with the optional 'mode' indicating the
1.53 + view style.
1.54 + """
1.55 +
1.56 return "%s&%s&%s=%s" % (
1.57 self.getMonthQueryString("start", start),
1.58 self.getMonthQueryString("end", end),