# HG changeset patch # User Paul Boddie # Date 1443116403 -7200 # Node ID 3ee9193569d837671b92ca50d61b3f2772d47b9a # Parent 75751c6a54ad22cef5eb7736a39abf744ea3343b Removed separate viewing of counter-proposals (which will be shown as part of the event view). diff -r 75751c6a54ad -r 3ee9193569d8 imipweb/calendar.py --- a/imipweb/calendar.py Thu Sep 24 19:37:37 2015 +0200 +++ b/imipweb/calendar.py Thu Sep 24 19:40:03 2015 +0200 @@ -687,7 +687,8 @@ "event", has_continued and "continued" or "", will_continue and "continues" or "", - p.transp == "ORG" and "only-organising" or is_organiser and "organising" or "attending" + p.transp == "ORG" and "only-organising" or is_organiser and "organising" or "attending", + self._have_request(p.uid, p.recurrenceid, "COUNTER", True) and "counter" or "", ]) # Only anchor the first cell of events. @@ -710,11 +711,6 @@ page.span(p.summary or "(Participant is busy)") - # Link to counter-proposals. - - elif group_type == "request" and self._have_request(p.uid, p.recurrenceid, "COUNTER", True): - page.a(p.summary, href=self.link_to(p.uid, p.recurrenceid, "counter")) - # Link to requests and events (including ones for # which counter-proposals exist). diff -r 75751c6a54ad -r 3ee9193569d8 imipweb/event.py --- a/imipweb/event.py Thu Sep 24 19:37:37 2015 +0200 +++ b/imipweb/event.py Thu Sep 24 19:40:03 2015 +0200 @@ -1083,8 +1083,8 @@ "Show an object request using the given 'path_info' for the current user." - uid, recurrenceid, section = self.get_identifiers(path_info) - obj = self.get_stored_object(uid, recurrenceid, section) + uid, recurrenceid = self.get_identifiers(path_info) + obj = self.get_stored_object(uid, recurrenceid) self.set_object(obj) if not obj: diff -r 75751c6a54ad -r 3ee9193569d8 imipweb/resource.py --- a/imipweb/resource.py Thu Sep 24 19:37:37 2015 +0200 +++ b/imipweb/resource.py Thu Sep 24 19:40:03 2015 +0200 @@ -79,18 +79,16 @@ self.new_page(title="Redirect") self.page.p("Redirecting to: %s" % url) - def link_to(self, uid, recurrenceid=None, section=None): + def link_to(self, uid, recurrenceid=None): """ - Return a link to an object with the given 'uid', 'recurrenceid' and - 'section'. See get_identifiers for the decoding of such links. + Return a link to an object with the given 'uid' and 'recurrenceid'. + See get_identifiers for the decoding of such links. """ path = [uid] if recurrenceid: path.append(recurrenceid) - if section: - path.append(section) return self.env.new_url("/".join(path)) # Control naming helpers. @@ -118,20 +116,12 @@ # UID only. if len(parts) == 1: - return parts[0], None, None - - # UID and RECURRENCE-ID or UID and section. + return parts[0], None - elif len(parts) == 2: - if parts[1] == "counter": - return parts[0], None, "counters" - else: - return parts[0], parts[1], parts[2] == "counter" and "counters" or None - - # UID, RECURRENCE-ID and section. + # UID and RECURRENCE-ID. else: - return parts[:3] + return parts[:2] def _get_object(self, uid, recurrenceid=None, section=None): if self.objects.has_key((uid, recurrenceid, section)):