Owen Leonard
1e69481103
This patch moves the checkboxes jQuery plugin to intranet-tmpl/prog/lib/jquery/plugins so that it will not be duplicated for each set of translated templates. To test, apply the patch and confirm that select all/clear all controls continue to work on the following pages: - Acquisitions -> Late orders - Acquisitions -> Add to order from an external source (search targets) - Acquisitions -> Suggestions - Administration -> Funds -> Planning (show/hide all columns) * Some unused code has been removed - Administration -> Library transfer limits - Staff client cart - Authorities -> New from Z39.50 (search targets) - Cataloging -> New from Z39.50 (search targets) - Circulation -> Check out to a patron (renew/check in selections) - Circulation -> Offline circulation -> Pending operations - Patrons -> Patron detail (renew/check in selections) - Patrons -> Fines -> Pay fines - Serials -> Subscription -> Serial collection - Tools -> Label creator -> Batches -> Search results - Tools -> Patron card creator -> Batches -> Search results - Tools -> Tags moderation - Tools -> Batch item deletion - Tools -> Batch item modification - Tools -> Inventory -> Submit a batch of barcodes - Lists -> List contents view Signed-off-by: David Cook <dcook@prosentient.com.au> Works as described! I don't think I've ever checked so many boxes before... Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
242 lines
9.3 KiB
Text
242 lines
9.3 KiB
Text
[% USE KohaDates %]
|
|
[% USE Branches %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Acquisitions › Late orders</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>
|
|
[% INCLUDE 'calendar.inc' %]
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
[% IF (dateformat == 'metric') %]
|
|
dt_add_type_uk_date();
|
|
[% END %]
|
|
|
|
var late_orderst;
|
|
function check_uncheck() {
|
|
var all_nodes = $(late_orderst.fnGetNodes());
|
|
if ( $(all_nodes).find("input:checkbox[name=ordernumber]:checked").length > 0) {
|
|
var booksellerid = $(all_nodes).find("input:checkbox[name=ordernumber]:checked:first").attr("data-booksellerid");
|
|
$(all_nodes).find("input:checkbox[name=ordernumber][data-booksellerid!="+booksellerid+"]").attr('disabled', 'disabled');
|
|
} else {
|
|
$("input:checkbox[name=ordernumber]").removeAttr('disabled');
|
|
}
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
|
|
late_orderst = $("#late_orders").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
|
|
],
|
|
"sPaginationType": "four_button",
|
|
"bAutoWidth": false,
|
|
"fnDrawCallback": function() {
|
|
if ( typeof late_orderst != 'undefined' ) {
|
|
check_uncheck();
|
|
$('input:checkbox[name=ordernumber]').bind('click', check_uncheck);
|
|
};
|
|
}
|
|
} ) );
|
|
$('input:checkbox[name=ordernumber]').bind('click', check_uncheck);
|
|
$('#CheckAll').click(function(){ $(late_orderst.fnGetNodes()).find("td").checkCheckboxes();});
|
|
$('#CheckNone').click(function(){ $(late_orderst.fnGetNodes()).find("td").unCheckCheckboxes();});
|
|
|
|
// Generates a dynamic link for exporting the selection's data as CSV
|
|
$("#ExportSelected").click(function() {
|
|
var all_nodes = $(late_orderst.fnGetNodes());
|
|
var selected = $(all_nodes).find("input[name='ordernumber']:checked");
|
|
|
|
if (selected.length == 0) {
|
|
alert(_("Please select at least one item to export."));
|
|
return false;
|
|
}
|
|
|
|
// Building the url from currently checked boxes
|
|
var url = '/cgi-bin/koha/acqui/lateorders-export.pl?op=export';
|
|
for (var i = 0; i < selected.length; i++) {
|
|
url += '&ordernumber=' + selected[i].value;
|
|
}
|
|
// And redirecting to the CSV page
|
|
location.href = url;
|
|
return false;
|
|
});
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body id="acq_lateorders" class="acq">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'acquisitions-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="lateorders.pl">Late orders</a></div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<h1>[% IF ( Supplier ) %][% Supplier %] : [% END %]Late orders</h1>
|
|
<div id="acqui_lateorders">
|
|
|
|
[% IF error_claim %]
|
|
[% IF ( error_claim == "no_email" ) %]
|
|
<div class="error">This vendor has no email</div>
|
|
[% ELSE %]
|
|
<div class="error">[% error_claim %]</div>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF info_claim %]
|
|
<div class="dialog message">Email has been sent.</div>
|
|
[% END %]
|
|
[% IF ( lateorders ) %]
|
|
<form action="lateorders.pl" name="claim" method="post">
|
|
<input type="hidden" name="op" value="send_alert" />
|
|
<input type="hidden" name="delay" value="[% delay %]" />
|
|
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
|
|
[% IF ( letters ) %]
|
|
<p><label for="letter_code">Claim using notice: </label><select name="letter_code" id="letter_code">
|
|
[% FOREACH letter IN letters %]
|
|
<option value="[% letter.code %]">[% letter.name %]</option>
|
|
[% END %]
|
|
</select>
|
|
</p>
|
|
[% END %]
|
|
<table id="late_orders">
|
|
<thead>
|
|
<tr>
|
|
[% IF Supplier %]
|
|
<th><a id="CheckAll" href="#">Check all</a><br /><a id="CheckNone" href="#">Uncheck all</a></th>
|
|
[% ELSE %]
|
|
<th></th>
|
|
[% END %]
|
|
<th>Order date</th>
|
|
<th>Estimated delivery date</th>
|
|
<th>Vendor</th>
|
|
<th>Information</th>
|
|
<th>Total cost</th>
|
|
<th>Basket</th>
|
|
<th>Basket group</th>
|
|
<th>Library</th>
|
|
<th>Fund</th>
|
|
<th>Claims count</th>
|
|
<th>Claimed date</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH lateorder IN lateorders %]
|
|
[% UNLESS ( loop.odd ) %]<tr class="highlight">
|
|
[% ELSE %]<tr>[% END %]
|
|
<td>
|
|
<input type="checkbox" value="[% lateorder.ordernumber %]" data-booksellerid="[% lateorder.supplierid %]" name="ordernumber">
|
|
</td>
|
|
<td>
|
|
[% lateorder.orderdate %]
|
|
([% lateorder.latesince %] days)
|
|
</td>
|
|
<td>
|
|
[% IF ( lateorder.estimateddeliverydate ) %]
|
|
[% lateorder.estimateddeliverydate | $KohaDates %]
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% lateorder.supplier %]
|
|
([% lateorder.supplierid %])
|
|
</td>
|
|
<td>
|
|
<b>[% lateorder.title |html %]</b>
|
|
[% IF ( lateorder.author ) %]<br/><i>Author:</i> [% lateorder.author %][% END %]
|
|
[% IF ( lateorder.publisher ) %]
|
|
<br/><i>Published by:</i> [% lateorder.publisher %]
|
|
[% IF ( lateorder.publicationyear ) %]
|
|
<i> in </i>[% lateorder.publicationyear %]
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% lateorder.unitpricesupplier %]x[% lateorder.quantity %] =
|
|
[% lateorder.subtotal %]
|
|
</td>
|
|
<td>
|
|
[% IF ( CAN_user_acquisition_order_manage ) %]
|
|
<a href="basket.pl?basketno=[% lateorder.basketno %]" title="basket">[% lateorder.basketname %] ([% lateorder.basketno %])</a>
|
|
[% ELSE %]
|
|
[% lateorder.basketname %] ([% lateorder.basketno %])
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% IF ( lateorder.basketgroupid ) %]
|
|
[% IF ( CAN_user_acquisition_group_manage ) %]
|
|
<a href="basketgroup.pl?op=add&booksellerid=[% lateorder.supplierid %]&basketgroupid=[% lateorder.basketgroupid %]" title="basketgroup">[% lateorder.basketgroupname %] ([% lateorder.basketgroupid %])</a>
|
|
[% ELSE %]
|
|
[% lateorder.basketgroupname %] ([% lateorder.basketgroupid %])</a>
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
<td>[% Branches.GetName( lateorder.branch ) %]
|
|
</td>
|
|
<td>[% lateorder.budget %]
|
|
</td>
|
|
<td>[% lateorder.claims_count %]</td>
|
|
<td>[% lateorder.claimed_date %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th colspan="5">Total</th>
|
|
<th>[% total %]</th>
|
|
<th colspan="6"> </th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
<div class="spacer"></div>
|
|
|
|
<p style="display:block;">
|
|
<input type="button" value="Export as CSV" id="ExportSelected" />
|
|
[% UNLESS lateorder.budget_lock %]
|
|
<input type="submit" value="Claim order" />
|
|
[% END %]
|
|
</p>
|
|
</form>
|
|
[% ELSE %]<p>There are no late orders.</p>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<form action="lateorders.pl" method="get">
|
|
<fieldset class="brief">
|
|
<h4>Filter results:</h4>
|
|
[% FOREACH ERROR_LOO IN ERROR_LOOP %]
|
|
[% IF ( ERROR_LOO.delay_digits ) %]<p class="error">The number of days ([% ERROR_LOO.bad_delay %]) must be a number between 0 and 999.</p>[% END %]
|
|
[% END %]
|
|
<ol>
|
|
<li><label for="delay">Order date:</label><input size="3" maxlength="3" id="delay" type="text" name="delay" value="[% delay %]" /> days ago</li>
|
|
<li><label for="from">Estimated delivery date from: </label>
|
|
<input type="text" size="10" id="from" name="estimateddeliverydatefrom" value="[% estimateddeliverydatefrom %]" class="datepickerfrom" />
|
|
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
|
|
</li>
|
|
<li><label for="to">To: </label>
|
|
<input type="text" size="10" id="to" name="estimateddeliverydateto" value="[% estimateddeliverydateto %]" class="datepickerto" />
|
|
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
|
|
</li>
|
|
|
|
<li><label for="booksellerid">Vendor:</label>
|
|
<select id="booksellerid" size="1" tabindex="" name="booksellerid">
|
|
<option value=""/>
|
|
[% FOREACH SUPPLIER_LOO IN SUPPLIER_LOOP %]
|
|
[% IF ( SUPPLIER_LOO.selected ) %]<option value="[% SUPPLIER_LOO.id %]" selected="selected">[% SUPPLIER_LOO.name %]</option>
|
|
[% ELSE %]<option value="[% SUPPLIER_LOO.id %]">[% SUPPLIER_LOO.name %]</option>[% END %]
|
|
[% END %]
|
|
</select>
|
|
</ol>
|
|
<fieldset class="action"><input type="submit" value="Filter" /></fieldset>
|
|
</fieldset>
|
|
</form>
|
|
[% INCLUDE 'acquisitions-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|