1.1 --- a/imip_manager.py Mon Mar 09 21:44:34 2015 +0100
1.2 +++ b/imip_manager.py Mon Mar 09 22:28:10 2015 +0100
1.3 @@ -1278,36 +1278,39 @@
1.4
1.5 "Show requests for the current user."
1.6
1.7 + page = self.page
1.8 +
1.9 # NOTE: This list could be more informative, but it is envisaged that
1.10 # NOTE: the requests would be visited directly anyway.
1.11
1.12 requests = self._get_requests()
1.13
1.14 - self.page.div(id="pending-requests")
1.15 + page.div(id="pending-requests")
1.16
1.17 if requests:
1.18 - self.page.p("Pending requests:")
1.19 -
1.20 - self.page.ul()
1.21 + page.p("Pending requests:")
1.22 +
1.23 + page.ul()
1.24
1.25 for uid, recurrenceid in requests:
1.26 obj = self._get_object(uid, recurrenceid)
1.27 if obj:
1.28 - self.page.li()
1.29 - self.page.a(obj.get_value("SUMMARY"), href="#request-%s-%s" % (uid, recurrenceid or ""))
1.30 - self.page.li.close()
1.31 -
1.32 - self.page.ul.close()
1.33 + page.li()
1.34 + page.a(obj.get_value("SUMMARY"), href="#request-%s-%s" % (uid, recurrenceid or ""))
1.35 + page.li.close()
1.36 +
1.37 + page.ul.close()
1.38
1.39 else:
1.40 - self.page.p("There are no pending requests.")
1.41 -
1.42 - self.page.div.close()
1.43 + page.p("There are no pending requests.")
1.44 +
1.45 + page.div.close()
1.46
1.47 def show_participants_on_page(self):
1.48
1.49 "Show participants for scheduling purposes."
1.50
1.51 + page = self.page
1.52 args = self.env.get_args()
1.53 participants = args.get("participants", [])
1.54
1.55 @@ -1328,22 +1331,22 @@
1.56 # Show any specified participants together with controls to remove and
1.57 # add participants.
1.58
1.59 - self.page.div(id="participants")
1.60 -
1.61 - self.page.p("Participants for scheduling:")
1.62 + page.div(id="participants")
1.63 +
1.64 + page.p("Participants for scheduling:")
1.65
1.66 for i, participant in enumerate(participants):
1.67 - self.page.p()
1.68 - self.page.input(name="participants", type="text", value=participant)
1.69 - self.page.input(name="remove-participant-%d" % i, type="submit", value="Remove")
1.70 - self.page.p.close()
1.71 -
1.72 - self.page.p()
1.73 - self.page.input(name="participants", type="text")
1.74 - self.page.input(name="add-participant", type="submit", value="Add")
1.75 - self.page.p.close()
1.76 -
1.77 - self.page.div.close()
1.78 + page.p()
1.79 + page.input(name="participants", type="text", value=participant)
1.80 + page.input(name="remove-participant-%d" % i, type="submit", value="Remove")
1.81 + page.p.close()
1.82 +
1.83 + page.p()
1.84 + page.input(name="participants", type="text")
1.85 + page.input(name="add-participant", type="submit", value="Add")
1.86 + page.p.close()
1.87 +
1.88 + page.div.close()
1.89
1.90 return participants
1.91