[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ZMI - configure.zcml:1.11 StandardMacros.py:1.4 ZMIViewUtility.py:NONE
Jim Fulton
jim@zope.com
Fri, 20 Dec 2002 18:00:56 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZMI
In directory cvs.zope.org:/tmp/cvs-serv5764/lib/python/Zope/App/ZMI
Modified Files:
configure.zcml StandardMacros.py
Removed Files:
ZMIViewUtility.py
Log Message:
Refactored the way browser menus are made available to views.
- Added a new view, view_get_menu, for accessing menus.
From zpt, do something like:
tal:repeat="view context/@@view_get_menu/zmi_views"
- Changed existing templates to get the "zmi_views" menu this way.
- Added a new "zmi_actions" and incorporated it into the default skin.
See "view_macros.pt".
- Ripped out the no-longer-needed ZMIViews utility.
=== Zope3/lib/python/Zope/App/ZMI/configure.zcml 1.10 => 1.11 ===
--- Zope3/lib/python/Zope/App/ZMI/configure.zcml:1.10 Wed Oct 30 03:54:08 2002
+++ Zope3/lib/python/Zope/App/ZMI/configure.zcml Fri Dec 20 18:00:25 2002
@@ -3,29 +3,42 @@
xmlns:browser='http://namespaces.zope.org/browser'
>
- <browser:menu id="zmi_views"
- title="Menu for displaying alternate representations
- of an object" />
+ <browser:menu
+ id="zmi_views"
+ title="Menu for displaying alternate representations of an object"
+ />
+
+ <browser:menu id="zmi_actions"
+ title="Menu for displaying actions to be performed"
+ />
<browser:view name="standard_macros"
permission="Zope.View"
factory=".StandardMacros."
- allowed_interface=".StandardMacros.IStandardMacros" />
+ allowed_interface=".StandardMacros.IStandardMacros"
+ />
<browser:view name="view_macros"
permission="Zope.View"
- template="www/view_macros.pt" />
+ template="www/view_macros.pt"
+ />
<browser:view name="dialog_macros"
permission="Zope.View"
- template="www/dialog_macros.pt" />
+ template="www/dialog_macros.pt"
+ />
<browser:resource name="zopetopBasic.css"
- file="www/zopetopBasic.css"/>
+ file="www/zopetopBasic.css"
+ />
+
<browser:resource name="zopetopWidgets.css"
- file="www/zopetopWidgets.css"/>
+ file="www/zopetopWidgets.css"
+ />
+
<browser:resource name="zopetopStructure.css"
- file="www/zopetopStructure.css"/>
+ file="www/zopetopStructure.css"
+ />
<browser:resource name="arrowUp.gif" file="www/arrowUp.gif"/>
=== Zope3/lib/python/Zope/App/ZMI/StandardMacros.py 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/App/ZMI/StandardMacros.py:1.3 Mon Oct 28 06:21:13 2002
+++ Zope3/lib/python/Zope/App/ZMI/StandardMacros.py Fri Dec 20 18:00:25 2002
@@ -17,8 +17,9 @@
$Id$
"""
-from ZMIViewUtility import ZMIViewUtility, IZMIViewUtility
+from Interface import Interface
from Zope.ComponentArchitecture import getView
+from Zope.Publisher.Browser.BrowserView import BrowserView
class Macros:
@@ -38,13 +39,13 @@
raise KeyError, key
-class IStandardMacros(IZMIViewUtility):
+class IStandardMacros(Interface):
def __getitem__(key):
"""Return the macro named 'key'"""
-class StandardMacros(ZMIViewUtility, Macros):
+class StandardMacros(BrowserView, Macros):
__implements__ = IStandardMacros
=== Removed File Zope3/lib/python/Zope/App/ZMI/ZMIViewUtility.py ===