[Zope3-checkins] CVS: Zope3/src/zope/app/browser/index - __init__.py:1.1.2.1 configure.zcml:1.1.2.1 subscription_control.pt:1.1.2.1
Jim Fulton
jim@zope.com
Wed, 25 Dec 2002 08:27:23 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/index
In directory cvs.zope.org:/tmp/cvs-serv9989/src/zope/app/browser/index
Added Files:
Tag: NameGeddon-branch
__init__.py configure.zcml subscription_control.pt
Log Message:
Gor zope running again!
I haven't tested everything.
(Yes, we need functional tests. Maybe this week).
Good enough to merge into trunk.
=== Added File Zope3/src/zope/app/browser/index/__init__.py ===
#
# This file is necessary to make this directory a package.
=== Added File Zope3/src/zope/app/browser/index/configure.zcml ===
<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
<browser:menuItem
menu="add_component"
for="zope.app.interfaces.container.IAdding"
action="zope.app.index.subscribers.Registration"
title="Registration subscriber"
description="An event subscriber that registers content with the objecthub"
/>
<browser:defaultView
for="zope.app.index.subscribers.ISubscriptionControl"
name="control.html" />
<browser:view
for="zope.app.index.subscribers.ISubscriptionControl"
permission="zope.ManageServices"
name="control.html"
template="subscription_control.pt"
/>
<include package=".text" />
</zopeConfigure>
=== Added File Zope3/src/zope/app/browser/index/subscription_control.pt ===
<html metal:use-macro="views/standard_macros/page">
<head>
<title>Registration "Service" Control Page</title>
</head>
<body>
<div metal:fill-slot="body">
<h1>Subscription control</h1>
<span tal:condition="request/callSubscribe|nothing" tal:omit-tag="">
<span tal:define="dummy context/subscribe" tal:omit-tag=""/>
Successfully subscribed.
</span>
<span tal:condition="request/callUnsubscribe|nothing" tal:omit-tag="">
<span tal:define="dummy context/unsubscribe" tal:omit-tag=""/>
Successfully unsubscribed.
</span>
<span tal:condition="request/callRegisterExisting|nothing" tal:omit-tag="">
<span tal:define="dummy context/registerExisting" tal:omit-tag=""/>
Registration done.
</span>
<form method="POST">
<span tal:condition="context/isSubscribed" tal:omit-tag="">
Subscription state: ON
<input type="submit" value="Unsubscribe" name="callUnsubscribe" />
</span>
<span tal:condition="not:context/isSubscribed" tal:omit-tag="">
Subscription state: OFF
<input type="submit" value="Subscribe" name="callSubscribe" />
</span>
</form>
<form method="POST">
<input type="submit" value="Register Existing Objects"
name="callRegisterExisting" />
</form>
</div>
</body>
</html>