You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2004/02/09 23:58:35 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/content/search create-index.xsp
gregor 2004/02/09 14:58:35
Modified: src/webapp/lenya/content/admin sitetree.xml
src/webapp/lenya admin.xmap lucene.xmap
src/webapp/lenya/content/search create-index.xsp
Log:
added lucene index creation gui (was hidden in the lucene sitemap)
it is not working yet
Revision Changes Path
1.9 +5 -0 cocoon-lenya/src/webapp/lenya/content/admin/sitetree.xml
Index: sitetree.xml
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/content/admin/sitetree.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sitetree.xml 2 Sep 2003 13:17:56 -0000 1.8
+++ sitetree.xml 9 Feb 2004 22:58:35 -0000 1.9
@@ -40,6 +40,11 @@
<label xml:lang="de">Delete Trash</label>
</node>
+ <node id="lucene" href="lucene.html">
+ <label xml:lang="en">Search</label>
+ <label xml:lang="de">Search</label>
+ </node>
+
<node id="status" href="status.html">
<label xml:lang="en">Cocoon and Server Status</label>
<label xml:lang="de">Cocoon and Server Status</label>
1.24 +16 -1 cocoon-lenya/src/webapp/lenya/admin.xmap
Index: admin.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/admin.xmap,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- admin.xmap 6 Feb 2004 19:22:12 -0000 1.23
+++ admin.xmap 9 Feb 2004 22:58:35 -0000 1.24
@@ -20,7 +20,13 @@
<map:script src="content/admin/ipranges/iprange-admin.js"/>
</map:flow>
- <map:resources>
+ <map:resources>
+ <map:resource name="style-cms-page">
+ <map:transform src="xslt/admin/page2xhtml.xsl">
+ <map:parameter name="contextprefix" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="xhtml"/>
+ </map:resource>
<map:resource name="fallback-generation">
<map:select type="resource-exists">
@@ -135,6 +141,15 @@
<map:serialize type="html"/>
</map:match>
+ <!-- ============================================================ -->
+ <!-- Lucene Page -->
+ <!-- ============================================================ -->
+
+ <map:match pattern="internal/lucene.html">
+ <map:generate type="serverpages" src="content/search/create-index.xsp"/>
+ <map:call resource="style-cms-page"/>
+ </map:match>
+
<!-- ============================================================ -->
<!-- Common Admin Pages -->
<!-- ============================================================ -->
1.13 +10 -20 cocoon-lenya/src/webapp/lenya/lucene.xmap
Index: lucene.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/lucene.xmap,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- lucene.xmap 8 Feb 2004 17:02:10 -0000 1.12
+++ lucene.xmap 9 Feb 2004 22:58:35 -0000 1.13
@@ -9,6 +9,15 @@
<map:serialize type="xml"/>
</map:view>
</map:views>
+
+ <map:resources>
+ <map:resource name="style-cms-page">
+ <map:transform src="xslt/util/page2xhtml.xsl">
+ <map:parameter name="contextprefix" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="xhtml"/>
+ </map:resource>
+</map:resources>
<map:pipelines>
@@ -42,25 +51,6 @@
<map:serialize type="xml"/>
</map:handle-errors>
</map:pipeline>
-
-
- <!-- Lucene web based administration -->
- <!-- Create Search Index -->
-<!--
- <map:pipeline>
- <map:match pattern="create">
- <map:generate type="serverpages" src="content/search/create-index.xsp"/>
- <map:transform src="xslt/search/dynamic-page2html.xsl">
- <map:parameter name="view-source" value="lucene/create-index.xsp"/>
- </map:transform>
- <map:serialize type="html"/>
- </map:match>
- <map:handle-errors>
- <map:serialize type="xml"/>
- </map:handle-errors>
- </map:pipeline>
--->
- <!-- /Create Search Index -->
- </map:pipelines>
+ </map:pipelines>
</map:sitemap>
1.3 +20 -35 cocoon-lenya/src/webapp/lenya/content/search/create-index.xsp
Index: create-index.xsp
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/content/search/create-index.xsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- create-index.xsp 6 Mar 2003 20:45:53 -0000 1.2
+++ create-index.xsp 9 Feb 2004 22:58:35 -0000 1.3
@@ -1,8 +1,11 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
- xmlns:xsp-request="http://apache.org/xsp/request/2.0">
+ xmlns:xsp-request="http://apache.org/xsp/request/2.0"
+ xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+ xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
+ >
<xsp:structure>
<xsp:include>org.apache.avalon.framework.context.ContextException</xsp:include>
@@ -68,7 +71,7 @@
}
String baseURL = <xsp-request:get-parameter name="baseURL" />;
- String publication_id = <xsp-request:get-parameter name="publication-id" />;
+ String publication_id = <input:get-attribute module="page-envelope" name="publication-id" as="string"/>;
if (baseURL != null && baseURL.length() > 0 && publication_id != null && publication_id.length() > 0) {
createIndex(baseURL, create, publication_id);
indexHasBeenCreated=true;
@@ -78,49 +81,29 @@
"http://" +
<xsp-request:get-server-name/> +
":" + <xsp-request:get-server-port/> +
- <xsp-request:get-context-path/> + "/" + "oscom/index.html";
+ <xsp-request:get-context-path/> + "/" + <input:get-attribute module="page-envelope" name="publication-id" as="string"/> + "/index.html";
}
</xsp:logic>
<content>
+ <page:page>
+ <page:title>Search</page:title>
+ <page:body>
+ <div class="lenya-box">
+ <div class="lenya-box-title">Create a search index</div>
+ <div class="lenya-box-body">
<xsp:logic>
if(indexHasBeenCreated){
<xsp:content><index_has_been_created/><h3>Index has been created for Publication <xsp:expr>publication_id</xsp:expr></h3></xsp:content>
}
</xsp:logic>
- <h1>Create a Lucene search index</h1>
- <para>
This process might take some time (follow the tail of your logfiles
to see the indexer in progress).
- <ul>
- <li>LuceneCocoonIndexer.ROLE <xsp:expr>LuceneCocoonIndexer.ROLE</xsp:expr>
- </li>
- <li>context-path <xsp-request:get-context-path/>
- </li>
- <li>baseURL <xsp:expr>baseURL</xsp:expr>
- </li>
- <li>create <xsp:expr>String.valueOf(createParam)</xsp:expr>,
- <xsp:expr>String.valueOf( create )</xsp:expr>
- </li>
- <li>get-uri <xsp-request:get-uri/>
- </li>
- <li>get-sitemap-uri <xsp-request:get-sitemap-uri/>
- </li>
- </ul>
-
- <form action="create">
- <table>
- <tr>
- <td>Publication ID</td>
- <td>
- <input type="radio" name="publication-id" value="oscom"><xsp:attribute name="checked"/></input>OSCOM
- <input type="radio" name="publication-id" value="forum"/>Lenya News
- <input type="radio" name="publication-id" value="unipublic"/>unipublic
- </td>
- </tr>
+ <form action="">
+ <table class="lenya-table-noborder">
<tr>
<td>BaseURL</td>
<td>
- <input type="text" name="baseURL" size="60">
+ <input type="text" name="baseURL" size="60" class="lenya-form-element">
<xsp:attribute name="value"><xsp:expr>baseURL</xsp:expr></xsp:attribute>
</input>
</td>
@@ -140,8 +123,10 @@
</tr>
</table>
</form>
-
- </para>
+ </div>
+ </div>
+ </page:body>
+ </page:page>
</content>
</page>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org