[Zope3-checkins] CVS: Zope3/src/zope/app/utilities -
configure.zcml:1.1.2.3 schema.py:1.1.2.5
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed Aug 13 10:51:24 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/utilities
In directory cvs.zope.org:/tmp/cvs-serv31494/utilities
Modified Files:
Tag: dreamcatcher-ttwschema-branch
configure.zcml schema.py
Log Message:
got name setting working.
=== Zope3/src/zope/app/utilities/configure.zcml 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/utilities/configure.zcml:1.1.2.2 Tue Aug 12 10:31:28 2003
+++ Zope3/src/zope/app/utilities/configure.zcml Wed Aug 13 09:51:18 2003
@@ -9,7 +9,7 @@
<browser:view
name="+"
for="zope.app.interfaces.utilities.IMutableSchema"
- class="zope.app.utilities.schema.SchemaAdding"
+ class=".schema.SchemaAdding"
permission="zope.ManageContent"
allowed_attributes="addingInfo"
menu="zmi_actions"
@@ -46,6 +46,20 @@
/>
</content>
+
+
+ <browser:addform
+ label="New Mutable Schema Registration"
+ for="zope.app.interfaces.utilities.ISchemaUtility"
+ name="addRegistration.html"
+ schema="zope.app.interfaces.services.utility.IUtilityRegistration"
+ class=".schema.AddSchemaRegistration"
+ permission="zope.ManageServices"
+ content_factory="zope.app.services.utility.UtilityRegistration"
+ arguments="name interface componentPath"
+ set_after_add="status"
+ fields="name interface componentPath permission status" />
+
<!-- Menu entry for "add component" menu -->
<browser:menuItem
=== Zope3/src/zope/app/utilities/schema.py 1.1.2.4 => 1.1.2.5 ===
--- Zope3/src/zope/app/utilities/schema.py:1.1.2.4 Wed Aug 13 09:36:41 2003
+++ Zope3/src/zope/app/utilities/schema.py Wed Aug 13 09:51:18 2003
@@ -185,3 +185,13 @@
"""See zope.app.interfaces.container.IAdding"""
return (str(zapi.getView(self.context, "absolute_url", self.request))
+ '/@@editschema.html')
+
+
+from zope.app.browser.services.utility import AddRegistration
+
+class AddSchemaRegistration(AddRegistration):
+
+ def add(self, registration):
+ reg = super(AddSchemaRegistration, self).add(registration)
+ self.context.setName(registration.name)
+ return reg
More information about the Zope3-Checkins
mailing list