1.1 --- a/imipweb/event.py Thu Oct 15 19:35:44 2015 +0200
1.2 +++ b/imipweb/event.py Thu Oct 15 19:36:26 2015 +0200
1.3 @@ -166,12 +166,18 @@
1.4 self.control("create", "submit", "Update event")
1.5 page.add(" ")
1.6
1.7 + if self._get_counters(self.uid, self.recurrenceid):
1.8 + self.control("uncounter", "submit", "Ignore counter-proposals")
1.9 + page.add(" ")
1.10 +
1.11 if self.obj.is_shared() and not self._is_request():
1.12 self.control("cancel", "submit", "Cancel event")
1.13 else:
1.14 self.control("discard", "submit", "Discard event")
1.15
1.16 page.add(" ")
1.17 + self.control("ignore", "submit", "Do nothing for now")
1.18 + page.add(" ")
1.19 self.control("save", "submit", "Save without sending")
1.20 page.p.close()
1.21
1.22 @@ -785,10 +791,11 @@
1.23 cancel = args.has_key("cancel")
1.24 ignore = args.has_key("ignore")
1.25 save = args.has_key("save")
1.26 + uncounter = args.has_key("uncounter")
1.27 accept = self.prefixed_args("accept-", int)
1.28 decline = self.prefixed_args("decline-", int)
1.29
1.30 - have_action = reply or discard or create or cancel or ignore or save or accept or decline
1.31 + have_action = reply or discard or create or cancel or ignore or save or accept or decline or uncounter
1.32
1.33 if not have_action:
1.34 return ["action"]
1.35 @@ -929,6 +936,17 @@
1.36 self.redirect(self.env.get_url())
1.37 handled = False
1.38
1.39 + # Remove counter-proposals without acknowledging them.
1.40 +
1.41 + elif uncounter:
1.42 + self.store.remove_counters(self.user, self.uid, self.recurrenceid)
1.43 + self.remove_request()
1.44 +
1.45 + # Redirect to the event.
1.46 +
1.47 + self.redirect(self.env.get_url())
1.48 + handled = False
1.49 +
1.50 else:
1.51 handled = False
1.52