[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser - AddModule.py:1.2 AddServiceConfiguration.py:1.2 Adding.py:1.2 ComponentAdding.py:1.2 EditConfiguration.py:1.2 EditModule.py:1.2 PackagesContents.py:1.2 ServiceConfigEdit.pt:1.2 ServiceConfigEditPart.pt:1.2 ServiceConfigSummary.pt:1.2 ServiceConfigURL.py:1.2 Services.pt:1.2 Services.py:1.2 __init__.py:1.2 add_module.pt:1.2 add_service_1.pt:1.2 add_service_2.pt:1.2 configure.zcml:1.2 editConfiguration.pt:1.2 edit_module.pt:1.2 packages_contents.pt:1.2
Jim Fulton
jim@zope.com
Sat, 30 Nov 2002 13:39:48 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser
In directory cvs.zope.org:/tmp/cvs-serv12171/lib/python/Zope/App/OFS/Services/ServiceManager/Browser
Added Files:
AddModule.py AddServiceConfiguration.py Adding.py
ComponentAdding.py EditConfiguration.py EditModule.py
PackagesContents.py ServiceConfigEdit.pt
ServiceConfigEditPart.pt ServiceConfigSummary.pt
ServiceConfigURL.py Services.pt Services.py __init__.py
add_module.pt add_service_1.pt add_service_2.pt configure.zcml
editConfiguration.pt edit_module.pt packages_contents.pt
Log Message:
- Updated to use new configuration framework.
- Updated PlacefulSetup to register the standard traversal adapters
and views during setup.
- Service managers now support hierarchical module lookup.
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/AddModule.py 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/AddModule.py Sat Nov 30 13:39:17 2002
@@ -0,0 +1,28 @@
+##############################################################################
+#
+# Copyright (c) 2002 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.
+#
+##############################################################################
+"""Handle form to create module
+
+$Id$
+"""
+
+from Zope.Publisher.Browser.BrowserView import BrowserView
+from Zope.App.OFS.Services.ServiceManager.Module import Manager
+
+class AddModule(BrowserView):
+
+ def action(self, name, source):
+ mgr = Manager()
+ mgr = self.context.add(mgr)
+ mgr.new(name, source)
+ self.request.response.redirect(self.context.nextURL())
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/AddServiceConfiguration.py 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/AddServiceConfiguration.py Sat Nov 30 13:39:17 2002
@@ -0,0 +1,57 @@
+##############################################################################
+#
+# Copyright (c) 2002 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.
+#
+##############################################################################
+"""XXX short summary goes here.
+
+XXX longer description goes here.
+
+$Id$
+"""
+__metaclass__ = type
+
+from Zope.ComponentArchitecture import getServiceManager
+from Zope.Publisher.Browser.BrowserView import BrowserView
+from Zope.App.OFS.Services.ServiceManager.ServiceConfiguration \
+ import ServiceConfiguration
+from Zope.App.OFS.Services.ConfigurationInterfaces import IConfiguration
+from Zope.App.Forms.Utility import setUpWidgets, getWidgetsDataForContent
+
+class AddServiceConfiguration(BrowserView):
+
+ def __init__(self, *args):
+ super(AddServiceConfiguration, self).__init__(*args)
+ setUpWidgets(self, IConfiguration)
+
+ def services(self):
+ service = getServiceManager(self.context.context)
+ definitions = service.getServiceDefinitions()
+ names = [name for (name, interface) in definitions]
+ names.sort()
+ return names
+
+ def components(self):
+ service_type = self.request['service_type']
+ service = getServiceManager(self.context.context)
+ type = service.getInterfaceFor(service_type)
+ paths = [info['path']
+ for info in service.queryComponent(type=type)
+ ]
+ paths.sort()
+ return paths
+
+ def action(self, service_type, component_path):
+ sd = ServiceConfiguration(service_type, component_path)
+ sd = self.context.add(sd)
+ getWidgetsDataForContent(self, IConfiguration, sd)
+ self.request.response.redirect(self.context.nextURL())
+
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/Adding.py 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/Adding.py Sat Nov 30 13:39:17 2002
@@ -0,0 +1,43 @@
+##############################################################################
+#
+# Copyright (c) 2002 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.
+#
+##############################################################################
+"""Adding components for components and configuration
+
+$Id$
+"""
+
+from Zope.App.OFS.Container.Views.Browser.Adding import Adding as ContentAdding
+
+
+class ComponentAdding(ContentAdding):
+ """Adding component for components
+ """
+
+ menu_id = "add_component"
+
+ def action(self, type_name, id):
+ if not id:
+ # Generate an id from the type name
+ id = type_name
+ if id in self.context:
+ i=2
+ while ("%s-%s" % (id, i)) in self.context:
+ i=i+1
+ id = "%s-%s" % (id, i)
+ return super(ComponentAdding, self).action(type_name, id)
+
+class ConfigurationAdding(ContentAdding):
+ """Adding component for configuration
+ """
+
+ menu_id = "add_configuration"
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/ComponentAdding.py 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/ComponentAdding.py Sat Nov 30 13:39:17 2002
@@ -0,0 +1,25 @@
+##############################################################################
+#
+# Copyright (c) 2002 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.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+
+from Zope.App.OFS.Container.Views.Browser.Adding import Adding
+from Zope.App.OFS.Services.ServiceManager.IServiceAdding import IServiceAdding
+
+class ServiceAdding(Adding):
+
+ __implements__ = IServiceAdding
+
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/EditConfiguration.py 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/EditConfiguration.py Sat Nov 30 13:39:17 2002
@@ -0,0 +1,75 @@
+##############################################################################
+#
+# Copyright (c) 2002 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.
+#
+##############################################################################
+"""
+$Id$
+"""
+
+from Zope.Publisher.Browser.BrowserView import BrowserView
+from Zope.ComponentArchitecture import getView, getAdapter
+from Zope.Proxy.ContextWrapper import ContextWrapper
+from Zope.App.OFS.Container.IZopeContainer import IZopeContainer
+
+class EditConfiguration(BrowserView):
+ """Adding component for service containers
+ """
+
+ menu_id = "add_component"
+
+ def __init__(self, context, request):
+ self.request = request
+ self.context = context
+
+ def action(self):
+ """Perform actions depending on user input.
+
+
+ """
+ if 'keys' in self.request:
+ k = self.request['keys']
+
+ if 'add_submit' in self.request:
+ self.request.response.redirect('+')
+ elif 'remove_submit' in self.request:
+ self.remove_objects(k)
+ elif 'top_submit' in self.request:
+ self.context.arrange_object(k[0], 'top')
+ elif 'bottom_submit' in self.request:
+ self.context.arrange_object(k[0],'bottom')
+ elif 'up_submit' in self.request:
+ self.context.arrange_object(k[0],'up')
+ elif 'down_submit' in self.request:
+ self.context.arrange_object(k[0],'down')
+
+ return ''
+
+ def remove_objects(self, key_list):
+ """Remove the directives from the container.
+ """
+ container = getAdapter(self.context, IZopeContainer)
+ for item in key_list:
+ del container[item]
+
+ def configInfo(self):
+ """Render View for each direcitves.
+ """
+ r = []
+ for name, directive in self.context.items():
+ d = ContextWrapper(directive, self.context, name = name)
+ view = getView(d, 'ItemEdit', self.request)
+ view.setPrefix('config'+str(name))
+ r.append({'key': name, 'view': view})
+ return r
+
+__doc__ = EditConfiguration.__doc__ + __doc__
+
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/EditModule.py 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/EditModule.py Sat Nov 30 13:39:17 2002
@@ -0,0 +1,29 @@
+##############################################################################
+#
+# Copyright (c) 2002 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.
+#
+##############################################################################
+"""Handle form to edit module
+
+$Id$
+"""
+
+from Zope.Publisher.Browser.BrowserView import BrowserView
+from Zope.App.OFS.Services.ServiceManager.Module import Manager
+
+class EditModule(BrowserView):
+
+ def update(self):
+ if "source" in self.request:
+ self.context.update(self.request["source"])
+ return u"The source was updated."
+ else:
+ return u""
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/PackagesContents.py 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/PackagesContents.py Sat Nov 30 13:39:17 2002
@@ -0,0 +1,39 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 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.
+#
+##############################################################################
+"""
+
+Revision information: $Id$
+"""
+from Zope.App.OFS.Container.Views.Browser.Contents import Contents
+from Zope.App.OFS.Services.ServiceManager.IServiceManager \
+ import IServiceManager
+from Zope.App.OFS.Services.ServiceManager.Package import Package
+
+
+
+from Zope.Publisher.Browser.BrowserView import BrowserView
+
+from Zope.App.PageTemplate import ViewPageTemplateFile
+from Zope.App.OFS.Container.IContainer import IContainer
+from Zope.ComponentArchitecture import queryView, getView
+
+class PackagesContents(Contents):
+
+ __used_for__ = IServiceManager
+
+ index = ViewPageTemplateFile('packages_contents.pt')
+
+ def addPackage(self, name):
+ self.context.setObject(name, Package())
+ self.request.response.redirect('.')
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/ServiceConfigEdit.pt 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/ServiceConfigEdit.pt Sat Nov 30 13:39:17 2002
@@ -0,0 +1,25 @@
+<html metal:use-macro="views/standard_macros/page">
+ <body>
+ <div metal:fill-slot="body">
+
+ <div metal:use-macro="view/generated_form/macros/body">
+
+ <table metal:fill-slot="extra_info">
+ <tr>
+ <td>Service type</td>
+ <td tal:content="context/serviceType">Foo</td>
+ </tr>
+ <tr>
+ <td>Component Path</td>
+ <td tal:content="context/componentPath">
+ <a href='.'
+ tal:attributes="href view/componentURL"
+ tal:content="context/componentPath">foo/bar</a>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ </div>
+ </body>
+</html>
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/ServiceConfigEditPart.pt 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/ServiceConfigEditPart.pt Sat Nov 30 13:39:17 2002
@@ -0,0 +1,20 @@
+<div metal:use-macro="view/generated_form/macros/formbody">
+
+ <table metal:fill-slot="extra_info">
+ <tr>
+ <td>Service type</td>
+ <td tal:content="context/serviceType">Foo</td>
+ </tr>
+ <tr>
+ <td>Component Path</td>
+ <td>
+ <a href="."
+ tal:content="context/componentPath"
+ tal:define="service context/getService"
+ tal:attributes="href service/@@absolute_url"
+ >Foo</a>
+ </td>
+ </tr>
+ </table>
+
+</div>
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/ServiceConfigSummary.pt 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/ServiceConfigSummary.pt Sat Nov 30 13:39:17 2002
@@ -0,0 +1,4 @@
+<span tal:replace="context/title" />
+<a href='.'
+ tal:attributes="href view/componentURL"
+ tal:content="context/componentPath">foo/bar</a>
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/ServiceConfigURL.py 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/ServiceConfigURL.py Sat Nov 30 13:39:17 2002
@@ -0,0 +1,32 @@
+##############################################################################
+#
+# Copyright (c) 2002 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.
+#
+##############################################################################
+"""
+$Id$
+"""
+
+from Zope.ComponentArchitecture import getView
+from Zope.App.Traversing import traverse
+
+__metaclass__ = type
+
+class ServiceConfigURL:
+ """Describe C objects
+ """
+
+ def componentURL(self):
+ ob = traverse(self.context, self.context.componentPath)
+ return str(getView(ob, 'absolute_url', self.request))
+
+__doc__ = ServiceConfigURL.__doc__ + __doc__
+
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/Services.pt 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/Services.pt Sat Nov 30 13:39:17 2002
@@ -0,0 +1,56 @@
+<html metal:use-macro="views/standard_macros/page">
+<body metal:fill-slot="body" tal:define="services view/update">
+
+ <h2>Services configured in this service manager.</h2>
+
+ <p tal:condition="not:services">
+ No services have been configured
+ </p>
+
+ <div tal:condition="services">
+
+ <p>For each service, the service name is given and all of the
+ components registered to provide the service are shown. You
+ map select the component to provide the service or disable the
+ service.
+ </p>
+
+ <p>Select a service name or a component name to visit the service
+ or component. </p>
+
+ <form action="." method="post"
+ tal:attributes="action request/URL">
+
+ <table width="100%">
+
+ <tr tal:repeat="service services">
+ <td valign="top" align="right">
+ <a href="Roles"
+ tal:content="service/name"
+ tal:attributes="href service/name"
+ tal:condition="service/active"
+ >Roles</a>
+ <span tal:replace="service/name"
+ tal:condition="service/inactive" />
+ </td>
+ <td tal:content="structure service/view">
+ </td>
+ </tr>
+
+ </table>
+
+ <input type=submit name="submit_update" value="Update"><br>
+
+ </form>
+
+ </div>
+
+ <p>To configure a service, add a service component to a
+ <em>package</em> in <a href="Packages">Packages</a> or to
+ the <a href="Packages/default">default package</a>. After the
+ component is added, add a service configuration that configures the
+ component to provide a service.
+ </p>
+
+</body>
+</html>
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/Services.py 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/Services.py Sat Nov 30 13:39:17 2002
@@ -0,0 +1,44 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 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.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+
+from Zope.Publisher.Browser.BrowserView import BrowserView
+from Zope.ComponentArchitecture import getView
+
+class Services(BrowserView):
+
+ def update(self):
+
+ service_types = list(self.context.getBoundServiceTypes())
+ service_types.sort()
+
+ services = []
+ for service_type in service_types:
+ registry = self.context.queryConfigurations(service_type)
+ view = getView(registry, "ChangeConfigurations", self.request)
+ view.setPrefix(service_type)
+ view.update()
+ active = registry.active() is not None
+ services.append(
+ {"name": service_type,
+ "active": active,
+ "inactive": not active,
+ "view": view,
+ })
+
+ return services
+
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/__init__.py 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:47 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/__init__.py Sat Nov 30 13:39:17 2002
@@ -0,0 +1,14 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 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.
+#
+##############################################################################
+
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/add_module.pt 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:48 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/add_module.pt Sat Nov 30 13:39:17 2002
@@ -0,0 +1,14 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title>Add a module</title></head>
+<body>
+<div metal:fill-slot="body">
+
+<p>Enter the absolute module name and source code.</p>
+
+<form action="action.html">
+<input name="name">
+<textarea name="source:text" cols="65" rows="25"></textarea>
+<input type="submit" value="Add module"/>
+</form>
+
+</div></body></html>
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/add_service_1.pt 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:48 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/add_service_1.pt Sat Nov 30 13:39:17 2002
@@ -0,0 +1,30 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title>Add a service component</title></head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="step2.html">
+<table>
+<tr>
+ <td>Service Type</td>
+ <td>
+ <select name="service_type">
+ <option tal:repeat="service view/services"
+ tal:attributes="value service"
+ tal:content="service">service</option>
+ </select>
+ </td>
+</tr>
+<tr>
+ <td>Title</td>
+ <td tal:content="structure view/title"><input type="text"></td>
+</tr>
+<tr>
+ <td>Description</td>
+ <td tal:content="structure view/description"><textarea></textarea></td>
+</tr>
+</table>
+<input type=submit value="Next"/>
+</form>
+
+</div></body></html>
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/add_service_2.pt 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:48 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/add_service_2.pt Sat Nov 30 13:39:17 2002
@@ -0,0 +1,40 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title>Contact Information</title></head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="finish.html" method="post">
+ <input type="hidden" name="service_type" value=""
+ tal:attributes="value request/service_type" />
+ <table>
+ <tr>
+ <td>Service Type</td>
+ <td tal:content="request/service_type">Roles</td>
+ </tr>
+ <tr>
+ <td>Component</td>
+ <td><select name="component_path">
+ <option tal:repeat="path view/components"
+ tal:attributes="value path"
+ tal:content="path">path</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>Status</td>
+ <td tal:content="structure view/status"><input type="text"></td>
+ </tr>
+ <tr>
+ <td>Title</td>
+ <td tal:content="structure view/title"><input type="text"></td>
+ </tr>
+ <tr>
+ <td>Description</td>
+ <td tal:content="structure view/description"><textarea></textarea></td>
+ </tr>
+
+ </table>
+ <input type="submit" />
+</form>
+
+</div></body></html>
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/configure.zcml 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:48 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/configure.zcml Sat Nov 30 13:39:17 2002
@@ -0,0 +1,212 @@
+<zope:zopeConfigure
+ xmlns:zope='http://namespaces.zope.org/zope'
+ xmlns='http://namespaces.zope.org/browser'
+ xmlns:form="http://namespaces.zope.org/form"
+ package="Zope.App.OFS.Services.ServiceManager"
+>
+
+<!-- ServiceManager -->
+
+ <defaultView
+ for=".IServiceManager."
+ name="index.html"
+ />
+
+ <view
+ for=".IServiceManager."
+ name="index.html"
+ template="Browser/Services.pt"
+ class=".Browser.Services."
+ permission="Zope.ManageServices"
+ />
+
+ <menuItems menu="zmi_views" for=".IServiceManager.">
+ <menuItem title="Services"
+ action="@@index.html"/>
+ <menuItem title="Packages"
+ action="Packages/@@SelectedManagementView.html"/>
+ <menuItem title="Default Package"
+ action="Packages/default/@@SelectedManagementView.html"/>
+ </menuItems>
+
+<!-- Packages -->
+
+ <defaultView for=".IPackages." name="contents.html" />
+
+ <view
+ for=".IPackages."
+ permission="Zope.ManageServices"
+ factory=".Browser.PackagesContents.">
+
+ <page name="contents.html"
+ attribute="index"
+ />
+ <page name="addPackage.html"
+ attribute="addPackage"
+ />
+ <page name="removeObjects.html"
+ attribute="removeObjects"
+ />
+ </view>
+
+ <menuItems menu="zmi_views" for=".IPackages.">
+ <menuItem title="Services"
+ action="@@contents.html"/>
+ </menuItems>
+
+ <defaultView for=".IPackage." name="contents.html" />
+
+
+<!-- Package -->
+
+ <view
+ for=".IPackage."
+ permission="Zope.ManageServices"
+ factory="Zope.App.OFS.Container.Views.Browser.Contents."
+ >
+
+ <page name="contents.html" attribute="contents" />
+ <page name="removeObjects.html" attribute="removeObjects" />
+ </view>
+
+ <menuItems menu="zmi_views" for=".IPackage.">
+ <menuItem title="Services"
+ action="@@contents.html"/>
+ </menuItems>
+
+ <menu id="add_component"
+ title="Menu of objects to be added to service managers"
+ />
+
+ <view
+ name="+"
+ permission="Zope.ManageServices"
+ for=".IPackage."
+ factory=".Browser.Adding.ComponentAdding">
+
+ <page name="index.html" attribute="index" />
+ <page name="action.html" attribute="action" />
+
+ </view>
+
+<!-- ConfigurationManager -->
+
+ <defaultView
+ for=".IConfigurationManager."
+ name="contents.html"
+ />
+
+ <view
+ for=".IConfigurationManager."
+ permission="Zope.ManageServices"
+ factory=".Browser.EditConfiguration.">
+ <page name="contents.html" template="Browser/editConfiguration.pt" />
+ </view>
+
+ <menuItems menu="zmi_views" for=".IConfigurationManager.">
+ <menuItem title="Configuration" action="contents.html" />
+ </menuItems>
+
+ <view
+ for=".IConfigurationManager."
+ name="+"
+ permission="Zope.ManageServices"
+ factory=".Browser.Adding.ConfigurationAdding">
+ <page name="index.html" attribute="index" />
+ <page name="action.html" attribute="action" />
+ </view>
+
+ <menuItem menu="add_component"
+ for="Zope.App.OFS.Container.IAdding."
+ action="Zope.App.OFS.Services.ServiceManager.ConfigurationManager"
+ title="Configuration"
+ />
+
+ <menu id="add_configuration"
+ title="Menu of addable configuration objects"
+ />
+
+<!-- ServiceConfiguration -->
+
+ <defaultView
+ for=".IServiceConfiguration."
+ name="index.html"
+ />
+
+ <menuItems menu="zmi_views" for=".IServiceConfiguration.">
+ <menuItem title="Edit"
+ action="index.html"/>
+ </menuItems>
+
+ <form:edit
+ for = ".IServiceConfiguration."
+ name = "index.html"
+ schema = "Zope.App.OFS.Services.ConfigurationInterfaces.IConfiguration."
+ label = "Service Configuration"
+ permission = "Zope.ManageServices"
+ template = "Browser/ServiceConfigEdit.pt"
+ />
+
+ <form:edit
+ for = ".IServiceConfiguration."
+ name = "ItemEdit"
+ schema =
+ "Zope.App.OFS.Services.ConfigurationInterfaces.IConfigurationSummary."
+ label = "Service Configuration"
+ template = "Browser/ServiceConfigEditPart.pt"
+ class = ".Browser.ServiceConfigURL."
+ permission = "Zope.ManageServices"
+ />
+
+ <view
+ for = ".IServiceConfiguration."
+ name = "ConfigurationSummary"
+ template = "Browser/ServiceConfigSummary.pt"
+ class = ".Browser.ServiceConfigURL."
+ permission="Zope.ManageServices"
+ />
+
+ <view
+ for="Zope.App.OFS.Container.IAdding."
+ name="ServiceConfiguration"
+ factory=".Browser.AddServiceConfiguration."
+ permission="Zope.ManageServices"
+ >
+
+ <page name="step1.html" template="Browser/add_service_1.pt" />
+ <page name="step2.html" template="Browser/add_service_2.pt" />
+ <page name="finish.html" attribute="action" />
+
+ </view>
+
+ <menuItem
+ for="Zope.App.OFS.Container.IAdding."
+ menu="add_configuration"
+ action="ServiceConfiguration"
+ title="Service"
+ />
+
+<!-- Persistent Modules -->
+
+ <view for="Persistence.IPersistentModuleManager."
+ factory=".Browser.EditModule."
+ >
+ <page name="edit.html" template="Views/Browser/edit_module.pt" />
+ </view>
+
+ <menuItems menu="zmi_views" for="Persistence.IPersistentModuleManager.">
+ <menuItem title="Edit" action="edit.html" />
+ </menuItems>
+
+ <view for="Zope.App.OFS.Container.IAdding."
+ name="Module"
+ factory=".Browser.AddModule."
+ >
+ <page name="index.html" template="Views/Browser/add_module.pt" />
+ <page name="action.html" attribute="action" />
+ </view>
+
+ <menuItem menu="add_component" for="Zope.App.OFS.Container.IAdding."
+ action="Module" title="Module" />
+
+</zope:zopeConfigure>
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/editConfiguration.pt 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:48 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/editConfiguration.pt Sat Nov 30 13:39:17 2002
@@ -0,0 +1,45 @@
+<html metal:use-macro="views/standard_macros/page">
+<head>
+ <title>View Service Configuration</title>
+</head>
+<body>
+<div metal:fill-slot="body">
+<form action="."
+ tal:define="info view/action"
+ tal:attributes="action request/URL">
+
+<table align=center width=100% cellspacing=0 cellpadding=0>
+ <tr tal:repeat="config view/configInfo">
+ <td valign=top>
+ <input type=checkbox name='keys:list'
+ value='2'
+ tal:attributes="value config/key"/>
+ </td>
+ <td>
+ <table border=1 width=100%>
+ <tr><td tal:content="structure config/view">
+ Edit Adapter Directives
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <input type=submit name='refresh_submit' value="Refresh">
+ <input type=submit name='update_submit' value="Update">
+ <input type=submit name='add_submit' value="Add">
+ <input type=submit name='remove_submit' value="Remove">
+ <input type=submit name='top_submit' value="Top">
+ <input type=submit name='up_submit' value="Up">
+ <input type=submit name='down_submit' value="Down">
+ <input type=submit name='bottom_submit' value="Bottom">
+ </td>
+ </tr>
+</table>
+
+</form>
+</div>
+</body>
+</html>
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/edit_module.pt 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:48 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/edit_module.pt Sat Nov 30 13:39:17 2002
@@ -0,0 +1,17 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title>Add a module</title></head>
+<body>
+<div metal:fill-slot="body">
+
+<p>Enter the absolute module name and source code.</p>
+
+<form action="edit.html">
+<span tal:replace="view/update"></span>
+<p>Module: <span tal:content="context/name">Module Name</span></p>
+<textarea name="source:text" cols="65" rows="25"
+ tal:content="context/source"
+></textarea>
+<input type="submit" value="Edit"/>
+</form>
+
+</div></body></html>
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/packages_contents.pt 1.1 => 1.2 ===
--- /dev/null Sat Nov 30 13:39:48 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Browser/packages_contents.pt Sat Nov 30 13:39:17 2002
@@ -0,0 +1,27 @@
+<html metal:use-macro="views/standard_macros/page">
+<head>
+<style metal:fill-slot="headers" type="text/css">
+</style>
+</head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="." method="get"
+ tal:define="container_contents view/listContentInfo"
+>
+
+ <p>Package Contents</p>
+
+ <div metal:use-macro="view/contentsMacros/macros/contents_table" />
+
+ <br />
+ <input type="text" name="name" />
+ <input type="submit" name="@@addPackage.html:method" value="Add"
+ i18nXXX:attributes="value string:menu_add_button" />
+ <input type="submit" name="@@removeObjects.html:method" value="Delete"
+ i18nXXX:attributes="value string:menu_delete_button" />
+</form>
+
+</div>
+</body>
+</html>