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 <body id="opac-search-history" class="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">
62 [% FOREACH s IN current_biblio_searches %]
64 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
65 <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></td>
66 <td><a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
67 <td>[% s.total %]</td>
74 [% IF ( previous_biblio_searches ) %]
75 <h2>Previous sessions</h2>
76 <form action="/cgi-bin/koha/opac-search-history.pl" method="get">
77 <input type="hidden" name="action" value="delete" />
78 <input type="hidden" name="previous" value="1" />
79 <input type="hidden" name="type" value="biblio" />
80 <input type="submit" class="deleteshelf" value="Delete your previous catalog search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
82 <table class="historyt table table-bordered table-condensed table-striped">
92 [% FOREACH s IN previous_biblio_searches %]
94 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
95 <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></td>
96 <td><a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
97 <td>[% s.total %]</td>
104 [% IF !current_biblio_searches && !previous_biblio_searches %]
105 <p>Your catalog search history is empty.</p>
110 [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]
111 <div id="authority_tab">
112 [% IF ( current_authority_searches ) %]
113 <h2>Current session</h2>
114 <form action="/cgi-bin/koha/opac-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);" />
120 <table class="historyt table table-bordered table-condensed table-striped">
129 [% FOREACH s IN current_authority_searches %]
131 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
132 <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
133 <td>[% s.total %]</td>
140 [% IF ( previous_authority_searches ) %]
141 <h2>Previous sessions</h2>
142 <form action="/cgi-bin/koha/opac-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);" />
148 <table class="historyt table table-bordered table-condensed table-striped">
157 [% FOREACH s IN previous_authority_searches %]
159 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
160 <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
161 <td>[% s.total %]</td>
168 [% IF !current_authority_searches && !previous_authority_searches %]
169 <p>Your authority search history is empty.</p>
180 [% INCLUDE 'opac-bottom.inc' %]
181 [% BLOCK jsinclude %]
182 [% INCLUDE 'datatables.inc' %]
183 <script type="text/javascript">
185 var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete your search history?");
186 $(document).ready(function() {
187 // We show table ordered by descending dates by default
188 // (so that the more recent query is shown first)
189 $(".historyt").dataTable($.extend(true, {}, dataTablesDefaults, {
190 "aaSorting": [[ 0, "desc" ]],
192 { "sType": "title-string" },
199 [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]$('#tabs').tabs();[% END %]