def available(self): if IContentsPage.providedBy(self.request): # Don't display action menu on folder_contents page. # The cut/copy/paste submenu items are too confusing in this view. return False actions_tool = getToolByName(self.context, 'portal_actions') editActions = actions_tool.listActionInfos(object=self.context, categories=('object_buttons',), max=1) return len(editActions) > 0
def available(self): if IContentsPage.providedBy(self.request): # Don't display action menu on folder_contents page. # The cut/copy/paste submenu items are too confusing in this view. return False actions_tool = getToolByName(self.context, 'portal_actions') editActions = actions_tool.listActionInfos( object=self.context, categories=('object_buttons', ), max=1) return len(editActions) > 0
def disabled(self): # From: plone.app.contentmenu.menu.DisplayMenuSubMenuItem.disabled: if IContentsPage.providedBy(self.request): return True context = self.context if not getattr(context, 'isPrincipiaFolderish', False): return False elif 'index_html' not in context.objectIds(): return False else: return True
def disabled(self): if IContentsPage.providedBy(self.request): return True context = self.context if self.context_state.is_default_page(): context = utils.parent(context) if not getattr(context, 'isPrincipiaFolderish', False): return False elif 'index_html' not in context.objectIds(): return False else: return True
def disabled(self): if IContentsPage.providedBy(self.request): return True context = self.context if self.context_state.is_default_page(): context = utils.parent(context) if not getattr(context, 'isPrincipiaFolderish', False): return False # By default an index_html signals disabled Display Menu, we don't want # that, so we return False, not disabled, by default elif 'index_html' in context: return False else: return False
def disabled(self): # As we don't have the view we need to parse the url to see # if its folder_contents if 'folder_contents' in self.request.getURL().split('/'): return True if IContentsPage.providedBy(self.request): return True context = self.context if self.context_state.is_default_page(): context = utils.parent(context) if not getattr(context, 'isPrincipiaFolderish', False): return False elif 'index_html' not in context.objectIds(): return False else: return True
def available(self): if IContentsPage.providedBy(self.request): return False actions_tool = getToolByName(self.context, 'portal_actions') editActions = actions_tool.listActionInfos(object=self.context, categories=('object_buttons',), max=1) return len(editActions) > 0
def available(self): if IContentsPage.providedBy(self.request): return False return (self.context_state.workflow_state() is not None)