[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser - AddConnectionConfiguration.py:1.3 Connections.pt:1.2 add_config.pt:1.2 configure.zcml:1.9 AdapterAdd.py:NONE Add.py:NONE Adding.py:NONE Connection.py:NONE ConnectionAdding.py:NONE ConnectionConfigEdit.pt:NONE ConnectionConfigEditPart.pt:NONE ConnectionConfigSummary.pt:NONE ConnectionConfigURL.py:NONE Connections.py:NONE TestSQL.py:NONE add.pt:NONE connection.pt:NONE testResults.pt:NONE testSQL.pt:NONE
Marius Gedminas
mgedmin@codeworks.lt
Thu, 12 Dec 2002 06:33:02 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv21266/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser
Modified Files:
AddConnectionConfiguration.py Connections.pt add_config.pt
configure.zcml
Removed Files:
AdapterAdd.py Add.py Adding.py Connection.py
ConnectionAdding.py ConnectionConfigEdit.pt
ConnectionConfigEditPart.pt ConnectionConfigSummary.pt
ConnectionConfigURL.py Connections.py TestSQL.py add.pt
connection.pt testResults.pt testSQL.pt
Log Message:
Merge named-component-configuration-branch
=== Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/AddConnectionConfiguration.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/AddConnectionConfiguration.py:1.2 Mon Dec 9 11:32:58 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/AddConnectionConfiguration.py Thu Dec 12 06:32:31 2002
@@ -2,18 +2,16 @@
#
# 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.
+"""Connection configuration adding view
$Id$
"""
@@ -41,10 +39,10 @@
paths.sort()
return paths
- def action(self, component_path):
- connection_name = self.connectionName.getData()
+ def action(self, connection_name, component_path):
+ if not connection_name:
+ raise ValueError, 'You must specify a connection name'
cd = ConnectionConfiguration(connection_name, component_path)
cd = self.context.add(cd)
- getWidgetsDataForContent(self, IConnectionConfiguration, content=cd,
- required=True)
+ getWidgetsDataForContent(self, IConnectionConfiguration, content=cd)
self.request.response.redirect(self.context.nextURL())
=== Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/Connections.pt 1.1 => 1.2 ===
--- Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/Connections.pt:1.1 Mon Dec 9 10:26:42 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/Connections.pt Thu Dec 12 06:32:31 2002
@@ -1,56 +1,33 @@
<html metal:use-macro="views/standard_macros/page">
-<body metal:fill-slot="body" tal:define="connections view/update">
+<body metal:fill-slot="body">
+<div metal:use-macro="view/indexMacros/macros/body">
- <h2>Connections configured in this connection service.</h2>
+ <h2 metal:fill-slot="heading">Connections configured in this connection service.</h2>
- <p tal:condition="not:connections">
- No connections have been configured
+ <p metal:fill-slot="empty_text">No connections have been configured</p>
+
+ <div metal:fill-slot="extra_top">
+
+ <p>For each connection, the connection name is given and all of the
+ components registered to provide the connection are shown. You
+ may select the component to provide the connection or disable the
+ connection.
+ </p>
+
+ <p>Select a connection name or a component name to visit the connection
+ or component.
</p>
- <div tal:condition="connections">
+ </div>
- <p>For each connection, the connection name is given and all of the
- components registered to provide the connection are shown. You
- may select the component to provide the connection or disable the
- connection.
- </p>
-
- <p>Select a connection name or a component name to visit the connection
- or component. </p>
-
- <form action="." method="post"
- tal:attributes="action request/URL">
-
- <table width="100%">
-
- <tr tal:repeat="connection connections">
- <td valign="top" align="right">
- <a href="Roles"
- tal:content="connection/name"
- tal:attributes="href connection/name"
- tal:condition="connection/active"
- >Roles</a>
- <span tal:replace="connection/name"
- tal:condition="connection/inactive" />
- </td>
- <td tal:content="structure connection/view">
- </td>
- </tr>
-
- </table>
-
- <input type=submit name="submit_update" value="Update"><br>
-
- </form>
-
- </div>
-
- <p>To configure a connection, add a database adapter 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 connection configuration that configures the
- component to provide a connection.
+ <p metal:fill-slot="help_text">To configure a connection, add a database
+ adapter 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 connection configuration that configures the component to
+ provide a connection.
</p>
+</div>
</body>
</html>
=== Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/add_config.pt 1.1 => 1.2 ===
--- Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/add_config.pt:1.1 Mon Dec 9 10:26:42 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/add_config.pt Thu Dec 12 06:32:31 2002
@@ -7,7 +7,7 @@
<table>
<tr>
<td>Connection Name</td>
- <td tal:content="structure view/connectionName"><input type="text"></td>
+ <td><input type="text" name="connection_name" /></td>
</tr>
<tr>
<td>Component</td>
=== Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/configure.zcml 1.8 => 1.9 ===
--- Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/configure.zcml:1.8 Mon Dec 9 11:16:51 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/configure.zcml Thu Dec 12 06:32:31 2002
@@ -6,19 +6,17 @@
<!-- ConnectionService -->
- <browser:defaultView
- for=".IConnectionManager."
- name="index.html" />
-
- <browser:menuItems menu="zmi_views" for=".IConnectionManager.">
- <browser:menuItem title="Edit" action="index.html"/>
+ <browser:menuItems
+ menu="zmi_views"
+ for=".ConnectionService.ILocalConnectionService.">
+ <browser:menuItem title="Connections" action="index.html"/>
</browser:menuItems>
- <browser:view
- for=".IConnectionManager."
+ <browser:view
+ for=".ConnectionService.ILocalConnectionService."
name="index.html"
template="Views/Browser/Connections.pt"
- class=".Views.Browser.Connections."
+ class="Zope.App.OFS.Services.Browser.NameConfigurableView."
permission="Zope.ManageServices" />
<browser:menuItem
@@ -31,43 +29,7 @@
<!-- ConnectionConfiguration -->
- <browser:defaultView
- for=".IConnectionConfiguration."
- name="index.html" />
-
- <browser:menuItems menu="zmi_views" for=".IConnectionConfiguration.">
- <browser:menuItem title="Edit" action="index.html"/>
- </browser:menuItems>
-
- <form:edit
- for=".IConnectionConfiguration."
- name="index.html"
- schema="Zope.App.OFS.Services.ConfigurationInterfaces.IConfiguration."
- label="Connection Configuration"
- permission="Zope.ManageServices"
- template="Views/Browser/ConnectionConfigEdit.pt"
- />
-
- <form:edit
- for=".IConnectionConfiguration."
- name="ItemEdit"
- schema=
- "Zope.App.OFS.Services.ConfigurationInterfaces.IConfigurationSummary."
- label="Service Configuration"
- template="Views/Browser/ConnectionConfigEditPart.pt"
- class=".Views.Browser.ConnectionConfigURL."
- permission = "Zope.ManageServices"
- />
-
<browser:view
- for=".IConnectionConfiguration."
- name="ConfigurationSummary"
- template="Views/Browser/ConnectionConfigSummary.pt"
- class=".Views.Browser.ConnectionConfigURL."
- permission="Zope.ManageServices"
- />
-
- <browser:view
for="Zope.App.OFS.Container.IAdding."
name="ConnectionConfiguration"
factory=".Views.Browser.AddConnectionConfiguration."
@@ -85,34 +47,5 @@
title="Connection"
description="Database Connection"
/>
-
-<!-- ZopeDatabaseAdapter default views -->
-
- <browser:defaultView for="Zope.App.RDB.IZopeDatabaseAdapter."
- name="editForm.html" />
-
- <browser:view
- for="Zope.App.RDB.IZopeDatabaseAdapter."
- permission="Zope.View"
- factory=".Views.Browser.Connection.">
- <browser:page name="editForm.html"
- template="Views/Browser/connection.pt" />
- <browser:page name="edit.html" attribute="edit" />
- <browser:page name="connect.html" attribute="connect" />
- <browser:page name="disconnect.html" attribute="disconnect" />
- </browser:view>
-
- <browser:view
- for="Zope.App.RDB.IZopeDatabaseAdapter."
- permission="Zope.View"
- factory=".Views.Browser.TestSQL.">
- <browser:page name="testForm.html" template="Views/Browser/testSQL.pt" />
- <browser:page name="test.html" template="Views/Browser/testResults.pt" />
- </browser:view>
-
- <browser:menuItems menu="zmi_views" for="Zope.App.RDB.IZopeDatabaseAdapter.">
- <browser:menuItem title="Edit" action="editForm.html"/>
- <browser:menuItem title="Test" action="testForm.html"/>
- </browser:menuItems>
</zopeConfigure>
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/AdapterAdd.py ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/Add.py ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/Adding.py ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/Connection.py ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/ConnectionAdding.py ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/ConnectionConfigEdit.pt ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/ConnectionConfigEditPart.pt ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/ConnectionConfigSummary.pt ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/ConnectionConfigURL.py ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/Connections.py ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/TestSQL.py ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/add.pt ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/connection.pt ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/testResults.pt ===
=== Removed File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/testSQL.pt ===