[Zope3-checkins] CVS: Zope3/src/zope/app/presentation/browser -
pagefolder.py:1.1 pagefolder.zcml:1.1 zpt.py:1.1 zpt.zcml:1.1
configure.zcml:1.2
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Mar 11 05:19:07 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/presentation/browser
In directory cvs.zope.org:/tmp/cvs-serv8352/src/zope/app/presentation/browser
Modified Files:
configure.zcml
Added Files:
pagefolder.py pagefolder.zcml zpt.py zpt.zcml
Log Message:
Moved Page Folder and it Page Templates into zope.app.presentation.
=== Added File Zope3/src/zope/app/presentation/browser/pagefolder.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: pagefolder.py,v 1.1 2004/03/11 10:18:36 srichter Exp $
"""
from zope.app.presentation.pagefolder import IPageFolder
class PageFolderDefaultConfiguration:
def changed(self):
"""Apply changes to existing configurations"""
__used_for__ = IPageFolder
folder = self.context
if folder.apply:
folder.applyDefaults()
=== Added File Zope3/src/zope/app/presentation/browser/pagefolder.zcml ===
<zope:configure
xmlns:zope="http://namespaces.zope.org/zope"
xmlns="http://namespaces.zope.org/browser">
<!-- PageFolder -->
<containerViews
for="zope.app.presentation.pagefolder.IPageFolder"
index="zope.ManageServices"
contents="zope.ManageServices"
add="zope.ManageServices"
/>
<editform
name="DefaultRegistration.html"
label="Default registration parameters"
schema="zope.app.presentation.pagefolder.IPageFolderInfo"
menu="zmi_views" title="Default Registration"
permission="zope.ManageServices"
class=".pagefolder.PageFolderDefaultConfiguration"
/>
<addform
name="AddPageFolder.html"
label="Default registration parameters"
schema="zope.app.presentation.pagefolder.IPageFolderInfo"
permission="zope.ManageServices"
content_factory="zope.app.presentation.pagefolder.PageFolder"
/>
<addMenuItem
class="zope.app.presentation.pagefolder.PageFolder"
title="Page Folder"
permission="zope.ManageServices"
view="AddPageFolder.html"
/>
</zope:configure>
=== Added File Zope3/src/zope/app/presentation/browser/zpt.py ===
##############################################################################
#
# Copyright (c) 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.
#
##############################################################################
"""ZPT View Classes
$Id: zpt.py,v 1.1 2004/03/11 10:18:36 srichter Exp $
"""
class Source(object):
def __call__(self):
self.request.response.setHeader('content-type',
self.context.contentType)
return self.context.source
=== Added File Zope3/src/zope/app/presentation/browser/zpt.zcml ===
<zope:configure
xmlns:zope="http://namespaces.zope.org/zope"
xmlns="http://namespaces.zope.org/browser">
<view
for="zope.app.presentation.zpt.IZPTTemplate"
name="index.html"
class=".zpt.Source"
permission="zope.ManageServices" />
<editform
schema="zope.app.presentation.zpt.IZPTInfo"
name="edit.html"
menu="zmi_views"
label="ZPT Template"
permission="zope.ManageServices"
/>
<addMenuItem
permission="zope.ManageServices"
class="zope.app.presentation.zpt.ZPTTemplate"
title="ZPT Template" />
<addform
for="zope.app.presentation.zpt.IZPTTemplate"
schema="zope.app.presentation.IPageRegistration"
name="addRegistration.html"
class="zope.app.browser.services.registration.AddComponentRegistration"
content_factory="zope.app.presentation.PageRegistration"
keyword_arguments="required factoryName name permission
layer attribute"
set_before_add="template"
label="Register a view ZPT"
permission="zope.ManageServices"
fields="required name
template factoryName layer permission status attribute"
/>
</zope:configure>
=== Zope3/src/zope/app/presentation/browser/configure.zcml 1.1 => 1.2 ===
--- Zope3/src/zope/app/presentation/browser/configure.zcml:1.1 Mon Mar 8 14:40:27 2004
+++ Zope3/src/zope/app/presentation/browser/configure.zcml Thu Mar 11 05:18:36 2004
@@ -29,4 +29,7 @@
status attribute"
usage="addingdialog" />
+<include file="pagefolder.zcml" />
+<include file="zpt.zcml" />
+
</configure>
More information about the Zope3-Checkins
mailing list