[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser - FolderContents.py:1.3 configure.zcml:1.12 contents.pt:1.11

Jim Fulton jim@zope.com
Tue, 1 Oct 2002 08:49:38 -0400


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

Modified Files:
	FolderContents.py configure.zcml contents.pt 
Log Message:
Added a new view, 'SelectedManagementView', that redirects to the first
view that a user can access. Changed between-object navigation urls,
like those in breadcrumbs and the contents management view, to use
this view.  This corresponds to Zope 2's 'manage_workspace' method.

Changes the name of the folder contents management view to
'contents.html'. Added a new 'index.html' view as the default view for
folders. If the folder contains an object named 'index.html', then the
view redirects to that object. Otherwise, the view displays a folder
listing with linds to folder items.

Changed the view order for a number of content types so that
management views come before the default view.  This means you can now
traverse to a file or page template from a contents listing and get an
editing view.



=== Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/FolderContents.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/FolderContents.py:1.2	Mon Jun 10 19:28:00 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/FolderContents.py	Tue Oct  1 08:49:07 2002
@@ -36,4 +36,4 @@
         if REQUEST is not None:
             return self.index(REQUEST)
 
-    index = ViewPageTemplateFile('contents.pt')
+    contents = ViewPageTemplateFile('contents.pt')


=== Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/configure.zcml 1.11 => 1.12 ===
--- Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/configure.zcml:1.11	Fri Jul 19 09:21:09 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/configure.zcml	Tue Oct  1 08:49:07 2002
@@ -22,11 +22,12 @@
     file="Folder_icon.gif" />
 
 <browser:menuItems menu="zmi_views" for=".Folder.IFolder.">
-  <browser:menuItem title="Contents" action="@@index.html"/>
+  <browser:menuItem title="Contents" action="@@contents.html"/>
   <browser:menuItem title="Role Permissions" 
       action="@@AllRolePermissions.html"/>
   <browser:menuItem title="Principal Roles" 
       action="@@PrincipalRoles.html"/>
+  <browser:menuItem title="View" action="@@index.html"/>
 </browser:menuItems>
 
 <browser:menuItem menu="add_content"
@@ -39,7 +40,9 @@
     permission="Zope.ManageContent" 
     factory=".Views.Browser.FolderContents.">
 
-  <browser:page name="index.html" attribute="index" />
+  <browser:page name="index.html" attribute="index" permission="Zope.View" />
+  <browser:page name="contents.html" attribute="contents" />
+  <browser:page name="manage" attribute="contents" />
   <browser:page name="addServiceManager.html" attribute="addServiceManager" />
   <browser:page name="removeObjects.html" attribute="removeObjects" />
 


=== Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/contents.pt 1.10 => 1.11 ===
--- Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/contents.pt:1.10	Sun Jun 23 13:03:41 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/contents.pt	Tue Oct  1 08:49:07 2002
@@ -50,12 +50,18 @@
                                      checked request/ids_checked|nothing;"/>
             </td>
             <td> 
-              <a href="#" tal:attributes="href url"
-                 tal:content="structure item/icon|default">
+              <a href="#" 
+                 tal:attributes="href 
+                                 string:${url}/@@SelectedManagementView.html"
+                 tal:content="structure item/icon|default"
+                 >
               </a> 
             </td>
             <td> 
-              <a href="#" tal:attributes="href url">
+              <a href="#" 
+                 tal:attributes="href 
+                                 string:${url}/@@SelectedManagementView.html"
+                 >
                 <span tal:replace="item/id">Id</span>
                 <span tal:condition="item/title"
                       tal:replace="string: (${item/title})">(Title)</span>