1.1 --- a/htdocs/styles.css Mon Feb 09 15:11:15 2015 +0100
1.2 +++ b/htdocs/styles.css Mon Feb 09 15:32:36 2015 +0100
1.3 @@ -1,6 +1,7 @@
1.4 /* Table styling. */
1.5
1.6 table.calendar,
1.7 +table.conflicts,
1.8 table.object {
1.9 border: 2px solid #000;
1.10 }
2.1 --- a/imip_manager.py Mon Feb 09 15:11:15 2015 +0100
2.2 +++ b/imip_manager.py Mon Feb 09 15:32:36 2015 +0100
2.3 @@ -885,21 +885,50 @@
2.4
2.5 # Show any conflicts.
2.6
2.7 - for t in have_conflict(freebusy, [(dtstart, dtend)], True):
2.8 - start, end, found_uid = t[:3]
2.9 + conflicts = [t for t in have_conflict(freebusy, [(dtstart, dtend)], True) if t[2] != uid]
2.10
2.11 - # Provide details of any conflicting event.
2.12 + if conflicts:
2.13 + page.p("This event conflicts with others:")
2.14
2.15 - if uid != found_uid:
2.16 - start = self.format_datetime(to_timezone(get_datetime(start), tzid), "full")
2.17 - end = self.format_datetime(to_timezone(get_datetime(end), tzid), "full")
2.18 - page.p("Event conflicts with another from %s to %s: " % (start, end))
2.19 + page.table(cellspacing=5, cellpadding=5, class_="conflicts")
2.20 + page.thead()
2.21 + page.tr()
2.22 + page.th("Event")
2.23 + page.th("Start")
2.24 + page.th("End")
2.25 + page.tr.close()
2.26 + page.thead.close()
2.27 + page.tbody()
2.28 +
2.29 + for t in conflicts:
2.30 + start, end, found_uid = t[:3]
2.31 +
2.32 + # Provide details of any conflicting event.
2.33 +
2.34 + start = self.format_datetime(to_timezone(get_datetime(start), tzid), "long")
2.35 + end = self.format_datetime(to_timezone(get_datetime(end), tzid), "long")
2.36 +
2.37 + page.tr()
2.38
2.39 # Show the event summary for the conflicting event.
2.40
2.41 + page.td()
2.42 +
2.43 found_obj = self._get_object(found_uid)
2.44 if found_obj:
2.45 page.a(found_obj.get_value("SUMMARY"), href=self.env.new_url(found_uid))
2.46 + else:
2.47 + page.add("No details available")
2.48 +
2.49 + page.td.close()
2.50 +
2.51 + page.td(start)
2.52 + page.td(end)
2.53 +
2.54 + page.tr.close()
2.55 +
2.56 + page.tbody.close()
2.57 + page.table.close()
2.58
2.59 self.show_request_controls(obj)
2.60 page.form.close()