[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ApplicationControl/Views/Browser - ApplicationControlView.py:1.1.2.1 index.pt:1.1.2.1 browser.zcml:1.1.2.2
Philipp von Weitershausen
philikon@gmx.net
Wed, 10 Apr 2002 07:19:01 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ApplicationControl/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv5379/App/OFS/ApplicationControl/Views/Browser
Modified Files:
Tag: Zope-3x-branch
browser.zcml
Added Files:
Tag: Zope-3x-branch
ApplicationControlView.py index.pt
Log Message:
Made ApplicationControl pluggable; plugins are views for the
ApplicationController instance
=== Added File Zope3/lib/python/Zope/App/OFS/ApplicationControl/Views/Browser/ApplicationControlView.py ===
##############################################################################
#
# 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.
#
##############################################################################
"""
$Id: ApplicationControlView.py,v 1.1.2.1 2002/04/10 11:18:59 philikon Exp $
"""
from Zope.PageTemplate import SimpleViewClass
from Zope.App.OFS.ApplicationControl.IApplicationControl import IApplicationControl
ApplicationControlView = SimpleViewClass('index.pt', used_for=IApplicationControl)
=== Added File Zope3/lib/python/Zope/App/OFS/ApplicationControl/Views/Browser/index.pt ===
<html metal:use-macro="views/standard_macros/page">
<head>
<title>Zope Application Controller</title>
</head>
<body>
<div metal:fill-slot="body">
<ul>
<!-- XXX /ApplicationController;etc/${info/name} is a workaround for the unavailable
absolute_url function. -->
<li tal:repeat="info context/getListOfViews"><a tal:attributes="href string:/ApplicationController;;etc/${info/name};;view" tal:content="info/title">Foo Title</a></li>
</ul>
</div>
</body>
</html>
=== Zope3/lib/python/Zope/App/OFS/ApplicationControl/Views/Browser/browser.zcml 1.1.2.1 => 1.1.2.2 ===
xmlns:security='http://namespaces.zope.org/security'
xmlns:browser='http://namespaces.zope.org/browser'
+ xmlns:application-control='http://namespaces.zope.org/application-control'
>
<!-- ApplicationControl View Directives -->
+ <browser:defaultView name="index"
+ for="Zope.App.OFS.ApplicationControl.IApplicationControl."
+ factory=".ApplicationControlView." />
+
+ <security:protectClass
+ name=".ApplicationControlView."
+ permission_id="Zope.ManageApplication"
+ methods="index" />
+
+
+ <!-- RuntimeInfo View Directives -->
<browser:defaultView name="runtimeinfo"
for="Zope.App.OFS.ApplicationControl.IApplicationControl."
factory=".RuntimeInfoView." />
+ <!-- Hint: also register the 'runtimeinfo' view as ApplicationControl plugin -->
+ <application-control:registerView name="runtimeinfo"
+ title="Runtime Information" />
+
<security:protectClass
name=".RuntimeInfoView."
permission_id="Zope.ManageApplication"
methods="index, runtimeInfo" />
+
</zopeConfigure>