Kyle M Hall
a8942c2884
Revert "DBRev to make notes of the XSS patches and the new important dependency." This reverts commite140603a59
. Revert "Bug 13618: Specific for branches.opac_info" This reverts commit06e4a50f00
. Revert "Bug 13618: (follow-up) Specific for other prefs" This reverts commitd6475a111f
. Revert "Bug 13618: Fix for debarredcomment and patron messages" This reverts commitdd98c9df92
. Revert "Bug 13618: Do not display html tags in patron's notices" This reverts commita065b243fe
. Revert "Bug 13618: Do not display and html tags in item fields content" This reverts commitbaeeaffbf8
. Revert "Bug 13618: Fix for system preference description" This reverts commita967a09261
. Revert "Bug 13618: Remove html filters for newly pushed code" This reverts commit0e98662b10
. Revert "Bug 13618: (follow-up) add missing lines for opac-shelves" This reverts commitfc2fb605e5
. Revert "Bug 13618: (follow-up) Specific for ColumnsSettings" This reverts commitbc308fdd9c
. Revert "Bug 13618: Fix for edit biblios and items" This reverts commit811c4e8402
. Revert "Bug 13618: followup to remove tabs" This reverts commitca8e8c397c
. Revert "Bug 13618: Fix last occurrences recently introduced to master" This reverts commitbb417b256b
. Revert "Bug 13618: Fix for news" This reverts commitae5b98020a
. Revert "Bug 13618: Fix escape on sending baskets or shelves by email" This reverts commita7731ffe25
. Revert "Bug 13618: Specific for XSLTBloc" This reverts commit11fa38dc29
. Revert "Bug 13618: Specific for Salutation on editing a patron" This reverts commit36c07ad6d3
. Revert "Bug 13618: Specific for other prefs" This reverts commite6ea281a3b
. Revert "Bug 13618 - memberentrygen.tt errors Not a GLOB reference" This reverts commit7824874557
. Revert "Bug 13618: Specific for ColumnsSettings" This reverts commit1834da3da3
. Revert "Bug 13618: Specific for IntranetUser* and OPACUser* prefs" This reverts commit21ae62b253
. Revert "Bug 13618: Fix error 'Not a GLOB reference'" This reverts commit602bdbab4c
. Revert "Bug 13618: Specific for the ISBD view" This reverts commitd254362435
. Revert "Bug 13618: Specific for pagination_bar" This reverts commit8837a8ae68
. Revert "Bug 13618: Specific places where we don't need to escape variables - intra" This reverts commit00eff140b3
. Revert "Bug 13618: Remove html filters at the intranet" This reverts commit7db851ff03
. Revert "Bug 13618: Specific places where we don't need to escape variables" This reverts commit49a3738b8d
. Revert "Bug 13618: Remove html filters at the OPAC" This reverts commitcedaa0e23e
. Revert "Bug 13618: Use Template::Stash::AutoEscaping to use the html filter" This reverts commit01b38d3b13
. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
282 lines
17 KiB
Text
282 lines
17 KiB
Text
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your search history</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %][% END %]
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='opac-search-history' bodyclass='scrollto' %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div class="main">
|
|
<ul class="breadcrumb">
|
|
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
|
|
[% IF ( loggedinusername ) %]
|
|
<li><a href="#">Your search history</a></li>
|
|
[% ELSE %]
|
|
<li><a href="#">Search history</a></li>
|
|
[% END %]
|
|
</ul>
|
|
|
|
<div class="container-fluid">
|
|
<div class="row-fluid">
|
|
[% IF ( OpacNav||loggedinusername ) %]
|
|
<div class="span2">
|
|
<div id="navigation">
|
|
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
|
|
</div>
|
|
</div>
|
|
<div class="span10">
|
|
[% ELSE %]
|
|
<div class="span12">
|
|
[% END %]
|
|
<div id="searchhistory" class="maincontent">
|
|
<h1>Search history</h1>
|
|
[% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]
|
|
<div id="tabs" class="toptabs">
|
|
<ul>
|
|
<li><a href="#biblio_tab">Catalog</a></li>
|
|
<li><a href="#authority_tab">Authority</a></li>
|
|
</ul>
|
|
[% END %]
|
|
<div id="biblio_tab">
|
|
<div id="current_biblio">
|
|
[% IF ( current_biblio_searches ) %]
|
|
<h2>Current session</h2>
|
|
<form action="/cgi-bin/koha/opac-search-history.pl" method="get">
|
|
<div class="selections-toolbar toolbar">
|
|
<a class="CheckAll" href="#">Select all</a>
|
|
<a class="CheckNone" href="#">Clear all</a>
|
|
<span class="sep">|</span>
|
|
<span class="links">
|
|
<span class="selections">Select searches to: </span>
|
|
<a href="#" class="removeitems disabled">Delete</a>
|
|
</span>
|
|
</div>
|
|
<input type="hidden" name="action" value="delete" />
|
|
<table class="historyt table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Date</th>
|
|
<th>Search</th>
|
|
<th>Results</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH s IN current_biblio_searches %]
|
|
<tr>
|
|
<td><input type="checkbox" name="id" value="[% s.id %]" /></td>
|
|
<td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
|
|
<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>
|
|
<td>[% s.total %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
<input type="submit" class="btn btn-danger remove-selected" value="Remove selected searches">
|
|
</form>
|
|
[% END # IF ( current_biblio_searches ) %]
|
|
</div> <!-- / #current_biblio -->
|
|
|
|
<div id="previous_biblio">
|
|
[% IF ( previous_biblio_searches ) %]
|
|
<h2>Previous sessions</h2>
|
|
<form action="/cgi-bin/koha/opac-search-history.pl" method="get">
|
|
<div class="selections-toolbar toolbar">
|
|
<a class="CheckAll" href="#">Select all</a>
|
|
<a class="CheckNone" href="#">Clear all</a>
|
|
<span class="sep">|</span>
|
|
<span class="links">
|
|
<span class="selections">Select searches to: </span>
|
|
<a href="#" class="removeitems disabled">Delete</a>
|
|
</span>
|
|
</div>
|
|
|
|
<input type="hidden" name="action" value="delete" />
|
|
<table class="historyt table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Date</th>
|
|
<th>Search</th>
|
|
<th>Results</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH s IN previous_biblio_searches %]
|
|
<tr>
|
|
<td><input type="checkbox" name="id" value="[% s.id %]" /></td>
|
|
<td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
|
|
<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>
|
|
<td>[% s.total %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
<input type="submit" class="btn btn-danger remove-selected" value="Remove selected searches">
|
|
</form>
|
|
[% END # IF ( previous_biblio_searches ) %]
|
|
</div> <!-- / #previous_biblio -->
|
|
|
|
[% IF !current_biblio_searches && !previous_biblio_searches %]
|
|
<p>Your catalog search history is empty.</p>
|
|
[% END %]
|
|
</div> <!-- / #biblio_tab -->
|
|
|
|
[% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]
|
|
<div id="authority_tab">
|
|
[% IF ( current_authority_searches ) %]
|
|
<h2>Current session</h2>
|
|
<form action="/cgi-bin/koha/opac-search-history.pl" method="get">
|
|
<div class="selections-toolbar toolbar">
|
|
<a class="CheckAll" href="#">Select all</a>
|
|
<a class="CheckNone" href="#">Clear all</a>
|
|
<span class="sep">|</span>
|
|
<span class="links">
|
|
<span class="selections">Select searches to: </span>
|
|
<a href="#" class="removeitems disabled">Delete</a>
|
|
</span>
|
|
</div>
|
|
<input type="hidden" name="action" value="delete" />
|
|
<table class="historyt table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Date</th>
|
|
<th>Search</th>
|
|
<th>Results</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH s IN current_authority_searches %]
|
|
<tr>
|
|
<td><input type="checkbox" name="id" value="[% s.id %]" /></td>
|
|
<td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
|
|
<td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
|
|
<td>[% s.total %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
<input type="submit" class="btn btn-danger remove-selected" value="Remove selected searches">
|
|
</form>
|
|
[% END # / IF ( current_authority_searches ) %]
|
|
|
|
[% IF ( previous_authority_searches ) %]
|
|
<h2>Previous sessions</h2>
|
|
<form action="/cgi-bin/koha/opac-search-history.pl" method="get">
|
|
<div class="selections-toolbar toolbar">
|
|
<a class="CheckAll" href="#">Select all</a>
|
|
<a class="CheckNone" href="#">Clear all</a>
|
|
<span class="sep">|</span>
|
|
<span class="links">
|
|
<span class="selections">Select searches to: </span>
|
|
<a href="#" class="removeitems disabled">Delete</a>
|
|
</span>
|
|
</div>
|
|
<input type="hidden" name="action" value="delete" />
|
|
<table class="historyt table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Date</th>
|
|
<th>Search</th>
|
|
<th>Results</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH s IN previous_authority_searches %]
|
|
<tr>
|
|
<td><input type="checkbox" name="id" value="[% s.id %]" /></td>
|
|
<td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
|
|
<td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
|
|
<td>[% s.total %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
<input type="submit" class="btn btn-danger remove-selected" value="Remove selected searches">
|
|
</form>
|
|
[% END # / IF ( previous_authority_searches )%]
|
|
|
|
[% IF !current_authority_searches && !previous_authority_searches %]
|
|
<p>Your authority search history is empty.</p>
|
|
[% END %]
|
|
</div> <!-- / #authority_tab -->
|
|
[% END # / IF Koha.Preference( 'OpacAuthorities' ) %]
|
|
</div> <!-- / #tabs -->
|
|
</div> <!-- / #searchhistory -->
|
|
</div> <!-- / .span10/12 -->
|
|
</div> <!-- / .row-fluid -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / #main -->
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete selected search history entries?");
|
|
$(document).ready(function() {
|
|
// We show table ordered by descending dates by default
|
|
// (so that the more recent query is shown first)
|
|
$(".historyt").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aaSorting": [[ 1, "desc" ]],
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
|
|
{ "aTargets": [ 1 ], "sType": "title-string" },
|
|
]
|
|
}));
|
|
|
|
[% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]$('#tabs').tabs();[% END %]
|
|
|
|
$(".CheckNone").click(function(e){
|
|
e.preventDefault();
|
|
var form = $(this).parents("form").get(0);
|
|
$(form).unCheckCheckboxes();
|
|
enableCheckboxActions(form);
|
|
});
|
|
$(".CheckAll").click(function(e){
|
|
e.preventDefault();
|
|
var form = $(this).parents("form").get(0);
|
|
$(form).checkCheckboxes();
|
|
enableCheckboxActions(form);
|
|
});
|
|
|
|
$("input:checkbox").click(function(){
|
|
var form = $(this).parents("form").get(0);
|
|
enableCheckboxActions(form);
|
|
});
|
|
|
|
$(".removeitems,.remove-selected").click(function(e){
|
|
e.preventDefault();
|
|
var form = $(this).parents("form").get(0);
|
|
var ids = $(form).find("input:checkbox:checked");
|
|
if ( $(ids).length < 1 ) {
|
|
return false;
|
|
}
|
|
if ( confirm(MSG_CONFIRM_DELETE_HISTORY) ) {
|
|
$(form).submit();
|
|
}
|
|
return false;
|
|
});
|
|
});
|
|
|
|
function enableCheckboxActions(form){
|
|
// Enable/disable controls if checkboxes are checked
|
|
var checkedBoxes = $(form).find("input:checkbox:checked");
|
|
if ($(checkedBoxes).size()) {
|
|
$(form).find(".selections").html(_("With selected searches: "));
|
|
$(form).find(".selections-toolbar .links a").removeClass("disabled");
|
|
} else {
|
|
$(form).find(".selections").html(_("Select searches to: "));
|
|
$(form).find(".selections-toolbar .links a").addClass("disabled");
|
|
}
|
|
}
|
|
|
|
//]]>
|
|
|
|
</script>
|
|
[% END %]
|