-<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You 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: history.xml 30942 2004-07-29 20:16:54Z vgritsenko $ 
-->
-<page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
<h4 class="samplesGroup">Query Bean - Favourites</h4>
-<title>
<i18n:text i18n:catalogue="local">favourites.page.title</i18n:text>
</title>
-<content>
-<p class="links">
-<a href="simple.html" title="local:new.simple.hint" i18n:attr="title">
<i18n:text i18n:catalogue="local">new.simple.label</i18n:text>
</a>
<span> | </span>
-<a href="advanced.html" title="local:new.advanced.hint" i18n:attr="title">
<i18n:text i18n:catalogue="local">new.advanced.label</i18n:text>
</a>
<span> | </span>
-<a href="history.html" title="local:search.history.hint" i18n:attr="title">
<i18n:text i18n:catalogue="local">search.history.title</i18n:text>
</a>
<span> | </span>
-<a href="welcome" title="local:link.home.hint" i18n:attr="title">
<i18n:text i18n:catalogue="local">link.home.label</i18n:text>
</a>
</p>
-<jx:choose>
-<jx:when test="${queries!=null}">
-<p class="favourites-title">
<i18n:text i18n:catalogue="local">favourites.queries.title</i18n:text>
:
-<span class="favourites-count">
<jx:out value="${queries.size()}"/>
</span>
</p>
-<table width="100%" class="query-favourites" summary="Query Favourites">
-<tr>
-<th align="left">
<i18n:text i18n:catalogue="local">favourites.date.label</i18n:text>
</th>
-<th align="left">
<i18n:text i18n:catalogue="local">favourites.title.label</i18n:text>
</th>
-<th align="left">
<i18n:text i18n:catalogue="local">favourites.query.label</i18n:text>
</th>
</tr>
-<jx:forEach var="item" items="${queries}">
-<tr valign="top">
-<td class="favourites-date">
<jx:formatDate value="${item.date}" type="date" dateStyle="short"/>
</td>
-<td class="favourites-name">
<a href="${item.type}.html?fid=${item.id}" title="local:favourites.search.hint" i18n:attr="title">${item.name}</a>
</td>
-<td class="query-description">
<i18n:text i18n:catalogue="local">search.subject.title</i18n:text>
-<span class="query-bool" title="local:query.bool.hint" i18n:attr="title">
<i18n:text i18n:catalogue="local">search.${item.bool}.bool</i18n:text>
</span>
-<span class="query-criteria">
-<jx:choose>
-<jx:when test="${item.criteria.size() == 1}">
<i18n:text i18n:catalogue="local">search.criterion.label</i18n:text>
:
</jx:when>
-<jx:otherwise>
<i18n:text i18n:catalogue="local">search.criteria.label</i18n:text>
:
</jx:otherwise>
</jx:choose>
-<ul>
-<jx:forEach var="crit" items="${item.criteria}">
-<li>
-<span class="query-criterion-field" title="local:criterion.field.hint" i18n:attr="title">
<i18n:text i18n:catalogue="local">search.${crit.field}.field</i18n:text>
</span>
-<span class="query-criterion-match" title="local:criterion.match.hint" i18n:attr="title">
<i18n:text i18n:catalogue="local">search.${crit.match}.match</i18n:text>
</span>
<span class="query-criterion-value" title="local:criterion.value.hint" i18n:attr="title">“${crit.term}”</span>
</li>
</jx:forEach>
</ul>
</span>
</td>
-<td>
-<a href="remove-favourite.html?fid=${item.id}" title="local:favourites.delete.hint" i18n:attr="title">
<i18n:text i18n:catalogue="local">favourites.delete.label</i18n:text>
</a>
</td>
</tr>
</jx:forEach>
</table>
</jx:when>
-<jx:otherwise>
<i18n:text i18n:catalogue="local">favourites.none</i18n:text>
</jx:otherwise>
</jx:choose>
</content>
</page>