+[% USE raw %]
+[% USE Asset %]
[% USE KohaDates %]
+[% USE TablesSettings %]
+[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Acquisitions › [% IF ( order_loop ) %]Orders search › Search results[% ELSE %]Order search[% END %]</title>
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+<title>[% IF ( order_loop ) %]Orders search › Search results[% ELSE %]Order search[% END %] › Acquisitions › Koha</title>
[% INCLUDE 'doc-head-close.inc' %]
-[% INCLUDE 'calendar.inc' %]
-[% INCLUDE 'datatables.inc' %]
-<script type="text/javascript">
-//<![CDATA[
-[% IF (dateformat == 'metric') %]
- dt_add_type_uk_date();
-[% END %]
- $(document).ready(function() {
- var histsearcht = $("#histsearcht").dataTable($.extend(true, {}, dataTablesDefaults, {
- "sPaginationType": "four_button"
- } ) );
- });
- //]]>
-</script>
</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 id="doc3" class="yui-t2">
-
- <div id="bd">
- <div id="yui-main">
- <div class="yui-b">
-
-[% UNLESS ( order_loop ) %]<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
-<fieldset class="rows">
- <legend>Search Orders</legend>
- <ol>
- <li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]" /></li>
- <li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]" /></li>
- <li><label for="isbn">ISBN: </label> <input type="text" name="isbn" id="isbn" value="[% isbn %]" /></li>
- [% IF (UNIMARC) %]
- <li><label for="ean">EAN: </label> <input type="text" name="ean" id="ean" value="[% ean %]" /></li>
- [% END %]
- <li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% name %]" /></li>
- <li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% basket %]" /></li>
- <li><label for="booksellerinvoicenumber ">Bookseller invoice no: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% booksellerinvoicenumber %]" /></li>
+<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
<li>
- <label for="basketgroupname">Basket group:</label>
- <input type="text" name="basketgroupname" id="basketgroupname" value="[% basketgroupname %]" />
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
</li>
-
<li>
- <label for="orderstatus">Order Status: </label>
- <select name="orderstatus" id="orderstatus">
- <option value=""></option>
- <option value="0">New</option>
- <option value="1">Ordered</option>
- <option value="2">Partial</option>
- <option value="3">Complete</option>
- <option value="4">Deleted</option>
- </select>
+ <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
</li>
- <li>
- <label for="fund">Fund: </label>
- <select name="budget" id="fund">
- <option value="">All funds</option>
- [% FOREACH bp_loo IN bp_loop %]
- <optgroup label="[% bp_loo.budget_period_description %]">
- [% FOREACH h_loo IN bp_loo.hierarchy %]
- <option type="text" value="[% h_loo.budget_id %]" branchcode="[% h_loo.budget_branchcode %]">
- [% h_loo.budget_display_name %]
- </option>
- [% END %]
- </optgroup>
+ [% IF ( order_loop ) %]
+ <li>
+ <a href="/cgi-bin/koha/acqui/histsearch.pl">Orders search</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ Search results
+ </a>
+ </li>
+ [% ELSE %]
+ <li>
+ <a href="#" aria-current="page">
+ Order search
+ </a>
+ </li>
+ [% END %]
+ </ol>
+</nav>
+
+<div class="main container-fluid">
+ <div class="row">
+ <div class="col-sm-10 col-sm-push-2">
+ <main>
+
+ <h1>Order search</h1>
+
+ [% IF !order_loop && search_done %]
+ <div class="dialog message">
+ Your search returned no results.
+ </div>
+ [% END %]
+
+ [% UNLESS ( order_loop ) %]
+ [% PROCESS filter_form context => "main" %]
[% END %]
- </select>
- </li>
- <li><label for="from">From: </label>
- <input type="text" size="10" id="from" name="from" value="[% from_placed_on %]" 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="to" value="[% to_placed_on %]" class="datepickerto" />
- <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
- </li>
- </ol>
- </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 group</th>
+ <th>Basket creator</th>
+ <th>Basket group</th>
+ <th>Managing library</th>
<th>Invoice number</th>
- <th>Summary</th>
+ <th class="anti-the">Summary</th>
<th>Vendor</th>
- <th>Placed on</th>
- <th>Received on</th>
- <th>Status</th>
+ <th>Placed on</th>
+ <th>Received on</th>
<th>Quantity received</th>
- <th>Pending order</th>
+ <th>Quantity ordered</th>
<th>Unit cost</th>
<th>Fund</th>
+ <th>Internal note</th>
+ <th>Vendor note</th>
</tr>
</thead>
<tbody>
[% FOREACH order IN order_loop %]
<tr>
<td>
- [% order.ordernumber %]
- [% IF order.ordernumber != order.parent_ordernumber %]([% order.parent_ordernumber %])[% END %]
+ [% order.ordernumber | html %]
+ [% IF order.ordernumber != order.parent_ordernumber %]([% order.parent_ordernumber | html %])[% END %]
</td>
- <td>[% order.basketname %] (<a href="basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
+ <td>
+ [% SWITCH order.orderstatus %]
+ [% CASE 'new' %]<span>New</span>
+ [% CASE 'ordered' %]<span>Ordered</span>
+ [% CASE 'partial' %]<span>Partially received</span>
+ [% CASE 'complete' %]<span>Received</span>
+ [% CASE 'cancelled' %]<span>Cancelled</span>
+ [% END %]
+ [% IF order.is_standing %](standing order)[% END %]
+ </td>
+ <td><a href="basket.pl?basketno=[% order.basketno | uri %]">[% order.basketname | html %] ([% order.basketno | html %])</a></td>
+ <td>[% order.authorisedbyname | html %]</td>
<td>
[% IF ( order.basketgroupid ) %]
- [% order.groupname %] (<a href="basketgroup.pl?booksellerid=[% order.id %]">[% order.basketgroupid %]</a>)
+ <a href="basketgroup.pl?op=add&booksellerid=[% order.id | uri %]&basketgroupid=[% order.basketgroupid | uri %]">[% order.groupname | html %] ([% order.basketgroupid | html %])</a>
[% ELSE %]
[% END %]
</td>
+ <td>[% Branches.GetName(order.managing_library) | html %]</td>
<td>[% IF ( order.invoicenumber ) %]
- <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% order.invoiceid %]">[% order.invoicenumber %]</a>
+ <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 %]">[% order.title |html %]</a>
- <br />[% order.author %] <br /> [% order.isbn %]
+ <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 %]">[% order.name %]</a></td>
- <td>[% order.creationdate | $KohaDates %]</td>
- <td>
- [% IF order.datereceived %]
- [% order.datereceived | $KohaDates %]
- [% END %]
+ <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.id | uri %]">[% order.name | html %]</a></td>
+ <td data-order="[% order.creationdate | html %]">[% order.creationdate | $KohaDates %]</td>
+ <td data-order="[% order.datereceived | html %]">
+ [% order.datereceived | $KohaDates %]
</td>
- <td>
- [% SWITCH order.orderstatus %]
- [% CASE '0' %]New
- [% CASE '1' %]Ordered
- [% CASE '2' %]Partial
- [% CASE '3' %]Complete
- [% CASE '4' %]Deleted
- [% END %]
- </td>
- <td>[% order.quantityreceived %]</td>
- <td>[% order.quantity %]</td>
- <td>[% order.ecost %]</td>
- <td>[% order.budget_name %]</td>
+ <td>[% order.quantityreceived | html %]</td>
+ <td>[% order.quantity | html %]</td>
+ <td>[% order.ecost | html %]</td>
+ <td>[% order.budget_name | html %]</td>
+ <td>[% order.order_internalnote | html %]</td>
+ <td>[% order.order_vendornote | html %]</td>
</tr>
[% END %]
</tbody>
- </table>
- </div>[% ELSE %][% END %]
+ </table>
+ </div>
+ [% END %]
+</main>
+</div> <!-- /.col-sm-10.col-sm-push-2 -->
+
+<div class="col-sm-2 col-sm-pull-10">
+ <aside>
+ [% IF ( order_loop ) %]
+ [% PROCESS filter_form context => "sidebar" %]
+ [% END %]
+ [% INCLUDE 'acquisitions-menu.inc' %]
+ </aside>
+</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div>
-</div>
-<div class="yui-b">
-[% INCLUDE 'acquisitions-menu.inc' %]
-</div>
-</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 = [% TablesSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
+ KohaTable("histsearcht", {
+ "sPaginationType": "full"
+ }, columns_settings );
+
+ patron_autocomplete({
+ patron_container: $("#basket_creators"),
+ input_autocomplete: $("#find_patron"),
+ patron_input_name: 'created_by',
+ field_to_retrieve: 'borrowernumber'
+ });
+ });
+ </script>
+[% END %]
+
+[% BLOCK filter_form %]
+ <form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
+ [% IF ( context == "sidebar" ) %]
+ <fieldset class="brief">
+ <h4>Search orders</h4>
+ [% ELSE %]
+ <fieldset class="rows">
+ <legend>Search orders</legend>
+ [% END %]
+ [% INCLUDE 'filter-orders.inc' %]
+ <input type="hidden" name="do_search" value="1" />
+ <fieldset class="action"><input type="submit" value="Search" /></fieldset>
+ </fieldset>
+ </form>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]