1.1 --- a/htdocs/styles.css Sun Apr 05 17:40:16 2015 +0200
1.2 +++ b/htdocs/styles.css Sun Apr 05 18:21:05 2015 +0200
1.3 @@ -106,10 +106,14 @@
1.4 font-weight: bold;
1.5 }
1.6
1.7 -.replaced {
1.8 +table.conflicts .replaced {
1.9 text-decoration: line-through;
1.10 }
1.11
1.12 +.objectvalue.dtstart.replaced {
1.13 + vertical-align: top;
1.14 +}
1.15 +
1.16 /* Selection of slots/periods for new events. */
1.17
1.18 input.newevent.selector {
2.1 --- a/imipweb/event.py Sun Apr 05 17:40:16 2015 +0200
2.2 +++ b/imipweb/event.py Sun Apr 05 18:21:05 2015 +0200
2.3 @@ -547,7 +547,7 @@
2.4
2.5 tzid = self.get_tzid()
2.6
2.7 - # Obtain basic event information, showing any necessary editing controls.
2.8 + # Obtain basic event information, generating any necessary editing controls.
2.9
2.10 initial_load = not args.has_key("editing")
2.11
2.12 @@ -559,6 +559,13 @@
2.13 (dtstart, dtstart_attr), (dtend, dtend_attr) = self.get_event_period(obj)
2.14 self.show_object_datetime_controls(dtstart, dtend)
2.15
2.16 + # Obtain any separate recurrences for this event.
2.17 +
2.18 + recurrenceid = format_datetime(obj.get_utc_datetime("RECURRENCE-ID"))
2.19 + recurrenceids = self._get_recurrences(uid)
2.20 + start_utc = format_datetime(to_timezone(dtstart, "UTC"))
2.21 + replaced = not recurrenceid and recurrenceids and start_utc in recurrenceids
2.22 +
2.23 # Provide a summary of the object.
2.24
2.25 page.table(class_="object", cellspacing=5, cellpadding=5)
2.26 @@ -586,20 +593,26 @@
2.27 # Handle datetimes specially.
2.28
2.29 if name in ["DTSTART", "DTEND"]:
2.30 -
2.31 - # Obtain the datetime.
2.32 + if not replaced:
2.33
2.34 - if name == "DTSTART":
2.35 - dt, attr = dtstart, dtstart_attr
2.36 + # Obtain the datetime.
2.37 +
2.38 + if name == "DTSTART":
2.39 + dt, attr = dtstart, dtstart_attr
2.40
2.41 - # Where no end datetime exists, use the start datetime as the
2.42 - # basis of any potential datetime specified if dt-control is
2.43 - # set.
2.44 + # Where no end datetime exists, use the start datetime as the
2.45 + # basis of any potential datetime specified if dt-control is
2.46 + # set.
2.47 +
2.48 + else:
2.49 + dt, attr = dtend or dtstart, dtend_attr or dtstart_attr
2.50
2.51 - else:
2.52 - dt, attr = dtend or dtstart, dtend_attr or dtstart_attr
2.53 + self.show_datetime_controls(obj, dt, attr, name == "DTSTART")
2.54
2.55 - self.show_datetime_controls(obj, dt, attr, name == "DTSTART")
2.56 + elif name == "DTSTART":
2.57 + page.td(class_="objectvalue %s replaced" % field, rowspan=2)
2.58 + page.a("First occurrence replaced by a separate event", href=self.link_to(uid, start_utc))
2.59 + page.td.close()
2.60
2.61 page.tr.close()
2.62