1.1 --- a/imip_manager.py Wed Jan 28 16:43:04 2015 +0100
1.2 +++ b/imip_manager.py Wed Jan 28 17:19:34 2015 +0100
1.3 @@ -655,20 +655,39 @@
1.4 self.show_calendar_days(days, partitioned_groups, partitioned_group_types, group_columns)
1.5 page.table.close()
1.6
1.7 - def show_calendar_participant_headings(self, partitioned_group_sources, group_columns):
1.8 + def show_calendar_participant_headings(self, group_sources, group_columns):
1.9 +
1.10 + """
1.11 + Show headings for the participants and other scheduling contributors,
1.12 + defined by 'group_sources' and 'group_columns'.
1.13 + """
1.14 +
1.15 page = self.page
1.16
1.17 + page.colgroup(span=1) # for datetime information
1.18 +
1.19 + for columns in group_columns:
1.20 + page.colgroup(span=columns)
1.21 +
1.22 page.thead()
1.23 page.tr()
1.24 page.th("", class_="emptyheading")
1.25
1.26 - for source, columns in zip(partitioned_group_sources, group_columns):
1.27 + for source, columns in zip(group_sources, group_columns):
1.28 page.th(source, class_="participantheading", colspan=columns)
1.29
1.30 page.tr.close()
1.31 page.thead.close()
1.32
1.33 def show_calendar_days(self, days, partitioned_groups, partitioned_group_types, group_columns):
1.34 +
1.35 + """
1.36 + Show calendar days, defined by a collection of 'days', the contributing
1.37 + period information as 'partitioned_groups' (partitioned by day), the
1.38 + 'partitioned_group_types' indicating the kind of contribution involved,
1.39 + and the 'group_columns' defining the number of columns in each group.
1.40 + """
1.41 +
1.42 page = self.page
1.43
1.44 # Determine the number of columns required, the days providing time
1.45 @@ -678,24 +697,31 @@
1.46 all_days = days.items()
1.47 all_days.sort()
1.48
1.49 - page.tbody()
1.50 -
1.51 # Produce a heading and time points for each day.
1.52
1.53 for day, points in all_days:
1.54 + page.thead()
1.55 page.tr()
1.56 page.th(class_="dayheading", colspan=all_columns+1)
1.57 page.add(self.format_date(day, "full"))
1.58 page.th.close()
1.59 page.tr.close()
1.60 + page.thead.close()
1.61
1.62 groups_for_day = [partitioned.get(day) for partitioned in partitioned_groups]
1.63
1.64 + page.tbody()
1.65 self.show_calendar_points(points, groups_for_day, partitioned_group_types, group_columns)
1.66 -
1.67 - page.tbody.close()
1.68 + page.tbody.close()
1.69
1.70 def show_calendar_points(self, points, groups, group_types, group_columns):
1.71 +
1.72 + """
1.73 + Show the time 'points' along with period information from the given
1.74 + 'groups', having the indicated 'group_types', each with the number of
1.75 + columns given by 'group_columns'.
1.76 + """
1.77 +
1.78 page = self.page
1.79
1.80 # Produce a row for each time point.