[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/index/text - control.pt:1.1 configure.zcml:1.2

Guido van Rossum guido@python.org
Wed, 4 Dec 2002 14:04:52 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/index/text
In directory cvs.zope.org:/tmp/cvs-serv6981

Modified Files:
	configure.zcml 
Added Files:
	control.pt 
Log Message:
Get rid of browser subdir. Rename stats to control.

=== Added File Zope3/lib/python/Zope/App/index/text/control.pt ===
<html>

  <body>

    <h1>TextIndex</h1>

    <div>
    	Documents: <span tal:replace="context/documentCount" />
    </div>

    <div>
    	Words: <span tal:replace="context/wordCount" />
    </div>

  </body>

</html>


=== Zope3/lib/python/Zope/App/index/text/configure.zcml 1.1 => 1.2 ===
--- Zope3/lib/python/Zope/App/index/text/configure.zcml:1.1	Wed Dec  4 12:11:51 2002
+++ Zope3/lib/python/Zope/App/index/text/configure.zcml	Wed Dec  4 14:04:50 2002
@@ -1,10 +1,9 @@
 <zopeConfigure
    xmlns='http://namespaces.zope.org/zope'
+   xmlns:browser='http://namespaces.zope.org/browser'
 >
 
-  <content
-    class=".index.TextIndex"
-    >
+  <content class=".index.TextIndex">
 
     <require
       permission="Zope.ManageServices"
@@ -18,6 +17,22 @@
 
   </content>
 
-  <include package=".browser" />
+  <browser:menuItem
+    menu="add_component"
+    for="Zope.App.OFS.Container.IAdding."
+    action="Zope.App.index.text.factory"
+    title="Text Index"
+    description="An index to support full-text search"
+    />
+
+  <browser:defaultView
+    for="Zope.TextIndex.TextIndexInterfaces.IStatistics"
+    name="control.html" />
+
+  <browser:view
+    for="Zope.TextIndex.TextIndexInterfaces.IStatistics"
+    permission="Zope.View"
+    name="control.html"
+    template="control.pt" />
 
 </zopeConfigure>