Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
plone.app.layout.viewlets.content.DocumentBylineViewlet Class Reference
Inheritance diagram for plone.app.layout.viewlets.content.DocumentBylineViewlet:
Inheritance graph
[legend]
Collaboration diagram for plone.app.layout.viewlets.content.DocumentBylineViewlet:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def update
def show
def locked_icon
def creator
def author
def authorname
def isExpired
def toLocalizedTime

Public Attributes

 context_state
 tools

Static Public Attributes

tuple index = ViewPageTemplateFile("document_byline.pt")

Detailed Description

Definition at line 32 of file content.py.


Member Function Documentation

Definition at line 76 of file content.py.

00076 
00077     def author(self):
00078         membership = self.tools.membership()
00079         return membership.getMemberInfo(self.creator())

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 81 of file content.py.

00081 
00082     def authorname(self):
00083         author = self.author()
00084         return author and author['fullname'] or self.creator()

Here is the call graph for this function:

Definition at line 72 of file content.py.

00072 
00073     def creator(self):
00074         return self.context.Creator()

Here is the caller graph for this function:

Definition at line 86 of file content.py.

00086 
00087     def isExpired(self):
00088         portal = self.portal_state.portal()
00089         return portal.restrictedTraverse('isExpired')(self.context)

Here is the call graph for this function:

Definition at line 49 of file content.py.

00049 
00050     def locked_icon(self):
00051         if not getSecurityManager().checkPermission('Modify portal content',
00052                                                     self.context):
00053             return ""
00054 
00055         locked = False
00056         lock_info = queryMultiAdapter((self.context, self.request),
00057                                       name='plone_lock_info')
00058         if lock_info is not None:
00059             locked = lock_info.is_locked()
00060         else:
00061             context = aq_inner(self.context)
00062             lockable = getattr(context.aq_explicit, 'wl_isLocked', None) is not None
00063             locked = lockable and context.wl_isLocked()
00064 
00065         if not locked:
00066             return ""
00067 
00068         portal = self.portal_state.portal()
00069         icon = portal.restrictedTraverse('lock_icon.gif')
00070         return icon.tag(title='Locked')

Here is the call graph for this function:

Definition at line 41 of file content.py.

00041 
00042     def show(self):
00043         properties = self.tools.properties()
00044         site_properties = getattr(properties, 'site_properties')
00045         anonymous = self.portal_state.anonymous()
00046         allowAnonymousViewAbout = site_properties.getProperty('allowAnonymousViewAbout', True)
00047         return not anonymous or allowAnonymousViewAbout

Here is the caller graph for this function:

def plone.app.layout.viewlets.content.DocumentBylineViewlet.toLocalizedTime (   self,
  time,
  long_format = None 
)
Convert time to localized time

Definition at line 91 of file content.py.

00091 
00092     def toLocalizedTime(self, time, long_format=None):
00093         """Convert time to localized time
00094         """
00095         util = getToolByName(self.context, 'translation_service')
00096         return util.ulocalized_time(time, long_format, self.context,
00097                                     domain='plonelocales')

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 33 of file content.py.

00033 
00034     def update(self):
00035         super(DocumentBylineViewlet, self).update()
00036         self.context_state = getMultiAdapter((self.context, self.request),
00037                                              name=u'plone_context_state')
00038         self.tools = getMultiAdapter((self.context, self.request),
00039                                      name='plone_tools')

Here is the caller graph for this function:


Member Data Documentation

Definition at line 35 of file content.py.

tuple plone.app.layout.viewlets.content.DocumentBylineViewlet.index = ViewPageTemplateFile("document_byline.pt") [static]

Definition at line 98 of file content.py.

Definition at line 37 of file content.py.


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