Back to index

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

List of all members.

Public Member Functions

def __call__

Static Public Attributes

tuple template = ViewPageTemplateFile('checkin.pt')

Detailed Description

Definition at line 35 of file checkin.py.


Member Function Documentation

Definition at line 39 of file checkin.py.

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

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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

Definition at line 37 of file checkin.py.


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