Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt
Kyle M Hall a8942c2884 Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues
Revert "DBRev to make notes of the XSS patches and the new important dependency."

This reverts commit e140603a59.

Revert "Bug 13618: Specific for branches.opac_info"

This reverts commit 06e4a50f00.

Revert "Bug 13618: (follow-up) Specific for other prefs"

This reverts commit d6475a111f.

Revert "Bug 13618: Fix for debarredcomment and patron messages"

This reverts commit dd98c9df92.

Revert "Bug 13618: Do not display html tags in patron's notices"

This reverts commit a065b243fe.

Revert "Bug 13618: Do not display   and html tags in item fields content"

This reverts commit baeeaffbf8.

Revert "Bug 13618: Fix for system preference description"

This reverts commit a967a09261.

Revert "Bug 13618: Remove html filters for newly pushed code"

This reverts commit 0e98662b10.

Revert "Bug 13618: (follow-up) add missing lines for opac-shelves"

This reverts commit fc2fb605e5.

Revert "Bug 13618: (follow-up) Specific for ColumnsSettings"

This reverts commit bc308fdd9c.

Revert "Bug 13618: Fix for edit biblios and items"

This reverts commit 811c4e8402.

Revert "Bug 13618: followup to remove tabs"

This reverts commit ca8e8c397c.

Revert "Bug 13618: Fix last occurrences recently introduced to master"

This reverts commit bb417b256b.

Revert "Bug 13618: Fix for news"

This reverts commit ae5b98020a.

Revert "Bug 13618: Fix escape on sending baskets or shelves by email"

This reverts commit a7731ffe25.

Revert "Bug 13618: Specific for XSLTBloc"

This reverts commit 11fa38dc29.

Revert "Bug 13618: Specific for Salutation on editing a patron"

This reverts commit 36c07ad6d3.

Revert "Bug 13618: Specific for other prefs"

This reverts commit e6ea281a3b.

Revert "Bug 13618 - memberentrygen.tt errors Not a GLOB reference"

This reverts commit 7824874557.

Revert "Bug 13618: Specific for ColumnsSettings"

This reverts commit 1834da3da3.

Revert "Bug 13618: Specific for IntranetUser* and OPACUser* prefs"

This reverts commit 21ae62b253.

Revert "Bug 13618: Fix error 'Not a GLOB reference'"

This reverts commit 602bdbab4c.

Revert "Bug 13618: Specific for the ISBD view"

This reverts commit d254362435.

Revert "Bug 13618: Specific for pagination_bar"

This reverts commit 8837a8ae68.

Revert "Bug 13618: Specific places where we don't need to escape variables - intra"

This reverts commit 00eff140b3.

Revert "Bug 13618: Remove html filters at the intranet"

This reverts commit 7db851ff03.

Revert "Bug 13618: Specific places where we don't need to escape variables"

This reverts commit 49a3738b8d.

Revert "Bug 13618: Remove html filters at the OPAC"

This reverts commit cedaa0e23e.

Revert "Bug 13618: Use Template::Stash::AutoEscaping to use the html filter"

This reverts commit 01b38d3b13.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-11 19:39:53 +00:00

