[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services - changeconfigurations.py:1.3 configure.zcml:1.32 package.py:1.3 service.py:1.13
Jim Fulton
jim@zope.com
Tue, 18 Mar 2003 16:02:51 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/services
In directory cvs.zope.org:/tmp/cvs-serv21177/src/zope/app/browser/services
Modified Files:
changeconfigurations.py configure.zcml package.py service.py
Log Message:
Removed "Packages" from the object hierarchy in site managers (service
managers). We now traverse directly from site managers to individual
site-management folders.
This change is backward compatible because the underlying data
structures haven't changed.
=== Zope3/src/zope/app/browser/services/changeconfigurations.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/services/changeconfigurations.py:1.2 Wed Dec 25 09:12:36 2002
+++ Zope3/src/zope/app/browser/services/changeconfigurations.py Tue Mar 18 16:02:20 2003
@@ -55,7 +55,7 @@
self.configBase = str(getView(getServiceManager(self.context),
'absolute_url', self.request)
- ) + '/Packages'
+ )
configurations = self.context.info()
=== Zope3/src/zope/app/browser/services/configure.zcml 1.31 => 1.32 ===
--- Zope3/src/zope/app/browser/services/configure.zcml:1.31 Thu Mar 13 12:10:35 2003
+++ Zope3/src/zope/app/browser/services/configure.zcml Tue Mar 18 16:02:20 2003
@@ -529,7 +529,7 @@
<page
for="zope.app.interfaces.services.service.IServiceManager"
- name="index.html"
+ name="services.html"
menu="zmi_views" title="Services"
template="services.pt"
class=".service.ServiceSummary"
@@ -555,57 +555,46 @@
for="zope.app.interfaces.services.service.IServiceManager"
>
<menuItem
- title="View local packages"
- action="Packages/@@SelectedManagementView.html"
- permission="zope.ManageServices"
- />
- <menuItem
title="Visit default package"
- action="Packages/default/@@SelectedManagementView.html"
+ action="default/@@SelectedManagementView.html"
permission="zope.ManageServices"
/>
<menuItem
title="Add service"
- action="Packages/default/AddService"
+ action="default/AddService"
permission="zope.ManageServices"
/>
</menuItems>
-<!-- Packages -->
-
<pages
- for="zope.app.interfaces.services.package.IPackages"
+ for="zope.app.interfaces.services.service.IServiceManager"
permission="zope.ManageServices"
class="zope.app.browser.services.package.PackagesContents">
<page name="contents.html"
- attribute="index"
- />
+ attribute="index"
+ menu="zmi_views" title="Contents"
+ />
<page name="addPackage.html"
- attribute="addPackage"
- />
+ attribute="addPackage"
+ />
<page name="removeObjects.html"
- attribute="removeObjects"
- />
+ attribute="removeObjects"
+ />
</pages>
- <menuItem
- menu="zmi_views"
- for="zope.app.interfaces.services.package.IPackages"
- title="Packages"
- action="@@contents.html"
- />
+ <!-- Disable the add action -->
<menuItem
menu="zmi_actions"
- for="zope.app.interfaces.services.package.IPackages"
+ for="zope.app.interfaces.services.service.IServiceManager"
title="Add"
action="@@contents.html"
filter="nothing"
/>
<pages
- for="zope.app.interfaces.services.package.IPackages"
+ for="zope.app.interfaces.services.service.IServiceManager"
permission="zope.ManageServices"
class="zope.app.browser.container.contents.JustContents">
@@ -631,14 +620,12 @@
class="zope.app.browser.container.contents.Contents"
>
- <page name="contents.html" attribute="contents" />
+ <page name="contents.html"
+ attribute="contents"
+ menu="zmi_views" title="Contents"
+ />
<page name="removeObjects.html" attribute="removeObjects" />
</pages>
-
- <menuItems menu="zmi_views" for="zope.app.interfaces.services.package.IPackage">
- <menuItem title="Services"
- action="@@contents.html"/>
- </menuItems>
<view
name="+"
=== Zope3/src/zope/app/browser/services/package.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/services/package.py:1.2 Wed Dec 25 09:12:36 2002
+++ Zope3/src/zope/app/browser/services/package.py Tue Mar 18 16:02:20 2003
@@ -30,7 +30,7 @@
def add(self, name):
self.context.setObject(name, ZPTTemplate())
- self.request.response.redirect('.')
+ self.request.response.redirect('@@contents.html')
class PackagesContents(Contents):
@@ -41,4 +41,4 @@
def addPackage(self, name):
self.context.setObject(name, Package())
- self.request.response.redirect('.')
+ self.request.response.redirect('@@contents.html')
=== Zope3/src/zope/app/browser/services/service.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/browser/services/service.py:1.12 Thu Mar 13 12:04:57 2003
+++ Zope3/src/zope/app/browser/services/service.py Tue Mar 18 16:02:20 2003
@@ -259,7 +259,7 @@
if active == "None":
new_active = None
else:
- new_active = traverse(sm, "Packages/" + active)
+ new_active = traverse(sm, active)
if old_active == new_active:
return "No change"