[Zope3-checkins] CVS: Zope3/src/zope/app/browser/index - __init__.py:1.2 configure.zcml:1.2 subscription_control.pt:1.2
Jim Fulton
jim@zope.com
Wed, 25 Dec 2002 09:14:04 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/index
In directory cvs.zope.org:/tmp/cvs-serv15352/src/zope/app/browser/index
Added Files:
__init__.py configure.zcml subscription_control.pt
Log Message:
Grand renaming:
- Renamed most files (especially python modules) to lower case.
- Moved views and interfaces into separate hierarchies within each
project, where each top-level directory under the zope package
is a separate project.
- Moved everything to src from lib/python.
lib/python will eventually go away. I need access to the cvs
repository to make this happen, however.
There are probably some bits that are broken. All tests pass
and zope runs, but I haven't tried everything. There are a number
of cleanups I'll work on tomorrow.
=== Zope3/src/zope/app/browser/index/__init__.py 1.1 => 1.2 ===
--- /dev/null Wed Dec 25 09:14:04 2002
+++ Zope3/src/zope/app/browser/index/__init__.py Wed Dec 25 09:12:33 2002
@@ -0,0 +1,2 @@
+#
+# This file is necessary to make this directory a package.
=== Zope3/src/zope/app/browser/index/configure.zcml 1.1 => 1.2 ===
--- /dev/null Wed Dec 25 09:14:04 2002
+++ Zope3/src/zope/app/browser/index/configure.zcml Wed Dec 25 09:12:33 2002
@@ -0,0 +1,25 @@
+<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>
=== Zope3/src/zope/app/browser/index/subscription_control.pt 1.1 => 1.2 ===
--- /dev/null Wed Dec 25 09:14:04 2002
+++ Zope3/src/zope/app/browser/index/subscription_control.pt Wed Dec 25 09:12:33 2002
@@ -0,0 +1,46 @@
+<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>