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="[% themelang %]/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" },
25 $(".CheckNone").click(function(e){
27 var form = $(this).parents("form").get(0);
28 $(form).unCheckCheckboxes();
29 enableCheckboxActions(form);
31 $(".CheckAll").click(function(e){
33 var form = $(this).parents("form").get(0);
34 $(form).checkCheckboxes();
35 enableCheckboxActions(form);
38 $("input:checkbox").click(function(){
39 var form = $(this).parents("form").get(0);
40 enableCheckboxActions(form);
43 $(".action_delete").click(function(e){
45 var form = $(this).parents("form").get(0);
46 var ids = $(form).find("input:checkbox:checked");
47 if ( $(ids).length < 1 ) {
50 if ( confirm(MSG_CONFIRM_DELETE_HISTORY) ) {
58 function enableCheckboxActions(form){
59 // Enable/disable controls if checkboxes are checked
60 var checkedBoxes = $(form).find("input:checkbox:checked");
61 if ($(checkedBoxes).size()) {
62 $(form).find(".selections").html(_("With selected searches: "));
63 $(form).find(".selections-toolbar .links a").removeClass("disabled");
65 $(form).find(".selections").html(_("Select searches to: "));
66 $(form).find(".selections-toolbar .links a").addClass("disabled");
74 <body id="catalogue_search-history" class="catalogue">
76 [% INCLUDE 'header.inc' %]
77 [% INCLUDE 'cat-search.inc' %]
79 <div id="breadcrumbs">
80 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › Search history
83 <div id="doc3" class="yui-t2">
88 <h1>Search history</h1>
89 <div id="tabs" class="toptabs">
91 <li><a href="#biblio_tab">Catalog</a></li>
92 <li><a href="#authority_tab">Authority</a></li>
95 [% IF ( current_biblio_searches ) %]
96 <h2>Current session</h2>
97 <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
98 <div class="selections-toolbar">
99 <a class="CheckAll" href="#">Select all</a>
100 <a class="CheckNone" href="#">Clear all</a>
101 <span class="sep">|</span>
103 <span class="selections">Select searches to: </span>
104 <a href="#" class="action_delete disabled">Delete</a>
107 <input type="hidden" name="action" value="delete" />
108 <table class="historyt">
118 [% FOREACH s IN current_biblio_searches %]
120 <td><input type="checkbox" name="id" value="[% s.id %]" /></td>
121 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
122 <td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
123 <td>[% s.total %]</td>
131 [% IF ( previous_biblio_searches ) %]
132 <h2>Previous sessions</h2>
133 <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
134 <div class="selections-toolbar">
135 <a class="CheckAll" href="#">Select all</a>
136 <a class="CheckNone" href="#">Clear all</a>
137 <span class="sep">|</span>
139 <span class="selections">Select searches to: </span>
140 <a href="#" class="action_delete disabled">Delete</a>
143 <input type="hidden" name="action" value="delete" />
144 <table class="historyt">
154 [% FOREACH s IN previous_biblio_searches %]
156 <td><input type="checkbox" name="id" value="[% s.id %]" /></td>
157 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
158 <td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
159 <td>[% s.total %]</td>
167 [% IF !current_biblio_searches && !previous_biblio_searches %]
168 <p>Your catalog search history is empty.</p>
172 <div id="authority_tab">
173 [% IF ( current_authority_searches ) %]
174 <h2>Current session</h2>
175 <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
176 <div class="selections-toolbar">
177 <a class="CheckAll" href="#">Select all</a>
178 <a class="CheckNone" href="#">Clear all</a>
179 <span class="sep">|</span>
181 <span class="selections">Select searches to: </span>
182 <a href="#" class="action_delete disabled">Delete</a>
185 <input type="hidden" name="action" value="delete" />
186 <table class="historyt">
196 [% FOREACH s IN current_authority_searches %]
198 <td><input type="checkbox" name="id" value="[% s.id %]" /></td>
199 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
200 <td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
201 <td>[% s.total %]</td>
209 [% IF ( previous_authority_searches ) %]
210 <h2>Previous sessions</h2>
211 <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get">
212 <div class="selections-toolbar">
213 <a class="CheckAll" href="#">Select all</a>
214 <a class="CheckNone" href="#">Clear all</a>
215 <span class="sep">|</span>
217 <span class="selections">Select searches to: </span>
218 <a href="#" class="action_delete disabled">Delete</a>
221 <input type="hidden" name="action" value="delete" />
222 <table class="historyt">
232 [% FOREACH s IN previous_authority_searches %]
234 <td><input type="checkbox" name="id" value="[% s.id %]" /></td>
235 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
236 <td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
237 <td>[% s.total %]</td>
245 [% IF !current_authority_searches && !previous_authority_searches %]
246 <p>Your authority search history is empty.</p>
253 [% INCLUDE 'intranet-bottom.inc' %]