1.1 --- a/imipweb/event.py Fri Oct 16 22:29:35 2015 +0200
1.2 +++ b/imipweb/event.py Fri Oct 16 22:30:21 2015 +0200
1.3 @@ -571,6 +571,7 @@
1.4
1.5 attendees = self.get_verbose_attendees(attendees)
1.6 current_attendees = [uri for (name, uri) in uri_parts(self.get_current_attendees())]
1.7 + current_periods = set(self.get_periods(self.obj))
1.8
1.9 # Get suggestions. Attendees are aggregated and reference the existing
1.10 # attendees suggesting them. Periods are referenced by each existing
1.11 @@ -597,7 +598,7 @@
1.12 # Get suggested periods.
1.13
1.14 periods = self.get_periods(obj)
1.15 - if set(periods).difference(self.get_periods(self.obj)):
1.16 + if current_periods.symmetric_difference(periods):
1.17 suggested_periods[attendee] = periods
1.18
1.19 # Present the suggested attendees.
1.20 @@ -648,12 +649,15 @@
1.21 page.thead.close()
1.22 page.tbody()
1.23
1.24 + recurrenceids = self._get_recurrences(self.uid)
1.25 +
1.26 suggested_periods = list(suggested_periods.items())
1.27 suggested_periods.sort()
1.28
1.29 for attendee, periods in suggested_periods:
1.30 first = True
1.31 for p in periods:
1.32 + replaced = not self.recurrenceid and p.is_replaced(recurrenceids)
1.33 identifier = "%s-%s" % (format_datetime(p.get_start_point()), format_datetime(p.get_end_point()))
1.34 css = identifier == counter and "selected" or ""
1.35
1.36 @@ -664,8 +668,9 @@
1.37
1.38 # Show each period.
1.39
1.40 - page.td(start)
1.41 - page.td(end)
1.42 + css = replaced and "replaced" or ""
1.43 + page.td(start, class_=css)
1.44 + page.td(end, class_=css)
1.45
1.46 # Show attendees and controls alongside the first period in each
1.47 # attendee's collection.