[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/Browser - Contents.py:1.5 configure.zcml:1.2 main.pt:1.5

Gary Poster garyposter@earthlink.net
Sat, 22 Jun 2002 13:16:41 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv1899/lib/python/Zope/App/OFS/Container/Views/Browser

Modified Files:
	Contents.py configure.zcml main.pt 
Log Message:
Small changes.

Mucking about with the new creation system, in preparation of deleting the old Addable class, registry, service, et al.  ServiceManager now uses new creation system.  Disabled Container adder in favor of Folder adder (see Container/Views/Browser/configure.zcml for short discussion).

There are a number of issues, from small to large (in my book) that are still to be worked out with the new creation system.  I'm not addressing them, just cleaning up.

Hooked the deletion button in the root folder back up via some zcml (adding a browser page for the deletion ability, which may or may not be kosher).

fixed one zcml zmi_menu error; saw others.


=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Contents.py 1.4 => 1.5 ===
 from Zope.App.PageTemplate import ViewPageTemplateFile
 from Zope.App.OFS.Container.IContainer import IContainer
-from Zope.ComponentArchitecture import queryView
+from Zope.ComponentArchitecture import queryView, getView
 
 class Contents(BrowserView):
 
@@ -50,11 +50,12 @@
         for id in ids:
             self.remove(id)
 
-        # XXX:  This is horribly broken, but I can't do better until
-        #       we have a way to compute absolute URLs.
         if REQUEST is not None:
             # for unit tests
-            REQUEST.response.redirect(REQUEST.URL['-1'])
+            REQUEST.response.redirect(
+                getView(self.context, "absolute_url", REQUEST)
+                )
+            return
         return self.confirmRemoved()
     
 


=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/configure.zcml 1.1 => 1.2 ===
                  />
 
+   <!--
+   
+   Actually using this Adding would add an item to *all* container menus:
+       folders, service managers, role services, and so on: undesirable.
+       
+       Most content objects will want to use OFS.Folder.IFolderAdding as their
+       primary create menu interface.  ServiceManagers and other containers will
+       have their own Addings to use.
+   
    <browser:view
        for="Zope.App.OFS.Container.IContentContainer."
        name="create"  
@@ -16,6 +25,8 @@
        <browser:page name="index.html" template="add.pt" />
        <browser:page name="action.html" attribute="action" />
    </browser:view>
+
+   -->
 
 </zopeConfigure>
        


=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/main.pt 1.4 => 1.5 ===
   <table class="ContentListing">
   
-    <caption>Folder Contents <a href="@@addForm.html"> Add... </a> </caption>
+    <caption>Folder Contents <a href="@@create"> Add... </a> </caption>
   
     <tbody>