[CMF-checkins] CVS: CMF/CMFDefault - DiscussionItem.py:1.34 Document.py:1.57 Favorite.py:1.20 File.py:1.26 Image.py:1.24 Link.py:1.27 NewsItem.py:1.19 SkinnedFolder.py:1.14
Yvo Schubbe
schubbe@web.de
Fri, 9 May 2003 17:40:55 -0400
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv22169/CMFDefault
Modified Files:
DiscussionItem.py Document.py Favorite.py File.py Image.py
Link.py NewsItem.py SkinnedFolder.py
Log Message:
Merged yuppie-collector152-branch:
- Made type actions absolute URLs by default. (Collector #152)
=== CMF/CMFDefault/DiscussionItem.py 1.33 => 1.34 ===
--- CMF/CMFDefault/DiscussionItem.py:1.33 Tue Apr 15 12:08:03 2003
+++ CMF/CMFDefault/DiscussionItem.py Fri May 9 17:40:24 2003
@@ -48,7 +48,7 @@
, 'immediate_view' : ''
, 'actions' : ( { 'id' : 'view'
, 'name' : 'View'
- , 'action' : 'string:discussionitem_view'
+ , 'action': 'string:${object_url}/discussionitem_view'
, 'permissions' : (View,)
}
,
=== CMF/CMFDefault/Document.py 1.56 => 1.57 ===
--- CMF/CMFDefault/Document.py:1.56 Tue Apr 15 12:08:03 2003
+++ CMF/CMFDefault/Document.py Fri May 9 17:40:24 2003
@@ -44,17 +44,17 @@
, 'immediate_view' : 'metadata_edit_form'
, 'actions' : ( { 'id' : 'view'
, 'name' : 'View'
- , 'action' : 'string:document_view'
+ , 'action': 'string:${object_url}/document_view'
, 'permissions' : (View,)
}
, { 'id' : 'edit'
, 'name' : 'Edit'
- , 'action' : 'string:document_edit_form'
+ , 'action': 'string:${object_url}/document_edit_form'
, 'permissions' : (ModifyPortalContent,)
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
- , 'action' : 'string:metadata_edit_form'
+ , 'action': 'string:${object_url}/metadata_edit_form'
, 'permissions' : (ModifyPortalContent,)
}
)
=== CMF/CMFDefault/Favorite.py 1.19 => 1.20 ===
--- CMF/CMFDefault/Favorite.py:1.19 Tue Apr 15 12:08:03 2003
+++ CMF/CMFDefault/Favorite.py Fri May 9 17:40:24 2003
@@ -1,21 +1,20 @@
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
-#
+#
##############################################################################
-""" Favorites are references to other objects within the same CMF site..
+""" Favorites are references to other objects within the same CMF site.
$Id$
"""
-import string
import urlparse
from Globals import InitializeClass
@@ -39,17 +38,17 @@
, 'immediate_view' : 'metadata_edit_form'
, 'actions' : ( { 'id' : 'view'
, 'name' : 'View'
- , 'action' : 'string:favorite_view'
+ , 'action': 'string:${object_url}/favorite_view'
, 'permissions' : ( View, )
}
, { 'id' : 'edit'
, 'name' : 'Edit'
- , 'action' : 'string:link_edit_form'
+ , 'action': 'string:${object_url}/link_edit_form'
, 'permissions' : ( ModifyPortalContent, )
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
- , 'action' : 'string:metadata_edit_form'
+ , 'action': 'string:${object_url}/metadata_edit_form'
, 'permissions' : ( ModifyPortalContent, )
}
)
@@ -137,7 +136,7 @@
remote_url=urlparse.urlunparse(t)
# if URL begins with site URL, remove site URL
portal_url = getToolByName(self, 'portal_url').getPortalPath()
- i=string.find(remote_url, portal_url)
+ i = remote_url.find(portal_url)
if i==0:
remote_url=remote_url[len(portal_url):]
# if site is still absolute, make it relative
=== CMF/CMFDefault/File.py 1.25 => 1.26 ===
--- CMF/CMFDefault/File.py:1.25 Tue Apr 15 12:08:03 2003
+++ CMF/CMFDefault/File.py Fri May 9 17:40:24 2003
@@ -1,20 +1,20 @@
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
-#
+#
##############################################################################
-
-"""
-This module implements a portal-managed File class. It is based on
+""" This module implements a portal-managed File class. It is based on
Zope's built-in File object, but modifies the behaviour slightly to
make it more Portal-friendly.
+
+$Id$
"""
from Globals import InitializeClass
@@ -40,22 +40,22 @@
, 'immediate_view' : 'metadata_edit_form'
, 'actions' : ( { 'id' : 'view'
, 'name' : 'View'
- , 'action' : 'string:file_view'
+ , 'action': 'string:${object_url}/file_view'
, 'permissions' : (View,)
}
, { 'id' : 'download'
, 'name' : 'Download'
- , 'action' : 'string:'
+ , 'action': 'string:${object_url}'
, 'permissions' : (View,)
}
, { 'id' : 'edit'
, 'name' : 'Edit'
- , 'action' : 'string:file_edit_form'
+ , 'action': 'string:${object_url}/file_edit_form'
, 'permissions' : (ModifyPortalContent,)
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
- , 'action' : 'string:metadata_edit_form'
+ , 'action': 'string:${object_url}/metadata_edit_form'
, 'permissions' : (ModifyPortalContent,)
}
)
=== CMF/CMFDefault/Image.py 1.23 => 1.24 ===
--- CMF/CMFDefault/Image.py:1.23 Tue Apr 15 12:08:03 2003
+++ CMF/CMFDefault/Image.py Fri May 9 17:40:24 2003
@@ -1,19 +1,19 @@
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
-#
+#
##############################################################################
-
-"""
-This module implements a portal-managed Image class. It is based on
+""" This module implements a portal-managed Image class. It is based on
Zope's built-in Image object.
+
+$Id$
"""
from Globals import InitializeClass
@@ -38,17 +38,17 @@
, 'immediate_view' : 'metadata_edit_form'
, 'actions' : ( { 'id' : 'view'
, 'name' : 'View'
- , 'action' : 'string:image_view'
+ , 'action': 'string:${object_url}/image_view'
, 'permissions' : (View,)
}
, { 'id' : 'edit'
, 'name' : 'Edit'
- , 'action' : 'string:image_edit_form'
+ , 'action': 'string:${object_url}/image_edit_form'
, 'permissions' : (ModifyPortalContent,)
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
- , 'action' : 'string:metadata_edit_form'
+ , 'action': 'string:${object_url}/metadata_edit_form'
, 'permissions' : (ModifyPortalContent,)
}
)
=== CMF/CMFDefault/Link.py 1.26 => 1.27 ===
--- CMF/CMFDefault/Link.py:1.26 Tue Apr 15 12:08:03 2003
+++ CMF/CMFDefault/Link.py Fri May 9 17:40:24 2003
@@ -1,21 +1,20 @@
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
-#
+#
##############################################################################
""" Link instances represent explicit links-as-content.
$Id$
"""
-import string
import urlparse
from Globals import InitializeClass, DTMLFile
@@ -43,17 +42,17 @@
, 'immediate_view' : 'metadata_edit_form'
, 'actions' : ( { 'id' : 'view'
, 'name' : 'View'
- , 'action' : 'string:link_view'
+ , 'action': 'string:${object_url}/link_view'
, 'permissions' : (View,)
}
, { 'id' : 'edit'
, 'name' : 'Edit'
- , 'action' : 'string:link_edit_form'
+ , 'action': 'string:${object_url}/link_edit_form'
, 'permissions' : (ModifyPortalContent,)
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
- , 'action' : 'string:metadata_edit_form'
+ , 'action': 'string:${object_url}/metadata_edit_form'
, 'permissions' : (ModifyPortalContent,)
}
)
@@ -169,7 +168,7 @@
def _writeFromPUT( self, body ):
headers = {}
headers, body = parseHeadersBody(body, headers)
- lines = string.split( body, '\n' )
+ lines = body.split('\n')
self.edit( lines[0] )
headers['Format'] = self.URL_FORMAT
new_subject = keywordsplitter(headers)
@@ -214,8 +213,6 @@
"""
Get the link as text for WebDAV src / FTP download.
"""
- join = string.join
- lower = string.lower
hdrlist = self.getMetadataHeaders()
hdrtext = formatRFC822Headers( hdrlist )
bodytext = '%s\n\n%s' % ( hdrtext, self.getRemoteUrl() )
=== CMF/CMFDefault/NewsItem.py 1.18 => 1.19 ===
--- CMF/CMFDefault/NewsItem.py:1.18 Tue Apr 15 12:08:03 2003
+++ CMF/CMFDefault/NewsItem.py Fri May 9 17:40:24 2003
@@ -1,16 +1,18 @@
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
-#
+#
##############################################################################
-"""
+""" News content object.
+
+$Id$
"""
from Globals import InitializeClass
@@ -35,17 +37,17 @@
, 'immediate_view' : 'metadata_edit_form'
, 'actions' : ( { 'id' : 'view'
, 'name' : 'View'
- , 'action' : 'string:newsitem_view'
+ , 'action': 'string:${object_url}/newsitem_view'
, 'permissions' : (View,)
}
, { 'id' : 'edit'
, 'name' : 'Edit'
- , 'action' : 'string:newsitem_edit_form'
+ , 'action': 'string:${object_url}/newsitem_edit_form'
, 'permissions' : (ModifyPortalContent,)
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
- , 'action' : 'string:metadata_edit_form'
+ , 'action': 'string:${object_url}/metadata_edit_form'
, 'permissions' : (ModifyPortalContent,)
}
)
=== CMF/CMFDefault/SkinnedFolder.py 1.13 => 1.14 ===
--- CMF/CMFDefault/SkinnedFolder.py:1.13 Tue Apr 15 12:08:03 2003
+++ CMF/CMFDefault/SkinnedFolder.py Fri May 9 17:40:24 2003
@@ -1,27 +1,26 @@
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
-#
+#
##############################################################################
-"""
- Allow the "view" of a folder to be skinned by type.
+""" Allow the "view" of a folder to be skinned by type.
+
+$Id$
"""
from Products.CMFCore.PortalFolder import PortalFolder
-from Products.CMFCore.utils import getToolByName
from Products.CMFCore.CMFCorePermissions import View
from Products.CMFCore.CMFCorePermissions import ManageProperties
from Products.CMFCore.CMFCorePermissions import ListFolderContents
-from AccessControl import ClassSecurityInfo, Owned
+from AccessControl import ClassSecurityInfo
from Globals import InitializeClass
-from ComputedAttribute import ComputedAttribute
from Products.CMFCore.utils import _getViewFor
from Products.CMFCore.CMFCatalogAware import CMFCatalogAware
from Acquisition import aq_base
@@ -39,19 +38,19 @@
, 'immediate_view' : 'folder_edit_form'
, 'actions' : ( { 'id' : 'view'
, 'name' : 'View'
- , 'action' : 'string:folder_view'
+ , 'action': 'string:${object_url}/folder_view'
, 'permissions' : (View,)
, 'category' : 'folder'
}
, { 'id' : 'edit'
, 'name' : 'Edit'
- , 'action' : 'string:folder_edit_form'
+ , 'action': 'string:${object_url}/folder_edit_form'
, 'permissions' : (ManageProperties,)
, 'category' : 'folder'
}
, { 'id' : 'foldercontents'
, 'name' : 'Folder contents'
- , 'action' : 'string:folder_contents'
+ , 'action': 'string:${object_url}/folder_contents'
, 'permissions' : (ListFolderContents,)
, 'category' : 'folder'
}