Bug 6825 OpacNav menu hide user menu on opac-user.pl page
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-search-history.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
5 <script type="text/JavaScript" language="JavaScript">
6 //<![CDATA[
7         var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete your search history?");
8          $(document).ready(function() {
9                 // We show table ordered by descending dates by default
10                 // (so that the more recent query is shown first)
11                 $.tablesorter.defaults.sortList = [[0,1]];
12                 $(".historyt").tablesorter({
13                                                 widgets : ['zebra'],[% IF ( dateformat == 'metric' ) %]
14                         dateFormat: 'uk'[% END %]
15                 });
16             });
17 //]]>
18
19 </script>
20 </head>
21 <body id="opac-search-history">
22 [% IF ( OpacNav ) %]
23 <div id="doc3" class="yui-t1">
24 [% ELSIF ( loggedinusername ) %]
25 <div id="doc3" class="yui-t1">
26 [% ELSE %]
27 <div id="doc3" class="yui-t7">
28 [% END %]
29    <div id="bd">
30 [% INCLUDE 'masthead.inc' %]
31
32         <div id="yui-main">
33 <div class="yui-b"><div class="yui-g">
34         <div id="searchhistory" class="container">
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="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 %]
37
38             [% IF ( recentSearches ) %]
39             <table class="historyt">
40             [% IF ( previousSearches ) %]
41             <caption>Current session</caption>
42             [% END %]
43                 <thead>
44                     <tr><th>Date</th><th>Search</th><th>Results</th></tr>
45                 </thead>
46                 <tbody>
47                     [% FOREACH recentSearche IN recentSearches %]
48                     <tr>
49                         <td>[% recentSearche.time %]</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>
52                     </tr>
53                     [% END %]
54                 </tbody>
55             </table>
56             [% END %]
57
58             [% IF ( previousSearches ) %]
59             <table class="historyt">
60             <caption>Previous sessions</caption>
61                 <thead>
62                     <tr><th>Date</th><th>Search</th><th>Results</th></tr>
63                 </thead>
64                 <tbody>
65                     [% FOREACH previousSearche IN previousSearches %]
66                     <tr>
67                         <td>[% previousSearche.time %]</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>
70                     </tr>
71                     [% END %]
72                 </tbody>
73             </table>
74             [% END %]
75
76 [% IF ( recentSearches ) %][% ELSE %][% IF ( previousSearches ) %][% ELSE %]<p>Your search history is empty.</p>[% END %][% END %]
77
78      </div>
79      </div>
80      </div>
81      </div>
82
83 [% IF ( OpacNav ) %]
84 <div class="yui-b"><div id="leftmenus" class="container">
85 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
86 </div></div>
87 [% ELSIF ( loggedinusername ) %]
88 <div class="yui-b"><div id="leftmenus" class="container">
89 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
90 </div></div>
91 [% ELSE %]
92 [% END %]
93
94
95 </div>
96 [% INCLUDE 'opac-bottom.inc' %]