from raptus.filesystemindex.interfaces import IFileSystemIndex from raptus.filesystemindex.config import PROJECTNAME from raptus.filesystemindex import _ @indexer(IFileSystemIndex) def is_folderish(obj): return True FileSystemIndexSchema = document.ATDocumentSchema.copy() + atapi.Schema(( atapi.StringField( 'fileSystemPath', storage = atapi.AnnotationStorage(), required=True, widget = atapi.StringWidget( label = _(u'label_filesystempath', default=u'Filesystem path'), description=_(u'help_filesystempath', default=u'The path of the folder to be displayed.'), ), ), atapi.StringField( 'winMount', storage = atapi.AnnotationStorage(), widget = atapi.StringWidget( label = _(u'label_winmount', default=u'Windows mount path'), description=_(u'help_winmount', default=u'The path to the folder when mounted on a windows machine.'), ), ),
def folders(self): return [{'name': _(u'Home'), 'target': '_self', 'icon': 'folder_icon.gif', 'link': self.context.absolute_url(), 'childs': self._recursive_get_items(self.root, 1)}]