1 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Catalog › Search history</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
7 [% INCLUDE 'datatables.inc' %]
8 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
9 <script type="text/javascript">
11 var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete selected search history entries?");
12 $(document).ready(function() {
13 // We show table ordered by descending dates by default
14 // (so that the more recent query is shown first)
15 $(".historyt").dataTable($.extend(true, {}, dataTablesDefaults, {
16 "aaSorting": [[ 1, "desc" ]],
18 { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
19 { "aTargets": [ 1 ], "sType": "title-string" },
21 "sPaginationType": "full_numbers"
26 $(".CheckNone").click(function(e){
28 var form = $(this).parents("form").get(0);
29 $(form).unCheckCheckboxes();
30 enableCheckboxActions(form);
32 $(".CheckAll").click(function(e){
34 var form = $(this).parents("form").get(0);
35 $(form).checkCheckboxes();
36 enableCheckboxActions(form);
39 $("input:checkbox").click(function(){
40 var form = $(this).parents("form").get(0);
41 enableCheckboxActions(form);
44 $(".action_delete").click(function(e){
46 var form = $(this).parents("form").get(0);
47 var ids = $(form).find("input:checkbox:checked");
48 if ( $(ids).length < 1 ) {
51 if ( confirm(MSG_CONFIRM_DELETE_HISTORY) ) {
59 function enableCheckboxActions(form){
60 // Enable/disable controls if checkboxes are checked
61 var checkedBoxes = $(form).find("input:checkbox:checked");
62 if ($(checkedBoxes).size()) {
63 $(form).find(".selections").html(_("With selected searches: "));
64 $(form).find(".selections-toolbar .links a").removeClass("disabled");
66 $(form).find(".selections").html(_("Select searches to: "));
67 $(form).find(".selections-toolbar .links a").addClass("disabled");
75 <body id="catalogue_search-history" class="catalogue">
77 [% INCLUDE 'header.inc' %]
78 [% INCLUDE 'cat-search.inc' %]
80 <div id="breadcrumbs">
81 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › Search history
84 <div id="doc3" class="yui-t2">
89 <h1>Search history</h1>
90 <div id="tabs" class="toptabs">
92 <li><a href="#biblio_tab">Catalog</a></li>
93 <li><a href="#authority_tab">Authority</a></li>
96 [% IF ( current_biblio_searches ) %]
97 <h2>Current session</h2>
98 <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
99 <div class="selections-toolbar">
100 <a class="CheckAll" href="#">Select all</a>
101 <a class="CheckNone" href="#">Clear all</a>
102 <span class="sep">|</span>
104 <span class="selections">Select searches to: </span>
105 <a href="#" class="action_delete disabled">Delete</a>
108 <input type="hidden" name="action" value="delete" />
109 <table class="historyt">
119 [% FOREACH s IN current_biblio_searches %]
121 <td><input type="checkbox" name="id" value="[% s.id %]" /></td>
122 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
123 <td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
124 <td>[% s.total %]</td>
132 [% IF ( previous_biblio_searches ) %]
133 <h2>Previous sessions</h2>
134 <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
135 <div class="selections-toolbar">
136 <a class="CheckAll" href="#">Select all</a>
137 <a class="CheckNone" href="#">Clear all</a>
138 <span class="sep">|</span>
140 <span class="selections">Select searches to: </span>
141 <a href="#" class="action_delete disabled">Delete</a>
144 <input type="hidden" name="action" value="delete" />
145 <table class="historyt">
155 [% FOREACH s IN previous_biblio_searches %]
157 <td><input type="checkbox" name="id" value="[% s.id %]" /></td>
158 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
159 <td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
160 <td>[% s.total %]</td>
168 [% IF !current_biblio_searches && !previous_biblio_searches %]
169 <p>Your catalog search history is empty.</p>
173 <div id="authority_tab">
174 [% IF ( current_authority_searches ) %]
175 <h2>Current session</h2>
176 <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
177 <div class="selections-toolbar">
178 <a class="CheckAll" href="#">Select all</a>
179 <a class="CheckNone" href="#">Clear all</a>
180 <span class="sep">|</span>
182 <span class="selections">Select searches to: </span>
183 <a href="#" class="action_delete disabled">Delete</a>
186 <input type="hidden" name="action" value="delete" />
187 <table class="historyt">
197 [% FOREACH s IN current_authority_searches %]
199 <td><input type="checkbox" name="id" value="[% s.id %]" /></td>
200 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
201 <td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
202 <td>[% s.total %]</td>
210 [% IF ( previous_authority_searches ) %]
211 <h2>Previous sessions</h2>
212 <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
213 <div class="selections-toolbar">
214 <a class="CheckAll" href="#">Select all</a>
215 <a class="CheckNone" href="#">Clear all</a>
216 <span class="sep">|</span>
218 <span class="selections">Select searches to: </span>
219 <a href="#" class="action_delete disabled">Delete</a>
222 <input type="hidden" name="action" value="delete" />
223 <table class="historyt">
233 [% FOREACH s IN previous_authority_searches %]
235 <td><input type="checkbox" name="id" value="[% s.id %]" /></td>
236 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
237 <td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
238 <td>[% s.total %]</td>
246 [% IF !current_authority_searches && !previous_authority_searches %]
247 <p>Your authority search history is empty.</p>
254 [% INCLUDE 'intranet-bottom.inc' %]