Ejemplo n.º 1
0
    def build(self):
        menu = getMenu('plone_contentmenu', self.context, self.request)
        menu = self.separateMenu(menu)
        results = self._parse(menu)

        context_state = getMultiAdapter((self.context, self.request), name=u'plone_context_state')
        actions = context_state.actions
        action_list = []
        if context_state.is_structural_folder():
            action_list = actions('folder')
        action_list.extend(self.filterActionlist(actions('object')))

        contentaction = OrderedDict()

        for action in action_list:
            di = OrderedDict(label=translate(_p(action.get('title')), context=self.request),
                       action=self._action(action.get('url')),
                       icon=action.get('id'),
                      )
            contentaction[action.get('id')] = di

        results['contentaction'] = OrderedDict(label=translate(_('Content actions'), context=self.request), submenu=contentaction)

        return results
Ejemplo n.º 2
0
 def title(self):
     return _('Security')
Ejemplo n.º 3
0
 def title(self):
     return _('Folder')
Ejemplo n.º 4
0
 def title(self):
     return _('General information')
Ejemplo n.º 5
0
 def title(self):
     return _('Plone Site')
Ejemplo n.º 6
0
 def suffix(self):
     return _('Subcontent')
Ejemplo n.º 7
0
 def title(self):
     return _('Article')