[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS - FolderContents.py:1.1.2.1 Folder.py:1.1.2.6 IContainer.py:1.1.2.4 RootFolder.py:1.1.2.4 __init__.py:1.1.2.2
Tres Seaver
tseaver@zope.com
Tue, 20 Nov 2001 10:05:56 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS
In directory cvs.zope.org:/tmp/cvs-serv29829/lib/python/Zope/App/OFS
Modified Files:
Tag: Zope-3x-branch
Folder.py IContainer.py RootFolder.py __init__.py
Added Files:
Tag: Zope-3x-branch
FolderContents.py
Log Message:
- Yeehaw!
=== Added File Zope3/lib/python/Zope/App/OFS/FolderContents.py ===
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
"""
Define presentation component for folder contents.
"""
import os
from Zope.Publisher.Browser.AttributePublisher import AttributePublisher
from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
from Zope.PageTemplate.PageTemplateFile import PageTemplateFile
class FolderContents( AttributePublisher ):
__implements__ = AttributePublisher.__implements__
def __init__( self, folder ):
self._folder = folder
def _extractContentInfo( self, item ):
info = {}
info['id'] = item[0]
info['object'] = item[1]
# XXX: We will fake this stuff out for now
info[ 'title' ] = info[ 'url' ] = item[0]
info['icon'] = None
return info
def listContentInfo( self ):
return map( self._extractContentInfo, self._folder.objectItems() )
#
# Make it possible for 'index' to find the folder.
#
def getContext( self ):
return self._folder
index = PageTemplateFile( 'folder_main.pt'
, '%s/www' % os.path.dirname(__file__)
)
=== Zope3/lib/python/Zope/App/OFS/Folder.py 1.1.2.5 => 1.1.2.6 ===
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+
from IContainer import IContainer
=== Zope3/lib/python/Zope/App/OFS/IContainer.py 1.1.2.3 => 1.1.2.4 ===
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+
from Interface import Interface
=== Zope3/lib/python/Zope/App/OFS/RootFolder.py 1.1.2.3 => 1.1.2.4 ===
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+
from Folder import IFolder, Folder
=== Zope3/lib/python/Zope/App/OFS/__init__.py 1.1.2.1 => 1.1.2.2 ===
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+
"""Zope OFS (object file system) package."""