Bug 13043 - Remove incorrect link to unused DataTables columnFilter plugin on staff...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / search-history.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 [% USE Koha %]
3 [% USE KohaDates %]
4 <title>Koha &rsaquo; Catalog &rsaquo; Search history</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
7 [% INCLUDE 'datatables.inc' %]
8 <script type="text/javascript">
9 //<![CDATA[
10 var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete your search history?");
11 $(document).ready(function() {
12     // We show table ordered by descending dates by default
13     // (so that the more recent query is shown first)
14     $(".historyt").dataTable($.extend(true, {}, dataTablesDefaults, {
15         "aaSorting": [[ 0, "desc" ]],
16         "aoColumns": [
17             { "sType": "title-string" },
18             null,
19             null
20         ]
21     }));
22
23     $('#tabs').tabs();
24 });
25 //]]>
26
27 </script>
28 </head>
29 <body id="catalogue_search-history" class="catalogue">
30
31 [% INCLUDE 'header.inc' %]
32 [% INCLUDE 'cat-search.inc' %]
33
34 <div id="breadcrumbs">
35   <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo; Search history
36 </div>
37
38 <div id="doc3" class="yui-t2">
39
40 <div id="bd">
41   <div id="yui-main">
42     <div class="yui-b">
43       <h1>Search history</h1>
44       <div id="tabs" class="toptabs">
45         <ul>
46           <li><a href="#biblio_tab">Catalog</a></li>
47           <li><a href="#authority_tab">Authority</a></li>
48         </ul>
49         <div id="biblio_tab">
50           [% IF ( current_biblio_searches ) %]
51             <h2>Current session</h2>
52             <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
53               <input type="hidden" name="action" value="delete" />
54               <input type="hidden" name="previous" value="0" />
55               <input type="hidden" name="type" value="biblio" />
56               <input type="submit" class="deleteshelf" value="Delete your current catalog history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
57             </form>
58             <table class="historyt">
59               <thead>
60                 <tr>
61                   <th>Date</th>
62                   <th>Search</th>
63                   <th>Results</th>
64                 </tr>
65               </thead>
66               <tbody>
67               [% FOREACH s IN current_biblio_searches %]
68                 <tr>
69                   <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
70                   <td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
71                   <td>[% s.total %]</td>
72                 </tr>
73               [% END %]
74               </tbody>
75             </table>
76           [% END %]
77
78           [% IF ( previous_biblio_searches ) %]
79             <h2>Previous sessions</h2>
80             <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
81               <input type="hidden" name="action" value="delete" />
82               <input type="hidden" name="previous" value="1" />
83               <input type="hidden" name="type" value="biblio" />
84               <input type="submit" class="deleteshelf" value="Delete your previous catalog search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
85             </form>
86             <table class="historyt">
87               <thead>
88                 <tr>
89                   <th>Date</th>
90                   <th>Search</th>
91                   <th>Results</th>
92                 </tr>
93               </thead>
94               <tbody>
95               [% FOREACH s IN previous_biblio_searches %]
96                 <tr>
97                   <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
98                   <td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
99                   <td>[% s.total %]</td>
100                 </tr>
101               [% END %]
102               </tbody>
103             </table>
104           [% END %]
105
106           [% IF !current_biblio_searches && !previous_biblio_searches %]
107             <p>Your catalog search history is empty.</p>
108           [% END %]
109         </div>
110
111         <div id="authority_tab">
112           [% IF ( current_authority_searches ) %]
113             <h2>Current session</h2>
114             <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
115               <input type="hidden" name="action" value="delete" />
116               <input type="hidden" name="previous" value="0" />
117               <input type="hidden" name="type" value="authority" />
118               <input type="submit" class="deleteshelf" value="Delete your current authority search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
119             </form>
120             <table class="historyt">
121               <thead>
122                 <tr>
123                   <th>Date</th>
124                   <th>Search</th>
125                   <th>Results</th>
126                 </tr>
127               </thead>
128               <tbody>
129               [% FOREACH s IN current_authority_searches %]
130                 <tr>
131                   <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
132                   <td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
133                   <td>[% s.total %]</td>
134                 </tr>
135               [% END %]
136               </tbody>
137             </table>
138           [% END %]
139
140           [% IF ( previous_authority_searches ) %]
141             <h2>Previous sessions</h2>
142             <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
143               <input type="hidden" name="action" value="delete" />
144               <input type="hidden" name="previous" value="1" />
145               <input type="hidden" name="type" value="authority" />
146               <input type="submit" class="deleteshelf" value="Delete your previous authority search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
147             </form>
148             <table class="historyt">
149               <thead>
150                 <tr>
151                   <th>Date</th>
152                   <th>Search</th>
153                   <th>Results</th>
154                 </tr>
155               </thead>
156               <tbody>
157               [% FOREACH s IN previous_authority_searches %]
158                 <tr>
159                   <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
160                   <td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
161                   <td>[% s.total %]</td>
162                 </tr>
163               [% END %]
164               </tbody>
165             </table>
166           [% END %]
167
168           [% IF !current_authority_searches && !previous_authority_searches %]
169             <p>Your authority search history is empty.</p>
170           [% END %]
171         </div>
172       </div>
173     </div>
174   </div>
175 </div>
176 [% INCLUDE 'intranet-bottom.inc' %]