3 [% INCLUDE 'doc-head-open.inc' %]
4 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your search history
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'datatables.inc' %]
7 <script type="text/javascript">
9 var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete your search history?");
10 $(document).ready(function() {
11 // We show table ordered by descending dates by default
12 // (so that the more recent query is shown first)
13 $(".historyt").dataTable($.extend(true, {}, dataTablesDefaults, {
14 "aaSorting": [[ 0, "desc" ]],
16 { "sType": "title-string" },
26 <body id="opac-search-history">
28 <div id="doc3" class="yui-t1">
29 [% ELSIF ( loggedinusername ) %]
30 <div id="doc3" class="yui-t1">
32 <div id="doc3" class="yui-t7">
35 [% INCLUDE 'masthead.inc' %]
38 <div class="yui-b"><div class="yui-g">
39 <div id="searchhistory" class="container">
40 <h1>Search history</h1>
41 [% 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 %]
43 [% IF ( recentSearches ) %]
44 <table class="historyt">
45 [% IF ( previousSearches ) %]
46 <caption>Current session</caption>
49 <tr><th>Date</th><th>Search</th><th>Results</th></tr>
52 [% FOREACH recentSearche IN recentSearches %]
54 <td><span title="[% recentSearche.time %]">[% recentSearche.time |$KohaDates with_hours => 1 %]</span></td>
55 <td><a href="/cgi-bin/koha/opac-search.pl?[% recentSearche.query_cgi |html %]">[% recentSearche.query_desc |html %]</a></td>
56 <td>[% recentSearche.total %]</td>
63 [% IF ( previousSearches ) %]
64 <table class="historyt">
65 <caption>Previous sessions</caption>
67 <tr><th>Date</th><th>Search</th><th>Results</th></tr>
70 [% FOREACH previousSearche IN previousSearches %]
72 <td><span title="[% previousSearche.time %]">[% previousSearche.time |$KohaDates with_hours => 1 %]</span></td>
73 <td><a href="/cgi-bin/koha/opac-search.pl?[% previousSearche.query_cgi |html %]">[% previousSearche.query_desc |html %]</a></td>
74 <td>[% previousSearche.total %]</td>
81 [% IF ( recentSearches ) %][% ELSE %][% IF ( previousSearches ) %][% ELSE %]<p>Your search history is empty.</p>[% END %][% END %]
89 <div class="yui-b"><div id="leftmenus" class="container">
90 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
92 [% ELSIF ( loggedinusername ) %]
93 <div class="yui-b"><div id="leftmenus" class="container">
94 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
101 [% INCLUDE 'opac-bottom.inc' %]