Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
plone.app.portlets.portlets.review.Renderer Class Reference
Inheritance diagram for plone.app.portlets.portlets.review.Renderer:
Inheritance graph
[legend]
Collaboration diagram for plone.app.portlets.portlets.review.Renderer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def anonymous
def available
def review_items
def full_review_link
def update
def render

Public Attributes

 context
 request
 view
 manager
 data

Static Public Attributes

tuple render = ViewPageTemplateFile('review.pt')

Private Member Functions

def _data

Detailed Description

Definition at line 28 of file review.py.


Member Function Documentation

Definition at line 53 of file review.py.

00053 
00054     def _data(self):
00055         if self.anonymous:
00056             return []
00057         context = aq_inner(self.context)
00058         workflow = getToolByName(context, 'portal_workflow')
00059 
00060         plone_view = getMultiAdapter((context, self.request), name=u'plone')
00061         getIcon = plone_view.getIcon
00062         toLocalizedTime = plone_view.toLocalizedTime
00063 
00064         idnormalizer = queryUtility(IIDNormalizer)
00065         norm = idnormalizer.normalize
00066         objects = workflow.getWorklistsResults()
00067         items = []
00068         for obj in objects:
00069             review_state = workflow.getInfoFor(obj, 'review_state')
00070             items.append(dict(
00071                 path = obj.absolute_url(),
00072                 title = obj.pretty_title_or_id(),
00073                 description = obj.Description(),
00074                 icon = getIcon(obj).html_tag(),
00075                 creator = obj.Creator(),
00076                 review_state = review_state,
00077                 review_state_class = 'state-%s ' % norm(review_state),
00078                 mod_date = toLocalizedTime(obj.ModificationDate()),
00079             ))
00080         return items
00081 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 33 of file review.py.

00033 
00034     def anonymous(self):
00035         context = aq_inner(self.context)
00036         portal_state = getMultiAdapter((context, self.request),
00037                                        name=u'plone_portal_state')
00038         return portal_state.anonymous()

Here is the caller graph for this function:

By default, portlets are available

Reimplemented from plone.app.portlets.portlets.base.Renderer.

Definition at line 40 of file review.py.

00040 
00041     def available(self):
00042         return not self.anonymous and len(self._data())

Here is the call graph for this function:

Definition at line 46 of file review.py.

00046 
00047     def full_review_link(self):
00048         context = aq_inner(self.context)
00049         portal_state = getMultiAdapter((context, self.request),
00050                                        name=u'plone_portal_state')
00051         return '%s/full_review_list' % portal_state.portal_url()

Reimplemented in plone.app.portlets.portlets.navigation.Renderer, plone.app.portlets.portlets.base.DeferredRenderer, plone.app.portlets.portlets.calendar.Renderer, plone.app.portlets.portlets.events.Renderer, plone.app.portlets.portlets.recent.Renderer, and plone.app.portlets.portlets.news.Renderer.

Definition at line 85 of file base.py.

00085 
00086     def render(self):
00087         raise NotImplementedError("You must implement 'render' as a method "
00088                                   "or page template file attribute")

Definition at line 43 of file review.py.

00043 
00044     def review_items(self):
00045         return self._data()

Here is the call graph for this function:


Member Data Documentation

Reimplemented in plone.app.portlets.portlets.classic.Renderer.

Definition at line 75 of file base.py.

Reimplemented in plone.app.portlets.portlets.classic.Renderer.

Definition at line 80 of file base.py.

Definition at line 79 of file base.py.

tuple plone.app.portlets.portlets.review.Renderer.render = ViewPageTemplateFile('review.pt') [static]

Definition at line 30 of file review.py.

Definition at line 76 of file base.py.

Definition at line 77 of file base.py.


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