Esempio n. 1
0
 def columns(self):
     ret = list()
     uid = self.uid
     provider = get_provider(self.context, self.flavor, uid)
     if provider is not None:
         ret = provider.rendered_columns(uid)
     while len(ret) < 4:
         ret.append('<div class="finder_column">&nbsp;</div>')
     return ret
Esempio n. 2
0
 def items(self):
     ret = list()
     uid = self.uid
     provider = get_provider(self.context, self.flavor, uid)
     if provider is None:
         return ret
     pactions = self.context.portal_actions
     actions = pactions.listFilteredActionsFor(provider.get(uid))
     for transition in actions['workflow']:
         ret.append({
             'title': transition['title'],
             'url': transition['url'],
             'style': 'background:none;',
             'css': None,
         })
     return ret
Esempio n. 3
0
 def items(self):
     ret = list()
     uid = self.uid
     provider = get_provider(self.context, self.flavor, uid)
     if provider is None:
         return ret
     menu = getUtility(IBrowserMenu, name=u'plone_contentmenu_factory')
     for item in menu.getMenuItems(provider.get(uid), self.request):
         css = default_type_css(item.get('id', ''))
         icon = item['icon']
         if icon:
             icon = 'background:url(\'' + icon + '\') no-repeat;'
         else:
             if not css:
                 icon = 'background:none;'
             else:
                 icon = None
         ret.append({
             'title': item['title'],
             'url': item['action'],
             'style': icon,
             'css': css,
         })
     return ret
Esempio n. 4
0
 def _execution_context(self):
     provider = get_provider(self.context, self.flavor, self.uid)
     if provider is None:
         return None
     return provider.get(self.uid)
Esempio n. 5
0
 def _render(self, view):
     uid = self.request.get('uid')
     provider = get_provider(self.context, self.flavor, uid)
     if provider is not None:
         return provider.render(uid, view)
     return u'<div class="finder_column"></div>'