Owen Leonard
6c7c97f67c
DataTables are used on enough pages in the staff client that it doesn't make sense to put inclusion of the CSS into each template where it is needed. This patch moves includes of datatables.css from individual templates into the global header file. To test, apply the patch and view various pages which have DataTables. View various styles of DataTables, e.g. - Full pagination, like item search results - Four-button, like Saved SQL reports Everything should look the same as it was. Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
242 lines
11 KiB
Text
242 lines
11 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE KohaDates %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Acquisitions › Receive shipment from vendor [% name | html %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="acq_parcels" 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="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% name | html %]</a> › Receive shipment from vendor [% name | html %]</div>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
[% IF ( count ) %]
|
|
<div class="col-sm-10 col-sm-push-2">
|
|
[% ELSE %]
|
|
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
|
|
[% END %]
|
|
<main>
|
|
|
|
[% IF ( error_failed_to_create_invoice ) %]
|
|
<div id="error" class="dialog alert">
|
|
<p>An error has occurred. Invoice cannot be created.</p>
|
|
</div>
|
|
[% END %]
|
|
<h1>Receive shipment from vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a></h1>
|
|
|
|
[% IF duplicate_invoices %]
|
|
<div id="parcels_duplicate_invoice" class="dialog alert">
|
|
<p>This invoice number has already been used. Would you like to receive on an existing invoice?</p>
|
|
<table>
|
|
<thead><tr><th>Invoice no.</th><th>Shipment date</th><th></th></tr></thead>
|
|
<tbody>
|
|
[% FOREACH invoice IN duplicate_invoices %]
|
|
<tr>
|
|
<td>[% invoice.invoicenumber | html %]</td>
|
|
<td>[% invoice.shipmentdate | $KohaDates %]</td>
|
|
<td><a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoice.invoiceid | uri %]">Receive</a></td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
<form method="get" action="parcels.pl">
|
|
<input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
|
|
<input type="hidden" name="op" value="confirm" />
|
|
<input type="hidden" name="invoice" value="[% invoicenumber | html %]" />
|
|
<input type="hidden" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" />
|
|
<input type="hidden" name="shipmentcost" value="[% shipmentcost | html %]" />
|
|
<input type="hidden" name="shipmentcost_budgetid" value="[% shipmentcost_budgetid | html %]" />
|
|
<input type="submit" class="button" value="Create new invoice anyway" />
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
|
|
|
|
[% IF ( count ) %]
|
|
<p> [% count | html %] shipments</p>
|
|
<div id="resultlist">
|
|
<!-- Search Results Table -->
|
|
|
|
<table class="small" id="parcelst">
|
|
<thead>
|
|
<tr>
|
|
<th>Line</th>
|
|
<th class="title-string">Date received</th>
|
|
<th>Invoice number</th>
|
|
<th>Item count</th>
|
|
<th>Biblio count</th>
|
|
<th>Items expected</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- Actual Search Results -->
|
|
[% FOREACH searchresult IN searchresults %]
|
|
<tr>
|
|
<td>
|
|
[% searchresult.number | html %]
|
|
</td>
|
|
<td>
|
|
<span title="[% searchresult.datereceived | html %]">[% searchresult.datereceived | $KohaDates %]</span>
|
|
</td>
|
|
<td>
|
|
[% IF ( searchresult.code ) %]
|
|
<a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% searchresult.invoiceid | uri %]">[% searchresult.code | html %]</a>
|
|
[% ELSE %]
|
|
<abbr title="not available">n/a</abbr>
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% searchresult.reccount | html %]
|
|
</td>
|
|
<td>
|
|
[% searchresult.bibcount | html %]
|
|
</td>
|
|
<td>
|
|
[% searchresult.itemcount | html %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="resultnumber">
|
|
<!-- Row of numbers corresponding to search result pages -->
|
|
[% IF ( displayprev ) %]
|
|
<a href="parcels.pl?booksellerid=[% booksellerid | uri %]&startfrom=[% prevstartfrom | uri %][% IF ( datefrom ) %]&datefrom=[% datefrom | uri %][% END %][% IF ( dateto ) %]&dateto=[% dateto | uri %][% END %][% IF ( code ) %]&filter=[% code | uri %][% END %][% IF ( orderby ) %]&orderby=[% orderby | uri %][% END %][% IF ( resultsperpage ) %]&resultsperpage=[% resultsperpage | uri %][% END %]&type=intra"><< Previous</a>
|
|
[% END %]
|
|
[% FOREACH number IN numbers %]
|
|
[% IF ( number.highlight ) %]
|
|
<span class="current">[% number.number | html %]</span>
|
|
[% ELSE %]
|
|
<a href="parcels.pl?booksellerid=[% booksellerid | uri %]&startfrom=[% number.startfrom | uri %][% IF ( number.datefrom ) %]&datefrom=[% number.datefrom | uri %][% END %][% IF ( number.dateto ) %]&dateto=[% number.dateto | uri %][% END %][% IF ( number.code ) %]&filter=[% number.code | uri %][% END %][% IF ( number.orderby ) %]&orderby=[% number.orderby | uri %][% END %][% IF ( number.resultsperpage ) %]&resultsperpage=[% number.resultsperpage | uri %][% END %]&type=intra">[% number.number | html %]</a>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF ( displaynext ) %]
|
|
<a href="parcels.pl?booksellerid=[% booksellerid | uri %]&startfrom=[% nextstartfrom | uri %][% IF ( datefrom ) %]&datefrom=[% datefrom | uri %][% END %][% IF ( dateto ) %]&dateto=[% dateto | uri %][% END %][% IF ( code ) %]&filter=[% code | uri %][% END %][% IF ( orderby ) %]&orderby=[% orderby | uri %][% END %][% IF ( resultsperpage ) %]&resultsperpage=[% resultsperpage | uri %][% END %]&type=intra">Next >></a>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
[% END %]
|
|
|
|
<div id="parcels_new_parcel">
|
|
<form method="get" action="parcels.pl" class="validated">
|
|
<fieldset class="rows">
|
|
<legend>Receive a new shipment</legend>
|
|
<ol> <li>
|
|
<label for="invoice" class="required">Vendor invoice:</label>
|
|
<input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
|
|
<input type="hidden" name="op" value="new" />
|
|
<input type="text" size="20" id="invoice" name="invoice" class="focus required" required="required" />
|
|
</li>
|
|
[% IF ( gst ) %]
|
|
<li>
|
|
<label for="gst">GST:</label>
|
|
<input type="text" size="20" id="gst" name="gst" />
|
|
</li>
|
|
[% END %]
|
|
<!-- // Removing freight input until shipping can be proplerly handled .
|
|
<li>
|
|
<label for="freight">Shipping:</label>
|
|
<input type="text" size="20" id="freight" name="freight" />
|
|
</li> -->
|
|
<li>
|
|
<label for="shipmentdate">Shipment date: </label>
|
|
<input type="text" id="shipmentdate" name="shipmentdate" maxlength="10" size="10" value="[% shipmentdate_today | $KohaDates %]" class="datepicker" />
|
|
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
|
|
</li>
|
|
<li>
|
|
<label for="shipmentcost">Shipping cost: </label>
|
|
<input type="text" id="shipmentcost" name="shipmentcost" size="10" />
|
|
</li>
|
|
<li>
|
|
<label for="shipmentcost_budgetid">Shipping fund: </label>
|
|
<select id="shipmentcost_budgetid" name="shipmentcost_budgetid">
|
|
<option value="">No fund</option>
|
|
[% FOREACH budget IN budgets %]
|
|
[% IF ( budget.b_active ) %]
|
|
<option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
<label for="showallfunds" style="float:none;width:auto;"> Show inactive:</label>
|
|
<input type="checkbox" id="showallfunds" />
|
|
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action"><input type="submit" class="button" value="Next" /> <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">Cancel</a></fieldset>
|
|
</form>
|
|
</div>
|
|
</main>
|
|
</div> <!-- /.col-sm-10.col-sm-push-2 -->
|
|
|
|
[% IF ( count ) %]
|
|
<div class="col-sm-2 col-sm-pull-10">
|
|
<aside>
|
|
<form method="get" action="parcels.pl">
|
|
<fieldset class="brief">
|
|
<h4>Filter</h4>
|
|
<ol>
|
|
<li> <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" /></li>
|
|
<li><label for="filter">Invoice number:</label><input type="text" size="20" name="filter" value="[% filter | html %]" id="filter" /></li>
|
|
<li><label for="datefrom">From:</label><input type="text" size="9" id="datefrom" name="datefrom" value="[% datefrom | html %]" class="datepicker" /><br />
|
|
<label for="dateto">To:</label><input type="text" size="9" id="dateto" name="dateto" value="[% dateto | html %]" class="datepicker" /></li>
|
|
<li><label for="orderby">Sort by :</label><select name="orderby" id="orderby">
|
|
<option value="invoicenumber">Invoice number</option>
|
|
<option value="shipmentdate">Shipment date</option>
|
|
<option value="shipmentdate desc">Shipment date reverse</option>
|
|
<option value="invoicenumber desc">Invoice number reverse</option>
|
|
</select><br />
|
|
<label for="resultsperpage">Results per page :</label><select name="resultsperpage" id="resultsperpage">
|
|
<option value="20">20</option>
|
|
<option value="30">30</option>
|
|
<option value="50">50</option>
|
|
<option value="100">100</option>
|
|
</select></li>
|
|
</ol>
|
|
<fieldset class="action"><input type="submit" class="button" value="Filter" /> <a href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid | uri %]">Clear</a></fieldset>
|
|
</fieldset>
|
|
</form>
|
|
</aside>
|
|
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
|
|
[% END %]
|
|
</div> <!-- /.row -->
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% Asset.js("js/acquisitions-menu.js") | $raw %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
var parcelst = $("#parcelst").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aoColumnDefs": [
|
|
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
|
|
],
|
|
'bPaginate': false,
|
|
}));
|
|
|
|
//keep a copy of all budgets before removing the inactives
|
|
var budgetId = $("#shipmentcost_budgetid");
|
|
var disabledBudgetsCopy = budgetId.html();
|
|
$('.b_inactive').remove();
|
|
|
|
$('#showallfunds').click(function() {
|
|
if ($(this).is(":checked")) {
|
|
budgetId.html(disabledBudgetsCopy); //Puts back all the funds
|
|
}
|
|
else {
|
|
$('.b_inactive').remove();
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|