Back to index

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

List of all members.

Public Member Functions

def render
def baseline
def update
def created
def creator
def creator_url
def creator_name
def properties

Public Attributes

 view
 manager

Static Public Attributes

tuple template = ViewPageTemplateFile('info_checkout.pt')

Private Member Functions

def _getReference

Detailed Description

Definition at line 103 of file info.py.


Member Function Documentation

Reimplemented from plone.app.iterate.browser.info.BaseInfoViewlet.

Definition at line 122 of file info.py.

00122 
00123     def _getReference( self ):
00124         refs = self.context.getReferenceImpl( WorkingCopyRelation.relationship )
00125         if len( refs ) > 0:
00126             return refs[0]
00127         else:
00128             return None
00129         

Definition at line 115 of file info.py.

00115 
00116     def baseline( self ):
00117         refs = self.context.getReferences( WorkingCopyRelation.relationship )
00118         if len( refs ) > 0:
00119             return refs[0]
00120         else:
00121             return None
    

Here is the caller graph for this function:

Definition at line 41 of file info.py.

00041 
00042     def created( self ):
00043         time = self.properties.get( keys.checkout_time, DateTime() )
00044         util = getToolByName(self.context, 'translation_service')
00045         return util.ulocalized_time(time, None, self.context, domain='plonelocales')

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 47 of file info.py.

00047 
00048     def creator( self ):
00049         user_id = self.properties.get( keys.checkout_user )
00050         membership = getToolByName(self.context, 'portal_membership')
00051         if not user_id:
00052             return membership.getAuthenticatedMember()
00053         return membership.getMemberById( user_id )
        

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 61 of file info.py.

00061 
00062     def creator_name( self ):
00063         creator = self.creator()
00064         return creator.getProperty('fullname') or creator.getId()

Here is the call graph for this function:

Definition at line 55 of file info.py.

00055 
00056     def creator_url( self ):
00057         creator = self.creator()
00058         portal_url = getToolByName(self.context, 'portal_url')
00059         return "%s/author/%s" % ( portal_url(), creator.getId() )
        

Here is the call graph for this function:

Definition at line 67 of file info.py.

00067 
00068     def properties( self ):
00069         wc_ref = self._getReference()
00070         if wc_ref is not None:
00071             return get_storage( wc_ref )
00072         else:
00073             return {}

Here is the call graph for this function:

Reimplemented from plone.app.iterate.browser.info.BaseInfoViewlet.

Definition at line 107 of file info.py.

00107 
00108     def render(self):
00109         if self.baseline() is not None and \
00110             getSecurityManager().checkPermission(ModifyPortalContent, self.context):
00111             return self.template()
00112         else:
00113             return ""
    

Here is the call graph for this function:

Definition at line 34 of file info.py.

00034 
00035     def update( self ):
00036         pass
    

Here is the caller graph for this function:


Member Data Documentation

Definition at line 32 of file info.py.

tuple plone.app.iterate.browser.info.CheckoutInfoViewlet.template = ViewPageTemplateFile('info_checkout.pt') [static]

Definition at line 105 of file info.py.

Definition at line 31 of file info.py.


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