<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 1999-2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<cinclude:includexml xmlns:cinclude="http://apache.org/cocoon/include/1.0">
<cinclude:src>cocoon://modules/lucene/search.xml</cinclude:src>
</cinclude:includexml>
"
<?xml version="1.0"?> <!-- Copyright 1999-2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: search.jx 374391 2006-02-02 14:02:17Z andreas $ -->
<page:page
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
>
<page:title><i18n:text>Search</i18n:text></page:title>
<page:body>
UsecaseNAme::<jx:out value="${usecase}"/>
ContinutionID::<jx:out value="${continuation.id}"/>
PublicationID::<jx:out value="${usecase.getParameter('publication')}"/>
<div class="lenya-box"> <!-- by Mansoor: old ${usecase.getParameter('publication') -->
<div class="lenya-box-title">Search <jx:out value="${usecase.getParameterAsString('publication')}"/></div>
<jx:import uri="fallback://lenya/usecases/templates/messages.jx"/>
<div class="lenya-box-body">
<form id="form-search">
<input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
<input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
<table class="lenya-table-noborder">
<tr>
<td><label for="queryString"><i18n:text>Search</i18n:text></label></td>
<td>
<input type="text" name="queryString" size="60" class="lenya-form-element" value="${usecase.getParameter('queryString')}"/>
</td>
</tr>
<jx:forEach var="publication" items="${usecase.getParameter('publications')}">
<tr>
<td><label for="publication-id"><i18n:text>Publications</i18n:text></label></td>
<td>
<jx:choose>
<jx:when test="@pid = ../@checked-pid">
<input type="radio" name="publication-id" value="${publication.id}" checked="true"/>
<jx:out value="${publication.name}"/>
</jx:when>
<jx:otherwise>
<input type="radio" name="publication-id" value="${publication.id}"/>
<jx:out value="${publication.name}"/>
</jx:otherwise>
</jx:choose>
</td>
</tr>
<tr>
<td><label for="dummy-index-id.fields"><i18n:text>Fields</i18n:text></label></td>
<td>
<select name="dummy-index-id.fields" class="lenya-form-element">
<jx:forEach select="search-fields/field">
<jx:choose>
<jx:when test="/search-and-results/search/fields/field = .">
<option value="{.}" selected="selected">
<jx:out value="."/>
</option>
</jx:when>
<jx:otherwise>
<option value="{.}">
<jx:out value="."/>
</option>
</jx:otherwise>
</jx:choose>
</jx:forEach>
</select>
</td>
</tr>
</jx:forEach>
<tr>
<td><label for="sortBy"><i18n:text>Sort by</i18n:text></label></td>
<td>
<select name="sortBy" class="lenya-form-element">
<jx:choose>
<jx:when test="${sort-by} = 'score'">
<option value="score" selected="selected"><i18n:text>Score</i18n:text></option>
</jx:when>
<jx:otherwise>
<option value="score"><i18n:text>Score</i18n:text></option>
</jx:otherwise>
</jx:choose>
<jx:choose>
<jx:when test="${sort-by} = 'title'">
<option value="title" selected="selected"><i18n:text>Title</i18n:text></option>
</jx:when>
<jx:otherwise>
<option value="title"><i18n:text>Title</i18n:text></option>
</jx:otherwise>
</jx:choose>
</select>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<input i18n:attr="value" type="submit" name="submit" value="Search"/>
</td>
</tr>
</table>
</form>
<h3><i18n:text>Mansoor Results for <jx:out value="../search/${publication}"/></i18n:text></h3>
<jx:choose>
<jx:when test="hits">
<p> Documents <jx:out
value="pages/[EMAIL PROTECTED]'current']/@start"/> -
<jx:out value="pages/[EMAIL PROTECTED]'current']/@end"/>
of <jx:out value="@total-hits"/> matches </p>
<table width="90%" cellpadding="4" class="lenya-table">
<tr>
<td> </td>
<td><i18n:text>Score</i18n:text></td>
<td><i18n:text>Document</i18n:text></td>
</tr>
<tr>
<td valign="top">
<jx:out value="@pos"/>
</td>
<td valign="top"><jx:out value="score/@percent"/>%</td>
<jx:choose>
<jx:when test="path">
<td>Document: <jx:out value="path"/></td>
</jx:when>
<jx:when test="uri">
<td> <strong><a href="$contextprefix/@pid/$area$uri"><jx:out
value="title"/></a></strong> <br />
<jx:out value="excerpt"/><jx:out value="no-excerpt"/></td>
</jx:when>
<jx:otherwise>
<td>Neither PATH nor URL</td>
</jx:otherwise>
</jx:choose>
</tr>
</table>
</jx:when>
<jx:otherwise>
<p><i18n:text><strong>No results </strong> found.</i18n:text></p>
</jx:otherwise>
</jx:choose>
<jx:out value="pages"/>
</div>
</div>
</page:body>
</page:page>--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
