Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
plone.app.iterate.browser.cancel.Cancel Class Reference
Inheritance diagram for plone.app.iterate.browser.cancel.Cancel:
Inheritance graph
[legend]
Collaboration diagram for plone.app.iterate.browser.cancel.Cancel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __call__

Static Public Attributes

tuple template = ViewPageTemplateFile('cancel.pt')

Detailed Description

Definition at line 35 of file cancel.py.


Member Function Documentation

Definition at line 39 of file cancel.py.

00039 
00040     def __call__(self):
00041         context = aq_inner(self.context)
00042         
00043         if self.request.form.has_key('form.button.Cancel'):
00044             control = getMultiAdapter((context, self.request), name=u"iterate_control")
00045             if not control.cancel_allowed():
00046                 raise CheckoutException(u"Not a checkout")
00047 
00048             policy = ICheckinCheckoutPolicy(context)
00049             baseline = policy.cancelCheckout()
00050             baseline.reindexObject()
00051             
00052             IStatusMessage(self.request).addStatusMessage(_(u"Checkout cancelled"), type='info')
00053             view_url = baseline.restrictedTraverse("@@plone_context_state").view_url()
00054             self.request.response.redirect(view_url)
00055         elif self.request.form.has_key('form.button.Keep'):
00056             view_url = context.restrictedTraverse("@@plone_context_state").view_url()
00057             self.request.response.redirect(view_url)
00058         else:
00059             return self.template()
00060 

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

tuple plone.app.iterate.browser.cancel.Cancel.template = ViewPageTemplateFile('cancel.pt') [static]

Definition at line 37 of file cancel.py.


The documentation for this class was generated from the following file: