# HG changeset patch # User Paul Boddie # Date 1423174734 -3600 # Node ID 00e06f26c48624c63583d65db8121ec6403599c7 # Parent b2d092b08bdbf7f5a3a5847aa961017f27580f3b Added some support for defining the organiser's participation status. Added DELEGATED to the PARTSTAT values. diff -r b2d092b08bdb -r 00e06f26c486 imip_manager.py --- a/imip_manager.py Thu Feb 05 23:03:45 2015 +0100 +++ b/imip_manager.py Thu Feb 05 23:18:54 2015 +0100 @@ -474,9 +474,11 @@ obj["SUMMARY"] = [(args["summary"][0], {})] if args.has_key("partstat"): + organisers = obj.get_value_map("ORGANIZER") attendees = obj.get_value_map("ATTENDEE") - if attendees.has_key(self.user): - attendees[self.user]["PARTSTAT"] = args["partstat"][0] + d = attendees.has_key(self.user) and attendees or organisers.has_key(self.user) and organisers or None + if d: + d[self.user]["PARTSTAT"] = args["partstat"][0] # Process any action. @@ -546,10 +548,6 @@ # Show appropriate options depending on the role of the user. if is_attendee and not is_organiser: - partstat = attendee_attr.get("PARTSTAT") - if not partstat: - page.p("This request has not yet been dealt with.") - if needs_update: page.p("This request can be updated as follows:") else: @@ -601,6 +599,7 @@ ("ACCEPTED", "Attending"), ("TENTATIVE", "Tentatively attending"), ("DECLINED", "Not attending"), + ("DELEGATED", "Delegated"), ] def show_object_on_page(self, uid, obj, needs_update): @@ -676,7 +675,7 @@ else: first = False - if name == "ATTENDEE": + if name in ("ATTENDEE", "ORGANIZER"): page.td(class_="objectattribute") page.add(value) page.td.close()