[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Undo - Undo.py:1.1.2.6 undo.zcml:1.1.2.4 undo_log.pt:1.1.2.5

Jim Fulton jim@zope.com
Fri, 7 Jun 2002 10:41:49 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/Undo
In directory cvs.zope.org:/tmp/cvs-serv12187/lib/python/Zope/App/Undo

Modified Files:
      Tag: Zope-3x-branch
	Undo.py undo.zcml undo_log.pt 
Log Message:
Merging in Zope3InWonderland-branch, which implemented the following
proposals (see
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/OldProposals): 
- RenameAllowToRequire

- GroupClassRelatedDirectivesInClassDirective

- ViewInterfaceAndSimplification

- ConsistentUseOfSpacesAsDelimitersInZCMLAttributes

- TwoArgumentViewConstructors

- ImplementsInZCML

- SimpleViewCreationInZCML

- RemoveGetView

- ReplaceProtectWithAllow

- ViewMethodsAsViews

- MergeProtectionAndComponentDefinitions

There were also various security fixes resulting of better integration
of security with components.


=== Zope3/lib/python/Zope/App/Undo/Undo.py 1.1.2.5 => 1.1.2.6 ===
 
 from Zope.ComponentArchitecture import getUtility
-from Zope.Publisher.Browser.AttributePublisher import AttributePublisher
+from Zope.Publisher.Browser.BrowserView import BrowserView
 from Zope.App.PageTemplate import ViewPageTemplateFile
 from IUndoManager import IUndoManager
 
 
-class Undo(AttributePublisher):
+class Undo(BrowserView):
     " Undo View "
 
-    def __init__(self, context):
-        self.context = context
+    def __init__(self, *args):
+        super(Undo, self).__init__(*args)
         self.utility = getUtility(self.context, IUndoManager)
-
-    def getContext(self):
-        return self.context
         
     index = ViewPageTemplateFile('undo_log.pt')
 


=== Zope3/lib/python/Zope/App/Undo/undo.zcml 1.1.2.3 => 1.1.2.4 ===
 >
 
-<security:protectClass class="Zope.App.Undo."
-    permission_id="Zope.ManageContent"
-    names="index, action, getUndoInfo" />
+<browser:view
+    permission="Zope.ManageContent"
+    factory="Zope.App.Undo." >
 
-<browser:view name="undo"
-    factory="Zope.App.Undo." />
+   <browser:page name="undoForm.html" attribute="index" />
+   <browser:page name="undo.html" attribute="action" />
+</browser:view>
 
 </zopeConfigure>


=== Zope3/lib/python/Zope/App/Undo/undo_log.pt 1.1.2.4 => 1.1.2.5 ===
 <div metal:fill-slot="body">
 
-<form action="action" method="post">
+<form action="./view::undo.html" method="post">
 
 <p class="form-help">
 This application's transactional feature allows you to easily undo changes