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>
148 lines
6.2 KiB
Text
148 lines
6.2 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE KohaDates %]
|
|
[% USE ColumnsSettings %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Acquisitions › [% IF ( order_loop ) %]Orders search › Search results[% ELSE %]Order search[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="acq_histsearch" 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> › [% IF ( order_loop ) %]<a href="/cgi-bin/koha/acqui/histsearch.pl">Orders search</a> › Search results[% ELSE %]Order search[% END %]</div>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-10 col-sm-push-2">
|
|
<main>
|
|
|
|
[% UNLESS ( order_loop ) %]<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
|
|
<fieldset class="rows">
|
|
<legend>Search orders</legend>
|
|
[% INCLUDE 'filter-orders.inc' %]
|
|
</fieldset>
|
|
<input type="hidden" name="do_search" value="1" />
|
|
<fieldset class="action"><input type="submit" value="Search" /></fieldset>
|
|
</form>[% END %]
|
|
[% IF ( order_loop ) %]<h1>Search results</h1>
|
|
<div id="acqui_histsearch">
|
|
<table id="histsearcht">
|
|
<thead>
|
|
<tr>
|
|
<th>Order line (parent)</th>
|
|
<th>Status</th>
|
|
<th>Basket</th>
|
|
<th>Basket creator</th>
|
|
<th>Basket group</th>
|
|
<th>Invoice number</th>
|
|
<th class="anti-the">Summary</th>
|
|
<th>Vendor</th>
|
|
<th class="title-string">Placed on</th>
|
|
<th class="title-string">Received on</th>
|
|
<th>Quantity received</th>
|
|
<th>Pending order</th>
|
|
<th>Unit cost</th>
|
|
<th>Fund</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH order IN order_loop %]
|
|
<tr>
|
|
<td>
|
|
[% order.ordernumber | html %]
|
|
[% IF order.ordernumber != order.parent_ordernumber %]([% order.parent_ordernumber | html %])[% END %]
|
|
</td>
|
|
<td>
|
|
[% SWITCH order.orderstatus %]
|
|
[% CASE 'new' %]New
|
|
[% CASE 'ordered' %]Ordered
|
|
[% CASE 'partial' %]Partially received
|
|
[% CASE 'complete' %]Received
|
|
[% CASE 'cancelled' %]Cancelled
|
|
[% END %]
|
|
</td>
|
|
<td>[% order.basketname | html %] (<a href="basket.pl?basketno=[% order.basketno | uri %]">[% order.basketno | html %]</a>)</td>
|
|
<td>[% order.authorisedbyname | html %]</td>
|
|
<td>
|
|
[% IF ( order.basketgroupid ) %]
|
|
[% order.groupname | html %] (<a href="basketgroup.pl?op=add&booksellerid=[% order.id | uri %]&basketgroupid=[% order.basketgroupid | uri %]">[% order.basketgroupid | html %]</a>)
|
|
[% ELSE %]
|
|
|
|
[% END %]
|
|
</td>
|
|
<td>[% IF ( order.invoicenumber ) %]
|
|
<a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% order.invoiceid | uri %]">[% order.invoicenumber | html %]</a>
|
|
[% ELSE %]
|
|
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber | uri %]">[% order.title | html %]</a>
|
|
<br />[% order.author | html %] <br /> [% order.isbn | html %]
|
|
</td>
|
|
<td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.id | uri %]">[% order.name | html %]</a></td>
|
|
<td><span title="[% order.creationdate | html %]">[% order.creationdate | $KohaDates %]</span></td>
|
|
<td>
|
|
[% IF order.datereceived %]
|
|
<span title="[% order.datereceived | html %]">[% order.datereceived | $KohaDates %]</span>
|
|
[% ELSE %]
|
|
<span title="0000-00-00"></span>
|
|
[% END %]
|
|
</td>
|
|
<td>[% order.quantityreceived | html %]</td>
|
|
<td>[% order.quantity | html %]</td>
|
|
<td>[% order.ecost | html %]</td>
|
|
<td>[% order.budget_name | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
[% ELSIF search_done %]
|
|
There is no order for this search.
|
|
[% END %]
|
|
|
|
</main>
|
|
</div> <!-- /.col-sm-10.col-sm-push-2 -->
|
|
|
|
<div class="col-sm-2 col-sm-pull-10">
|
|
<aside>
|
|
[% INCLUDE 'acquisitions-menu.inc' %]
|
|
</aside>
|
|
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% Asset.js("js/acquisitions-menu.js") | $raw %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
[% INCLUDE 'columns_settings.inc' %]
|
|
[% Asset.js("js/autocomplete/patrons.js") | $raw %]
|
|
<script>
|
|
var MSG_REMOVE_PATRON = _("Remove");
|
|
$(document).ready(function() {
|
|
var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
|
|
KohaTable("histsearcht", {
|
|
"aoColumnDefs": [
|
|
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
|
|
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
|
|
],
|
|
"sPaginationType": "four_button"
|
|
}, columns_settings );
|
|
|
|
[% UNLESS order_loop %]
|
|
patron_autocomplete({
|
|
patron_container: $("#basket_creators"),
|
|
input_autocomplete: $("#find_patron"),
|
|
patron_input_name: 'created_by',
|
|
field_to_retrieve: 'borrowernumber'
|
|
});
|
|
[% END %]
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|