Back to index

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

List of all members.

Public Member Functions

def update
def icon
def portal_url
def render
def index

Public Attributes

 object_actions
 getIconFor
 portal_actionicons
 context
 request
 view
 manager
 portal_state
 site_url

Static Public Attributes

tuple index = ViewPageTemplateFile('contentactions.pt')

Detailed Description

Definition at line 214 of file common.py.


Member Function Documentation

Definition at line 236 of file common.py.

00236 
00237     def icon(self, action):
00238         icon = action.get('icon', None)
00239         if icon is None:
00240             icon = self.getIconFor('content_actions', action['id'])
00241         return icon

Here is the caller graph for this function:

Reimplemented in plone.app.layout.viewlets.common.TitleViewlet.

Definition at line 46 of file common.py.

00046 
00047     def index(self):
00048         raise NotImplementedError(
00049             '`index` method must be implemented by subclass.')
00050 

Here is the caller graph for this function:

Definition at line 33 of file common.py.

00033 
00034     def portal_url(self):
00035         return self.site_url
00036 

Reimplemented in plone.app.layout.presentation.presentation.PresentationViewlet.

Definition at line 42 of file common.py.

00042 
00043     def render(self):
00044         # defer to index method, because that's what gets overridden by the template ZCML attribute
00045         return self.index()
        

Here is the call graph for this function:

Reimplemented from plone.app.layout.viewlets.common.ViewletBase.

Definition at line 217 of file common.py.

00217 
00218     def update(self):
00219         context = aq_inner(self.context)
00220         context_state = getMultiAdapter((context, self.request),
00221                                         name=u'plone_context_state')
00222 
00223         self.object_actions = context_state.actions().get('object_actions', [])
00224 
00225         plone_utils = getToolByName(context, 'plone_utils')
00226         self.getIconFor = plone_utils.getIconFor
00227 
00228         self.portal_actionicons = getToolByName(context, 'portal_actionicons')
00229         
00230         # The drop-down menus are pulled in via a simple content provider
00231         # from plone.app.contentmenu. This behaves differently depending on
00232         # whether the view is marked with IViewView. If our parent view 
00233         # provides that marker, we should do it here as well.
00234         if IViewView.providedBy(self.__parent__):
00235             alsoProvides(self, IViewView)
        

Here is the caller graph for this function:


Member Data Documentation

Definition at line 26 of file common.py.

Definition at line 225 of file common.py.

tuple plone.app.layout.viewlets.common.ContentActionsViewlet.index = ViewPageTemplateFile('contentactions.pt') [static]

Definition at line 215 of file common.py.

Definition at line 29 of file common.py.

Definition at line 222 of file common.py.

Definition at line 227 of file common.py.

Reimplemented in plone.app.layout.viewlets.common.TitleViewlet.

Definition at line 38 of file common.py.

Definition at line 27 of file common.py.

Definition at line 40 of file common.py.

Definition at line 28 of file common.py.


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