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