271 lines
14 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source &rsaquo; Search results[% END %]</title>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
{ "aTargets": [ 1 ], "sType": "nsb-nse" },
],
"aaSorting": [[ 1, "asc" ]],
"bPaginate": false
} ) );
$("#CheckAll").click(function(){
$(".checkboxed").checkCheckboxes();
return false;
});
$("#CheckNone").click(function(){
$(".checkboxed").unCheckCheckboxes();
return false;
});
$("#closemenu").click(function(e){
$(".linktools").hide();
$("tr").removeClass("selected");
});
$("#resetZ3950Search").click(function(e) {
e.preventDefault();
$("form[name='f']").find("input[type=text]").val("");
});
/* Inline edit/delete links */
$("td").click(function(event){
var $tgt = $(event.target);
var row = $(this).parent();
$(".linktools").hide();
$("tr").removeClass("selected");
row.addClass("selected");
if($tgt.is("a")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")){
//Don't show inline links for cells containing links of their own.
} else {
var position = $(this).offset();
var top = position.top+5;
var left = position.left+5;
$(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
}
});
$(".previewData").on("click", function(e){
e.preventDefault();
var ltitle = $(this).text();
var page = $(this).attr("href");
$("#dataPreviewLabel").text(ltitle);
$("#dataPreview .modal-body").load(page + " div");
$('#dataPreview').modal({show:true});
});
$("#dataPreview").on("hidden", function(){
$("#dataPreviewLabel").html("");
$("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
});
});
[% IF ( total_pages ) %]
function validate_goto_page(){
var page = $('#goto_page').val();
if(isNaN(page)) {
alert(_("The page entered is not a number."));
return false;
}
else if(page < 1 || page > [% total_pages %] ) {
alert(_("The page should be a number between 1 and %s.").format([% total_pages %]));
return false;
}
else {
return true;
}
}
[% END %]
//]]>
</script>
<style type="text/css">
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
.linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent !important; } #dataPreview { width : 80%; margin-left : -40%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }
</style>
</head>
<body id="acq_z3950_search" class="acq">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'acquisitions-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]<a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Order from external source</a> &rsaquo; Search results[% END %]</div>
<div id="doc3" class="yui-t7">
<div id="bd">
[% IF ( opsearch ) %]
<h2>Order from external source</h2>
<form method="post" action="z3950_search.pl" name="f" class="checkboxed">
<input type="hidden" name="op" id="op" value="do_search" />
<div class="yui-g">
<div class="yui-u first">
<fieldset class="rows">
<ol>
<li><label for="searchtitle">Title: </label> <input type="text" id="searchtitle" name="title" value="[% title |html %]" class="focus" /></li>
<li><label for="isbn">ISBN: </label> <input type="text" id="isbn" name="isbn" value="[% isbn %]" /></li>
<li><label for="lccall">LC call number: </label> <input type="text" id="lccall" name="lccall" value="" /></li>
<li><label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li>
<li><label for="author">Author: </label> <input type="text" id="author" name="author" value="[% author %]" /></li>
<li><label for="issn">ISSN: </label> <input type="text" id="issn" name="issn" value="[% issn %]" /></li>
<li><label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
<li><label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li>
<li><label for="frameworkcode" >Select MARC framework:</label>
<select id="frameworkcode" name="frameworkcode" >
<option value="">Default</option>
[% FOREACH frameworkcodeloo IN frameworkcodeloop %]
[% IF ( frameworkcodeloo.active ) %]
<option value="[% frameworkcodeloo.value %]" selected="selected" >[% frameworkcodeloo.frameworktext %]</option>
[% ELSE %]
<option value="[% frameworkcodeloo.value %]" >[% frameworkcodeloo.frameworktext %]</option>
[% END %]
[% END %]
</select>
</li>
</ol>
<p><a id="resetZ3950Search" href="#">Clear search form</a></p>
</fieldset>
<input type="hidden" name="biblionumber" value="[% biblionumber %]" />
<input type="hidden" name="basketno" value="[% basketno %]" />
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
</div>
<div class="yui-u second">
<h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#">Select all</a></span><span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></span></h2>
<div id="z3950_search_targets_acq">
[% FOREACH serverloo IN serverloop %]
<p>
[% IF ( serverloo.checked ) %]
<input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" checked="checked" />
[% ELSE %]
<input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" />
[% END %]
<label for="z3950_[% serverloo.id %]">[% serverloo.servername %] [[% serverloo.host %]]</label>
</p>
[% END %]
</div>
</div>
</div>
<fieldset class="action"><input type="submit" class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Cancel</a></fieldset>
</form>
[% ELSE %]
<h2>Search results</h2>
<p>You searched for:
[% IF ( title ) %]<em>Title: </em><span class=term>[% title %]</span> [% END %]
[% IF ( author ) %]<em>Author: </em><span class=term>[% author %]</span> [% END %]
[% IF ( isbn ) %]<em>ISBN: </em><span class=term>[% isbn %]</span> [% END %]
[% IF ( issn ) %]<em>ISSN: </em><span class=term>[% issn %]</span> [% END %]
[% IF ( lccall ) %]<em>LC call number: </em><span class=term>[% lccall %]</span> [% END %]
[% IF ( subject ) %]<em>Subject heading: </em><span class=term>[% subject %]</span> [% END %]
[% IF ( controlnumber ) %]<em>Control no: </em><span class=term>[% controlnumber %]</span> [% END %]
[% IF ( dewey ) %]<em>Dewey: </em><span class=term>[% dewey %]</span> [%END %]
</p>
[% IF ( breeding_loop ) %]
<table id="resultst">
<thead> <tr>
<th>Server</th>
<th>Title</th>
<th>Author</th>
<th>ISBN</th>
<th>LCCN</th>
<th>Preview</th>
<th>&nbsp;</th>
</tr></thead>
<tbody>[% FOREACH breeding_loo IN breeding_loop %]
[% IF ( breeding_loo.breedingid ) %]
<tr>
<td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Preview card</a> <a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode %]&amp;breedingid=[% breeding_loo.breedingid %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Order</a> <a href="#" id="closemenu" title="Close this menu"> X </a></div></td>
<td>[% breeding_loo.title |html %]</td>
<td>[% breeding_loo.author %]</td>
<td>[% breeding_loo.isbn %]</td>
<td>[% breeding_loo.lccn %]</td>
<td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" title="Card" class="previewData">Card</a></td>
<td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode %]&amp;breedingid=[% breeding_loo.breedingid %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Order</a></td>
</tr>
[% END %]
[% END %]</tbody>
</table>
<div id="dataPreview" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="dataPreviewLabel">MARC preview</h3>
</div>
<div class="modal-body">
<div id="loading"> <img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /> Loading </div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>
<form method="post" action="z3950_search.pl" id="page_form" name="page_form" class="checkboxed">
<input type="hidden" name="op" id="op" value="do_search" />
<input type="hidden" name="current_page" id="current_page" value="[% current_page %]" />
<input type="hidden" id="searchtitle" name="title" value="[% title |html %]" />
<input type="hidden" id="isbn" name="isbn" value="[% isbn %]" />
<input type="hidden" id="lccall" name="lccall" value="[% lccall %]" />
<input type="hidden" id="author" name="author" value="[% author %]" />
<input type="hidden" id="subject" name="subject" value="[% subject %]" />
<input type="hidden" id="dewey" name="dewey" value="[% dewey %]" />
<input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
<input type="hidden" name="biblionumber" value="[% biblionumber %]" />
<input type="hidden" name="controlnumber" value="[% controlnumber %]" />
<input type="hidden" name="basketno" value="[% basketno %]" />
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
[% FOREACH server IN servers %]
<input type="hidden" name="id" id="z3950_[% server.id %]" value="[% server.id %]" />
[% END %]
[% IF ( show_prevbutton ) %]
<input type="button" name="changepage_prev" value="Previous Page" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();" />
[% END %]
Page [% current_page %] / [% total_pages %]
[% IF ( show_nextbutton ) %]
<input type="button" name="changepage_next" value="Next Page" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();" />
[% END %]
<br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" onclick="return validate_goto_page();" value="Go" />
</form>
[% ELSE %]
[% IF ( emptyserverlist ) %]
<div class="dialog alert">You didn't select any external target.</div>
[% ELSE %]
[% IF ( errconn ) %]
<div class="dialog alert">
<ul>
[% FOREACH errcon IN errconn %]
<li>Connection failed to [% errcon.server %]</li>
[% END %]
</ul>
</div>
[% END %]
[% END %]
<div class="dialog message">Nothing found. <a href="javascript: history.back()">Try another search</a>.</div>
[% END %]
[% END %]
</div>
</div>
[% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
</body>
</html>