Koha/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tmpl
Garry Collum fad17c9da3 Bug 3652: Fixes XSS vulnerabilities and XTHML errors in opac-search-history.tmpl
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-16 06:42:44 -05:00

97 lines
3.8 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
$(document).ready(function() {
// We show table ordered by descending dates by default
// (so that the more recent query is shown first)
$.tablesorter.defaults.sortList = [[0,1]];
$(".historyt").tablesorter({
widgets : ['zebra'],<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk'<!-- /TMPL_IF -->
});
});
//]]>
</script>
</head>
<body id="opac-search-history">
<!-- TMPL_IF NAME="OpacNav" -->
<div id="doc3" class="yui-t1">
<!-- TMPL_ELSIF NAME="loggedinusername" -->
<div id="doc3" class="yui-t1">
<!-- TMPL_ELSE -->
<div id="doc3" class="yui-t7">
<!-- /TMPL_IF -->
<div id="bd">
<!--TMPL_INCLUDE NAME="masthead.inc" -->
<div id="yui-main">
<div class="yui-b"><div class="yui-g">
<div id="searchhistory" class="container">
<h1>Search history</h1>
<!-- TMPL_IF NAME="recentSearches" --><form action="/cgi-bin/koha/opac-search-history.pl" method="get"><input type="hidden" name="action" value="delete" /><input type="submit" class="deleteshelf" value="Delete your search history" onclick="return confirm(_('Are you sure you want to delete your search history?'));" /></form><!-- TMPL_ELSE --><!-- TMPL_IF NAME="previousSearches" --><form action="/cgi-bin/koha/opac-search-history.pl" method="get"><input type="hidden" name="action" value="delete" /><input type="submit" class="deleteshelf" value="Delete your search history" onclick="return confirm(_('Are you sure you want to delete your search history?'));" /></form><!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="recentSearches" -->
<table class="historyt">
<!-- TMPL_IF NAME="previousSearches" -->
<caption>Current session</caption>
<!-- /TMPL_IF -->
<thead>
<tr><th>Date</th><th>Search</th><th>Results</th></tr>
</thead>
<tbody>
<!-- TMPL_LOOP NAME="recentSearches" -->
<tr>
<td><!-- TMPL_VAR NAME="time" --></td>
<td><a href="/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR NAME="query_cgi" ESCAPE="html" -->"><!-- TMPL_VAR NAME="query_desc" ESCAPE="html" --></a></td>
<td><!-- TMPL_VAR NAME="total" --></td>
</tr>
<!-- /TMPL_LOOP -->
</tbody>
</table>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="previousSearches" -->
<table class="historyt">
<caption>Previous sessions</caption>
<thead>
<tr><th>Date</th><th>Search</th><th>Results</th></tr>
</thead>
<tbody>
<!-- TMPL_LOOP NAME="previousSearches" -->
<tr>
<td><!-- TMPL_VAR NAME="time" --></td>
<td><a href="/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR NAME="query_cgi" ESCAPE="html" -->"><!-- TMPL_VAR NAME="query_desc" ESCAPE="html" --></a></td>
<td><!-- TMPL_VAR NAME="total" --></td>
</tr>
<!-- /TMPL_LOOP -->
</tbody>
</table>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="recentSearches" --><!-- TMPL_ELSE --><!-- TMPL_IF NAME="previousSearches" --><!-- TMPL_ELSE --><p>Your search history is empty.</p><!-- /TMPL_IF --><!-- /TMPL_IF -->
</div>
</div>
</div>
</div>
<!-- TMPL_IF NAME="OpacNav" -->
<div class="yui-b"><div class="container">
<!--TMPL_INCLUDE NAME="navigation.inc" -->
<!--TMPL_INCLUDE NAME="usermenu.inc" -->
</div></div>
<!-- TMPL_ELSIF NAME="loggedinusername" -->
<div class="yui-b"><div class="container">
<!--TMPL_INCLUDE NAME="navigation.inc" -->
<!--TMPL_INCLUDE NAME="usermenu.inc" -->
</div></div>
<!-- TMPL_ELSE -->
<!-- /TMPL_IF -->
</div>
<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->