[CMF-checkins] CVS: CMF/CMFCore - ActionsTool.py:1.18.4.1 FSDTMLMethod.py:1.9.4.1 FSPageTemplate.py:1.2.4.1 PortalFolder.py:1.27.4.1 UndoTool.py:1.4.4.1
Andrew Sawyers
andrew@zope.com
Tue, 11 Dec 2001 10:54:24 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv16236/CMFCore
Modified Files:
Tag: ExtensionsBranch
ActionsTool.py FSDTMLMethod.py FSPageTemplate.py
PortalFolder.py UndoTool.py
Log Message:
*Prototype CMF with extensions for webdav
*Things will change to make this functionality baclwards
compatible; beware.
=== CMF/CMFCore/ActionsTool.py 1.18 => 1.18.4.1 ===
security.declarePrivate('listActions')
def listActions(self, info):
- return None
+ """
+ List actions available from this tool
+ """
+ if info.isAnonymous:
+ return None
+ else:
+ actions = []
+ folder_url = info.folder_url
+ content_url = info.content_url
+ if folder_url is not None:
+ actions.append(
+ { 'name' : 'Folder contents'
+ , 'url' : folder_url + '/folder_contents'
+ , 'permissions' : ['List folder contents']
+ , 'category' : 'folder'
+ })
+ return actions
security.declareProtected( CMFCorePermissions.ManagePortal
, 'deleteActionProvider'
=== CMF/CMFCore/FSDTMLMethod.py 1.9 => 1.9.4.1 ===
def __init__(self, id, filepath, fullname=None, properties=None):
+ if fullname:
+ f_name, f_ext = path.splitext(fullname)
+ if f_ext == '.css' or f_ext == '.js':
+ id = fullname
FSObject.__init__(self, id, filepath, fullname, properties)
# Normally called via HTML.__init__ but we don't need the rest that
# happens there.
@@ -139,4 +143,5 @@
registerFileExtension('dtml', FSDTMLMethod)
registerFileExtension('css', FSDTMLMethod)
+registerFileExtension('js', FSDTMLMethod)
registerMetaType('DTML Method', FSDTMLMethod)
=== CMF/CMFCore/FSPageTemplate.py 1.2 => 1.2.4.1 ===
def __init__(self, id, filepath, fullname=None, properties=None):
+ id = fullname or id
FSObject.__init__(self, id, filepath, fullname, properties)
self.ZBindings_edit(self._default_bindings)
=== CMF/CMFCore/PortalFolder.py 1.27 => 1.27.4.1 ===
, 'factory' : 'manage_addPortalFolder'
, 'filter_content_types' : 0
- , 'immediate_view' : 'folder_edit_form'
+ , 'immediate_view' : 'folder_edit_form.pt'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
@@ -50,26 +50,20 @@
}
, { 'id' : 'edit'
, 'name' : 'Edit'
- , 'action' : 'folder_edit_form'
+ , 'action' : 'folder_edit_form.pt'
, 'permissions' : (ManageProperties,)
, 'category' : 'folder'
}
, { 'id' : 'localroles'
, 'name' : 'Local Roles'
- , 'action' : 'folder_localrole_form'
+ , 'action' : 'folder_localrole_form.pt'
, 'permissions' : (ManageProperties,)
, 'category' : 'folder'
}
, { 'id' : 'syndication'
, 'name' : 'Syndication'
- , 'action' : 'synPropertiesForm'
+ , 'action' : 'synPropertiesForm.pt'
, 'permissions' : (ManageProperties,)
- , 'category' : 'folder'
- }
- , { 'id' : 'foldercontents'
- , 'name' : 'Folder contents'
- , 'action' : 'folder_contents'
- , 'permissions' : (CMFCorePermissions.ListFolderContents,)
, 'category' : 'folder'
}
)
=== CMF/CMFCore/UndoTool.py 1.4 => 1.4.4.1 ===
return []
return [ { 'name': 'Undo'
- , 'url': 'undo_form'
+ , 'url': 'undo_form.pt'
, 'permissions': [ ListUndoableChanges ]
, 'category': 'global'
} ]