[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services - configure.zcml:1.16 viewpackage_contents.pt:1.3
Jim Fulton
jim@zope.com
Mon, 3 Feb 2003 12:29:39 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/services
In directory cvs.zope.org:/tmp/cvs-serv2241/src/zope/app/browser/services
Modified Files:
configure.zcml viewpackage_contents.pt
Log Message:
Updated view packages to reflect recent page configuration changes:
- The presentation type is now fixed to IBrowserPresentation.
- Now specify a permission
I also made the contents view conditional on the package being
configured. This makes it easier to remember to do the configuration
before creating pages.
I'll need something similar to prevent adding pages through FTP/PUT.
=== Zope3/src/zope/app/browser/services/configure.zcml 1.15 => 1.16 ===
--- Zope3/src/zope/app/browser/services/configure.zcml:1.15 Tue Jan 21 16:45:04 2003
+++ Zope3/src/zope/app/browser/services/configure.zcml Mon Feb 3 12:29:06 2003
@@ -763,11 +763,21 @@
label="Default configuration parameters"
/>
- <browser:menuItems menu="zmi_views"
- for="zope.app.interfaces.services.service.IViewPackage">
- <browser:menuItem title="Contents"
- action="@@contents.html"/>
- </browser:menuItems>
+ <browser:menuItem
+ menu="zmi_actions"
+ for="zope.app.interfaces.services.service.IViewPackage"
+ title="Add"
+ action="."
+ filter="nothing"
+ />
+
+ <browser:menuItem
+ menu="zmi_views"
+ for="zope.app.interfaces.services.service.IViewPackage"
+ title="Contents"
+ action="@@contents.html"
+ filter="context/configured"
+ />
<browser:menuItem menu="add_component"
for="zope.app.interfaces.container.IAdding"
=== Zope3/src/zope/app/browser/services/viewpackage_contents.pt 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/services/viewpackage_contents.pt:1.2 Wed Dec 25 09:12:36 2002
+++ Zope3/src/zope/app/browser/services/viewpackage_contents.pt Mon Feb 3 12:29:06 2003
@@ -15,9 +15,12 @@
<div metal:use-macro="view/contentsMacros/macros/contents_table" />
<br />
- <input type="text" name="name" />
- <input type="submit" name="@@add.html:method" value="Add"
- i18nXXX:attributes="value string:menu_add_button" />
+ <div tal:condition="context/configured">
+ <input type="text" name="name" />
+ <input type="submit" name="@@add.html:method" value="Add"
+ i18nXXX:attributes="value string:menu_add_button"
+ />
+ </div>
<input type="submit" name="@@removeObjects.html:method" value="Delete"
i18nXXX:attributes="value string:menu_delete_button" />
</form>