def enabled(self): try: if IFileContent.providedBy(self.context): if self.context.getLayout() == 'documentviewer': return True else: return allowedDocumentType(self.context, GlobalSettings( getPortal(self.context)).auto_layout_file_types) else: return False except: return False
def enabled(self): try: if IFileContent.providedBy(self.context): if self.context.getLayout() == 'documentviewer': return True else: return allowedDocumentType( self.context, GlobalSettings(getPortal( self.context)).auto_layout_file_types) else: return False except: return False
def enabled(self): try: return IFileContent.providedBy(self.context) and \ self.context.getLayout() == 'page-turner' except: return False
def has_enclosure(self): return IFileContent.providedBy(self.context)