[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services - caches.pt:1.6 configure.zcml:1.48 connections.pt:1.8 service.py:1.21

Guido van Rossum guido@python.org
Mon, 28 Apr 2003 17:35:30 -0400


Update of /cvs-repository/Zope3/src/zope/app/browser/services
In directory cvs.zope.org:/tmp/cvs-serv30774/browser/services

Modified Files:
	caches.pt configure.zcml connections.pt service.py 
Log Message:
Add separate "Add cache" and "Add connection" menus, so we can have
direct links to add caches and connections in the cache and connection
managers, respectively.


=== Zope3/src/zope/app/browser/services/caches.pt 1.5 => 1.6 ===
--- Zope3/src/zope/app/browser/services/caches.pt:1.5	Mon Apr 28 12:52:07 2003
+++ Zope3/src/zope/app/browser/services/caches.pt	Mon Apr 28 17:35:29 2003
@@ -39,6 +39,9 @@
   </tbody>
 </table>
 
+<p><a href="../../default/AddCache">Add a cache to this cache
+service</a></p>
+
 </div>
 
 </html>


=== Zope3/src/zope/app/browser/services/configure.zcml 1.47 => 1.48 ===
--- Zope3/src/zope/app/browser/services/configure.zcml:1.47	Mon Apr 28 16:42:27 2003
+++ Zope3/src/zope/app/browser/services/configure.zcml	Mon Apr 28 17:35:29 2003
@@ -675,6 +675,32 @@
     <page name="action.html" attribute="action" />
 
   </view>
+
+<!-- "Add Connection" menu -->
+
+  <view
+    name="AddConnection"
+     for="zope.app.interfaces.services.folder.ISiteManagementFolder"
+     permission="zope.ManageServices"
+     class="zope.app.browser.services.service.ConnectionAdding">
+
+    <page name="index.html"  attribute="index"  />
+    <page name="action.html" attribute="action" />
+
+  </view>
+
+<!-- "Add Cache" menu -->
+
+  <view
+    name="AddCache"
+     for="zope.app.interfaces.services.folder.ISiteManagementFolder"
+     permission="zope.ManageServices"
+     class="zope.app.browser.services.service.CacheAdding">
+
+    <page name="index.html"  attribute="index"  />
+    <page name="action.html" attribute="action" />
+
+  </view>
     
 
 <!-- Translation Service Views -->


=== Zope3/src/zope/app/browser/services/connections.pt 1.7 => 1.8 ===
--- Zope3/src/zope/app/browser/services/connections.pt:1.7	Mon Apr 28 12:52:07 2003
+++ Zope3/src/zope/app/browser/services/connections.pt	Mon Apr 28 17:35:29 2003
@@ -39,6 +39,10 @@
   </tbody>
 </table>
 
+<p><a href="../../default/AddConnection">Add a connection to this
+connection service</a></p>
+
+
 </div>
 
 </html>


=== Zope3/src/zope/app/browser/services/service.py 1.20 => 1.21 ===
--- Zope3/src/zope/app/browser/services/service.py:1.20	Mon Apr 28 16:42:27 2003
+++ Zope3/src/zope/app/browser/services/service.py	Mon Apr 28 17:35:29 2003
@@ -103,6 +103,16 @@
             raise TypeError("%s is not a local utility" % content)
         return ContextSuper(UtilityAdding, self).add(content)
 
+class ConnectionAdding(ComponentAdding):
+    """Adding subclass used for adding database connections."""
+
+    menu_id = "add_connection"
+
+class CacheAdding(ComponentAdding):
+    """Adding subclass used for adding caches."""
+
+    menu_id = "add_cache"
+
 
 class AddServiceConfiguration(BrowserView):
     """A view on a service implementation, used by add_svc_config.py."""