3 [% INCLUDE 'doc-head-open.inc' %]
4 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your search history
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% BLOCK cssinclude %][% END %]
8 [% INCLUDE 'bodytag.inc' bodyid='opac-search-history' bodyclass='scrollto' %]
9 [% INCLUDE 'masthead.inc' %]
12 <ul class="breadcrumb">
13 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
14 [% IF ( loggedinusername ) %]
15 <li><a href="#">Your search history</a></li>
17 <li><a href="#">Search history</a></li>
21 <div class="container-fluid">
22 <div class="row-fluid">
23 [% IF ( OpacNav||loggedinusername ) %]
26 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
33 <div id="searchhistory" class="maincontent">
34 <h1>Search history</h1>
36 [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]
37 <div id="tabs" class="toptabs">
39 <li><a href="#biblio_tab">Catalog searches</a></li>
40 <li><a href="#authority_tab">Authority searches</a></li>
44 [% IF ( current_biblio_searches ) %]
45 <h2>Current session</h2>
46 <form action="/cgi-bin/koha/opac-search-history.pl" method="get">
47 <input type="hidden" name="action" value="delete" />
48 <input type="hidden" name="previous" value="0" />
49 <input type="hidden" name="type" value="biblio" />
50 <input type="submit" class="deleteshelf" value="Delete your current catalog history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
52 <table class="historyt table table-bordered table-condensed table-striped">
61 [% FOREACH s IN current_biblio_searches %]
63 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
64 <td><a href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html |url %][% limit_cgi |html | url %]&[% s.query_cgi |html %]&count=[% countrss |html %]&sort_by=acqdate_dsc&format=rss2" class="rsssearchlink"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" class="rsssearchicon"/></a> <a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
65 <td>[% s.total %]</td>
72 [% IF ( previous_biblio_searches ) %]
73 <h2>Previous sessions</h2>
74 <form action="/cgi-bin/koha/opac-search-history.pl" method="get">
75 <input type="hidden" name="action" value="delete" />
76 <input type="hidden" name="previous" value="1" />
77 <input type="hidden" name="type" value="biblio" />
78 <input type="submit" class="deleteshelf" value="Delete your previous catalog search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
80 <table class="historyt table table-bordered table-condensed table-striped">
89 [% FOREACH s IN previous_biblio_searches %]
91 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
92 <td><a href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html |url %][% limit_cgi |html | url %]&[% s.query_cgi |html %]&count=[% countrss |html %]&sort_by=acqdate_dsc&format=rss2" class="rsssearchlink"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" class="rsssearchicon"/></a> <a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
93 <td>[% s.total %]</td>
100 [% IF !current_biblio_searches && !previous_biblio_searches %]
101 <p>Your catalog search history is empty.</p>
106 [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]
107 <div id="authority_tab">
108 [% IF ( current_authority_searches ) %]
109 <h2>Current session</h2>
110 <form action="/cgi-bin/koha/opac-search-history.pl" method="get">
111 <input type="hidden" name="action" value="delete" />
112 <input type="hidden" name="previous" value="0" />
113 <input type="hidden" name="type" value="authority" />
114 <input type="submit" class="deleteshelf" value="Delete your current authority search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
116 <table class="historyt table table-bordered table-condensed table-striped">
125 [% FOREACH s IN current_authority_searches %]
127 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
128 <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
129 <td>[% s.total %]</td>
136 [% IF ( previous_authority_searches ) %]
137 <h2>Previous sessions</h2>
138 <form action="/cgi-bin/koha/opac-search-history.pl" method="get">
139 <input type="hidden" name="action" value="delete" />
140 <input type="hidden" name="previous" value="1" />
141 <input type="hidden" name="type" value="authority" />
142 <input type="submit" class="deleteshelf" value="Delete your previous authority search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
144 <table class="historyt table table-bordered table-condensed table-striped">
153 [% FOREACH s IN previous_authority_searches %]
155 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
156 <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
157 <td>[% s.total %]</td>
164 [% IF !current_authority_searches && !previous_authority_searches %]
165 <p>Your authority search history is empty.</p>
176 [% INCLUDE 'opac-bottom.inc' %]
177 [% BLOCK jsinclude %]
178 [% INCLUDE 'datatables.inc' %]
179 <script type="text/javascript">
181 var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete your search history?");
182 $(document).ready(function() {
183 // We show table ordered by descending dates by default
184 // (so that the more recent query is shown first)
185 $(".historyt").dataTable($.extend(true, {}, dataTablesDefaults, {
186 "aaSorting": [[ 0, "desc" ]],
188 { "sType": "title-string" },
195 [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]$('#tabs').tabs();[% END %]