Back to index

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

List of all members.

Public Member Functions

def __init__
def render
def available
def published_events
def all_events_link
def prev_events_link
def update

Public Attributes

 portal_url
 portal
 have_events_folder
 context
 request
 view
 manager
 data

Private Member Functions

def _data

Static Private Attributes

tuple _template = ViewPageTemplateFile('events.pt')

Detailed Description

Definition at line 45 of file events.py.


Constructor & Destructor Documentation

Definition at line 49 of file events.py.

00049 
00050     def __init__(self, *args):
00051         base.Renderer.__init__(self, *args)
00052 
00053         portal_state = getMultiAdapter((self.context, self.request), name=u'plone_portal_state')
00054         self.portal_url = portal_state.portal_url()
00055         self.portal = portal_state.portal()
00056 
00057         self.have_events_folder = 'events' in self.portal.objectIds()

Here is the caller graph for this function:


Member Function Documentation

Definition at line 88 of file events.py.

00088 
00089     def _data(self):
00090         context = aq_inner(self.context)
00091         catalog = getToolByName(context, 'portal_catalog')
00092         limit = self.data.count
00093         state = self.data.state
00094         return catalog(portal_type='Event',
00095                        review_state=state,
00096                        end={'query': DateTime(),
00097                             'range': 'min'},
00098                        sort_on='start',
00099                        sort_limit=limit)[:limit]

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 69 of file events.py.

00069 
00070     def all_events_link(self):
00071         if self.have_events_folder:
00072             return '%s/events' % self.portal_url
00073         else:
00074             return '%s/events_listing' % self.portal_url

By default, portlets are available

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

Definition at line 63 of file events.py.

00063 
00064     def available(self):
00065         return len(self._data())

Here is the call graph for this function:

Definition at line 75 of file events.py.

00075 
00076     def prev_events_link(self):
00077         if (self.have_events_folder and
00078             'aggregator' in self.portal['events'].objectIds() and
00079             'previous' in self.portal['events']['aggregator'].objectIds()):
00080             return '%s/events/aggregator/previous' % self.portal_url
00081             
00082         elif (self.have_events_folder and
00083             'previous' in self.portal['events'].objectIds()):
00084             return '%s/events/previous' % self.portal_url
00085         else:
00086             return None

Here is the call graph for this function:

Definition at line 66 of file events.py.

00066 
00067     def published_events(self):
00068         return self._data()

Here is the call graph for this function:

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

Definition at line 59 of file events.py.

00059 
00060     def render(self):
00061         return xhtml_compress(self._template())

Here is the call graph for this function:


Member Data Documentation

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

Definition at line 47 of file events.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 56 of file events.py.

Definition at line 79 of file base.py.

Definition at line 54 of file events.py.

Definition at line 53 of file events.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: