Back to index

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

List of all members.

Public Member Functions

def __init__
def render
def available
def recent_items
def recently_modified_link
def update

Public Attributes

 anonymous
 portal_url
 typesToShow
 catalog
 context
 request
 view
 manager
 data

Private Member Functions

def _data

Static Private Attributes

tuple _template = ViewPageTemplateFile('recent.pt')

Detailed Description

Definition at line 39 of file recent.py.


Constructor & Destructor Documentation

Definition at line 42 of file recent.py.

00042 
00043     def __init__(self, *args):
00044         base.Renderer.__init__(self, *args)
00045 
00046         context = aq_inner(self.context)
00047         portal_state = getMultiAdapter((context, self.request), name=u'plone_portal_state')
00048         self.anonymous = portal_state.anonymous()
00049         self.portal_url = portal_state.portal_url()
00050         self.typesToShow = portal_state.friendly_types()
00051 
00052         plone_tools = getMultiAdapter((context, self.request), name=u'plone_tools')
00053         self.catalog = plone_tools.catalog()
        

Here is the caller graph for this function:


Member Function Documentation

Definition at line 69 of file recent.py.

00069 
00070     def _data(self):
00071         limit = self.data.count
00072         return self.catalog(portal_type=self.typesToShow,
00073                             sort_on='modified',
00074                             sort_order='reverse',
00075                             sort_limit=limit)[:limit]
00076 

Here is the caller graph for this function:

By default, portlets are available

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

Definition at line 59 of file recent.py.

00059 
00060     def available(self):
00061         return not self.anonymous and len(self._data())

Here is the call graph for this function:

Definition at line 62 of file recent.py.

00062 
00063     def recent_items(self):
00064         return self._data()

Here is the call graph for this function:

Definition at line 65 of file recent.py.

00065 
00066     def recently_modified_link(self):
00067         return '%s/recently_modified' % self.portal_url

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

Definition at line 55 of file recent.py.

00055 
00056     def render(self):
00057         return xhtml_compress(self._template())

Here is the call graph for this function:


Member Data Documentation

tuple plone.app.portlets.portlets.recent.Renderer._template = ViewPageTemplateFile('recent.pt') [static, private]

Definition at line 40 of file recent.py.

Definition at line 47 of file recent.py.

Definition at line 52 of file recent.py.

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.

Definition at line 48 of file recent.py.

Definition at line 76 of file base.py.

Definition at line 49 of file recent.py.

Definition at line 77 of file base.py.


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