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 [% BLOCK cssinclude %][% END %]
8 <body id="opac-search-history" class="scrollto">
9 [% INCLUDE 'masthead.inc' %]
12 <ul class="breadcrumb">
13 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
14 [% IF ( loggedinusername ) %]
15 <li><a href="#">Your search history</a></li>
17 <li><a href="#">Search history</a></li>
21 <div class="container-fluid">
22 <div class="row-fluid">
23 [% IF ( OpacNav||loggedinusername ) %]
26 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
34 <div id="searchhistory" class="maincontent">
35 <h1>Search history</h1>
36 [% IF ( recentSearches ) %]<form action="/cgi-bin/koha/opac-search-history.pl" method="get"><input type="hidden" name="action" value="delete" /><input type="submit" class="btn btn-danger" 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="btn btn-danger" value="Delete your search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" /></form>[% END %][% END %]
38 [% IF ( recentSearches ) %]
39 <table class="historyt table table-bordered table-condensed table-striped">
40 [% IF ( previousSearches ) %]
41 <caption>Current session</caption>
44 <tr><th>Date</th><th>Search</th><th>Results</th></tr>
47 [% FOREACH recentSearche IN recentSearches %]
49 <td><span title="[% recentSearche.time %]">[% recentSearche.time |$KohaDates with_hours => 1 %]</span></td>
50 <td><a href="/cgi-bin/koha/opac-search.pl?[% recentSearche.query_cgi |html %]">[% recentSearche.query_desc |html %]</a></td>
51 <td>[% recentSearche.total %]</td>
58 [% IF ( previousSearches ) %]
59 <table class="historyt table table-bordered table-condensed table-striped">
60 <caption>Previous sessions</caption>
62 <tr><th>Date</th><th>Search</th><th>Results</th></tr>
65 [% FOREACH previousSearche IN previousSearches %]
67 <td><span title="[% previousSearche.time %]">[% previousSearche.time |$KohaDates with_hours => 1 %]</span></td>
68 <td><a href="/cgi-bin/koha/opac-search.pl?[% previousSearche.query_cgi |html %]">[% previousSearche.query_desc |html %]</a></td>
69 <td>[% previousSearche.total %]</td>
76 [% UNLESS ( recentSearches ) %]
77 [% UNLESS ( previousSearches ) %]
78 <p>Your search history is empty.</p>
87 [% INCLUDE 'opac-bottom.inc' %]
89 [% INCLUDE 'datatables.inc' %]
90 <script type="text/javascript">
92 var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete your search history?");
93 $(document).ready(function() {
94 // We show table ordered by descending dates by default
95 // (so that the more recent query is shown first)
96 $(".historyt").dataTable($.extend(true, {}, dataTablesDefaults, {
97 "aaSorting": [[ 0, "desc" ]],
99 { "sType": "title-string" },