Logo Search packages:      
Sourcecode: zope-cpsskins version File versions  Download package

def CPSSkins::PortalThemesTool::PortalThemesTool::renderAccessKey (   self,
  actions = [],
  kw 
)

Render the access key html markup

Definition at line 1120 of file PortalThemesTool.py.

01120                                                :
        """Render the access key html markup
        """
        rendered = ''

        if not actions:
            atool = getToolByName(self, 'portal_actions')
            actions = atool.listFilteredActionsFor(self)

        actions_by_cat = actions.get(THEME_CONFIG_ACTION_CATEGORY)
        if actions_by_cat is None:
            return rendered
        theme_manage_action = [
            ac for ac in actions_by_cat
            if ac.get('id') == THEME_CONFIG_ACTION_ID]

        if len(theme_manage_action) > 0:
            action = theme_manage_action[0]
        else:
            return rendered

        rendered = ('<a href="%s" accesskey="%s"></a>'
                    % (action['url'], self.getAccessKey()))
        return rendered

    security.declarePublic('renderAccessKeys')
    def renderAccessKeys(self, **kw):


Generated by  Doxygen 1.6.0   Back to index