Koha/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tt
Owen Leonard 47609920b7 Bug 9265 - Switch to HTML5 doctype in OPAC and staff client
This patch replaces the XHTML DOCTYPE with an HTML5 one. The HTML5
validator seems to be significantly different than the XHTML one,
so I'm seeing lots of new errors. This patch includes corrections
for one: Deprecation of the "language" attribute of <script>
tags.

To test, view pages in the OPAC and staff client. They should
appear as normal. Numerous validation follow-ups will be required,
but I suggest these be handled incrementally.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
test on some intranet pages and I found no regression. (chromium and
firefox).
The w3c page about the doctype: http://www.w3.org/TR/html5-diff/#doctype

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-31 11:47:04 -05:00

96 lines
3.4 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your search history
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
//<![CDATA[
var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete your search history?");
$(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'],[% IF ( dateformat == 'metric' ) %]
dateFormat: 'uk'[% END %]
});
});
//]]>
</script>
</head>
<body id="opac-search-history">
[% IF ( OpacNav ) %]
<div id="doc3" class="yui-t1">
[% ELSIF ( loggedinusername ) %]
<div id="doc3" class="yui-t1">
[% ELSE %]
<div id="doc3" class="yui-t7">
[% END %]
<div id="bd">
[% INCLUDE 'masthead.inc' %]
<div id="yui-main">
<div class="yui-b"><div class="yui-g">
<div id="searchhistory" class="container">
<h1>Search history</h1>
[% IF ( 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(MSG_CONFIRM_DELETE_HISTORY);" /></form>[% ELSE %][% IF ( 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(MSG_CONFIRM_DELETE_HISTORY);" /></form>[% END %][% END %]
[% IF ( recentSearches ) %]
<table class="historyt">
[% IF ( previousSearches ) %]
<caption>Current session</caption>
[% END %]
<thead>
<tr><th>Date</th><th>Search</th><th>Results</th></tr>
</thead>
<tbody>
[% FOREACH recentSearche IN recentSearches %]
<tr>
<td>[% recentSearche.time %]</td>
<td><a href="/cgi-bin/koha/opac-search.pl?[% recentSearche.query_cgi |html %]">[% recentSearche.query_desc |html %]</a></td>
<td>[% recentSearche.total %]</td>
</tr>
[% END %]
</tbody>
</table>
[% END %]
[% IF ( previousSearches ) %]
<table class="historyt">
<caption>Previous sessions</caption>
<thead>
<tr><th>Date</th><th>Search</th><th>Results</th></tr>
</thead>
<tbody>
[% FOREACH previousSearche IN previousSearches %]
<tr>
<td>[% previousSearche.time %]</td>
<td><a href="/cgi-bin/koha/opac-search.pl?[% previousSearche.query_cgi |html %]">[% previousSearche.query_desc |html %]</a></td>
<td>[% previousSearche.total %]</td>
</tr>
[% END %]
</tbody>
</table>
[% END %]
[% IF ( recentSearches ) %][% ELSE %][% IF ( previousSearches ) %][% ELSE %]<p>Your search history is empty.</p>[% END %][% END %]
</div>
</div>
</div>
</div>
[% IF ( OpacNav ) %]
<div class="yui-b"><div id="leftmenus" class="container">
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
</div></div>
[% ELSIF ( loggedinusername ) %]
<div class="yui-b"><div id="leftmenus" class="container">
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
</div></div>
[% ELSE %]
[% END %]
</div>
[% INCLUDE 'opac-bottom.inc' %]