[Zope-Checkins] CVS: Zope2 - Management.py:1.48
evan@serenade.digicool.com
evan@serenade.digicool.com
Fri, 8 Jun 2001 14:15:55 -0400
Update of /cvs-repository/Zope2/lib/python/App
In directory serenade:/home/evan/Zope/trunk/lib/python/App
Modified Files:
Management.py
Log Message:
Made meta-type in the management interface of ZClass instances into a link to the ZClass definition.
--- Updated File Management.py in package Zope2 --
--- Management.py 2001/01/16 21:26:56 1.47
+++ Management.py 2001/06/08 18:15:24 1.48
@@ -193,6 +193,24 @@
out.append(last)
return join(out, '/')
+ class_manage_path__roles__=None
+ def class_manage_path(self):
+ if self.__class__.__module__[:1] != '*': return
+ path = getattr(self.__class__, '_v_manage_path_roles', None)
+ if path is None:
+ meta_type = self.meta_type
+ for zclass in self.getPhysicalRoot()._getProductRegistryData(
+ 'zclasses'):
+ if zclass['meta_type'] == meta_type:
+ break
+ else:
+ self.__class__._v_manage_path_roles = ''
+ return
+ path = self.__class__._v_manage_path_roles = (
+ '%(product)s/%(id)s' % zclass)
+ if path:
+ return '/Control_Panel/Products/%s/manage_workspace' % path
+
Globals.default__class_init__(Tabs)