Logo Search packages:      
Sourcecode: zope-cmfworkflow version File versions

def DCWorkflow::DCWorkflow::DCWorkflowDefinition::listObjectActions (   self,
  info 
)

Allows this workflow to
include actions to be displayed in the actions box.
Called only when this workflow is applicable to
info.content.
Returns the actions to be displayed to the user.

Definition at line 170 of file DCWorkflow.py.

00170                                      :
        '''
        Allows this workflow to
        include actions to be displayed in the actions box.
        Called only when this workflow is applicable to
        info.content.
        Returns the actions to be displayed to the user.
        '''
        ob = info.content
        sdef = self._getWorkflowStateOf(ob)
        if sdef is None:
            return None
        sm = getSecurityManager()
        res = []
        for tid in sdef.transitions:
            tdef = self.transitions.get(tid, None)
            if tdef is not None and tdef.trigger_type == TRIGGER_USER_ACTION:
                if tdef.actbox_name:
                    if self._checkTransitionGuard(tdef, ob):
                        res.append((tid, {
                            'name': tdef.actbox_name % info,
                            'url': tdef.actbox_url % info,
                            'permissions': (),  # Predetermined.
                            'category': tdef.actbox_category}))
        res.sort()
        return map((lambda (id, val): val), res)

    security.declarePrivate('listGlobalActions')
    def listGlobalActions(self, info):


Generated by  Doxygen 1.6.0   Back to index