[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZMI/Views/Browser - GenericCreatorView.py:1.1.2.3 add.pt:1.1.2.2 browser.zcml:1.1.2.2

Gary Poster garyposter@earthlink.net
Tue, 2 Apr 2002 21:13:46 -0500


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

Modified Files:
      Tag: gary-pre_create_views-branch
	GenericCreatorView.py add.pt browser.zcml 
Log Message:
last commit bombed; trying again.

merged with Zope-3x branch (on my own branch; don't worry) to take advantage of Stephan's new code.  changed licenses with license utility (and thus five million commits).  Made a couple of presentational improvements.  Need to change job  board example to take advantage of this next.



=== Zope3/lib/python/Zope/App/ZMI/Views/Browser/GenericCreatorView.py 1.1.2.2 => 1.1.2.3 ===
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 from Zope.Publisher.Browser.AttributePublisher import AttributePublisher
 from Zope.PageTemplate import PageTemplateFile
-from Zope.App.ZMI.provideClass import GenericCreatorMarkerInterface
+from Zope.App.ZMI.IGenericCreatorMarker import IGenericCreatorMarker
 from Zope.ContextWrapper import getcontext
 from Zope.App.OFS.Container.Exceptions import DuplicateIDError
 from Zope.ComponentArchitecture import createObject
@@ -16,8 +29,8 @@
     def getContext(self):
         return self._context
 
-    # Assert that we can only be applied to GenericCreatorMarkerInterface
-    __used_for__=GenericCreatorMarkerInterface
+    # Assert that we can only be applied to IGenericCreatorMarker
+    __used_for__=IGenericCreatorMarker
 
     # Input form
     index = PageTemplateFile('add.pt', globals())
@@ -39,4 +52,4 @@
 
         return self.confirmed( type_name=addable.id(), id=name )
 
-    confirmed = PageTemplateFile('add_confirmed.pt')
\ No newline at end of file
+    confirmed = PageTemplateFile('add_confirmed.pt')


=== Zope3/lib/python/Zope/App/ZMI/Views/Browser/add.pt 1.1.2.1 => 1.1.2.2 ===
 
 <div><!-- metal:fill-slot="body" -->
-
+<h1>Add <span tal:replace="context/title">Item Title</span></h1>
+<p tal:content="context/description">The item's description goes here</p>
 <form action="action.html" method="POST">
-
+<p>Enter the id (or file name, as seen in the URL) for this item, and click &quot;Add&quot;.</p>
 <input type="text" name="name" />
 <input type="submit" value=" Add " />
 


=== Zope3/lib/python/Zope/App/ZMI/Views/Browser/browser.zcml 1.1.2.1 => 1.1.2.2 ===
 
   <browser:defaultView name="simple_create"
-			for="Zope.App.ZMI.provideClass.GenericCreatorMarkerInterface"
+			for="Zope.App.ZMI.IGenericCreatorMarker."
 			factory=".GenericCreatorView." />
 
   <security:protectClass name=".GenericCreatorView."
                        permission_id="Zope.View"
                        methods="index, action" />
                        
-</zopeConfigure>
\ No newline at end of file
+</zopeConfigure>