[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/Browser - Adding.py:1.6 Contents.py:1.7 main.pt:1.9
Jim Fulton
jim@zope.com
Tue, 1 Oct 2002 08:49:37 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv18475/lib/python/Zope/App/OFS/Container/Views/Browser
Modified Files:
Adding.py Contents.py main.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/Container/Views/Browser/Adding.py 1.5 => 1.6 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Adding.py:1.5 Fri Jul 12 09:26:09 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Adding.py Tue Oct 1 08:49:07 2002
@@ -45,7 +45,8 @@
def nextURL(self):
'See Zope.App.OFS.Container.IAdding.IAdding'
- return str(getView(self.context, "absolute_url", self.request))
+ return (str(getView(self.context, "absolute_url", self.request))
+ + '/@@contents.html')
######################################
# from: Zope.ComponentArchitecture.IPresentation.IPresentation
=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Contents.py 1.6 => 1.7 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Contents.py:1.6 Thu Jul 11 14:21:29 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Contents.py Tue Oct 1 08:49:07 2002
@@ -71,6 +71,14 @@
def listContentInfo(self):
return map(self._extractContentInfo, self.context.items())
- index = ViewPageTemplateFile('main.pt')
+ contents = ViewPageTemplateFile('main.pt')
confirmRemoved = ViewPageTemplateFile('remove_confirmed.pt')
+ _index = ViewPageTemplateFile('index.pt')
+
+ def index(self):
+ if 'index.html' in self.context:
+ self.request.response.redirect('index.html')
+ return ''
+
+ return self._index()
=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/main.pt 1.8 => 1.9 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/main.pt:1.8 Sat Jul 13 14:26:25 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/main.pt Tue Oct 1 08:49:07 2002
@@ -43,12 +43,20 @@
tal:attributes="value info/id" />
</td>
- <td class="ContentIcon" tal:content="structure info/icon|default">
+ <td>
+ <a href="#"
+ tal:attributes="href
+ string:${info/url}/@@SelectedManagementView.html"
+ tal:content="structure info/icon|default"
+ >
+ </a>
+ </td>
</td>
<td class="ContentTitle">
<a href="subfolder_id"
- tal:attributes="href string:${info/url}"
+ tal:attributes="href
+ string:${info/url}/@@SelectedManagementView.html"
tal:content="info/title"
>Folder Title or ID here</a>
</td>