Exemplo n.º 1
0
 def items_by_configlets(self, group):
     ret = list()
     pu = self.context.plone_utils
     cp_items = ControlPanelItems(self.context)
     configlets = cp_items.items_by_group(group)
     for item in configlets:
         if not item['available'] or not item['allowed']:
             continue
         try:
             icon = pu.getIconFor('controlpanel', item['id'])
         except KeyError, e:
             icon = ''
         ret.append(nav_item(item_id(item['id']),
                             icon,
                             item['title'],
                             False,
                             False)) # XXX selected.
Exemplo n.º 2
0
 def _action(self):
     cp_items = ControlPanelItems(self.context)
     return cp_items.item_by_id(self._raw_uid, groups=[self._group])
Exemplo n.º 3
0
 def _ac_actions(self):
     cp_items = ControlPanelItems(self.context)
     return [i['id'] for i in cp_items.items_by_group('Products')]
Exemplo n.º 4
0
 def provides(self, uid):
     cp_items = ControlPanelItems(self.context)
     cp_item = cp_items.item_by_id(uid, groups=self.CONFIGLET_GROUPS)
     if cp_item:
         return True
     return False