Bug 12944: Fix regression on translating
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / histsearch.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( order_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 [% INCLUDE 'datatables.inc' %]
8
9 <script type="text/javascript" src="[% interface %]/js/autocomplete/patrons.js"></script>
10 <script type="text/javascript">
11 //<![CDATA[
12 var MSG_REMOVE_PATRON = _("Remove");
13  $(document).ready(function() {
14     $("#histsearcht").dataTable($.extend(true, {}, dataTablesDefaults, {
15         "aoColumnDefs": [
16             { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
17             { "sType": "title-string", "aTargets" : [ "title-string" ] }
18         ],
19         "sPaginationType": "four_button"
20     } ) );
21
22     [% UNLESS order_loop %]
23         patron_autocomplete({
24             patron_container: $("#basket_creators"),
25             input_autocomplete: $("#find_patron"),
26             patron_input_name: 'created_by',
27             field_to_retrieve: 'borrowernumber'
28         });
29     [% END %]
30 });
31
32  //]]>
33 </script>
34 </head>
35 <body id="acq_histsearch" class="acq">
36 [% INCLUDE 'header.inc' %]
37 [% INCLUDE 'acquisitions-search.inc' %]
38
39 <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; [% IF ( order_loop ) %]<a href="/cgi-bin/koha/acqui/histsearch.pl">Orders search</a> &rsaquo; Search results[% ELSE %]Order search[% END %]</div>
40
41 <div id="doc3" class="yui-t2">
42    
43    <div id="bd">
44         <div id="yui-main">
45         <div class="yui-b">
46         
47 [% UNLESS ( order_loop ) %]<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
48 <fieldset class="rows">
49     <legend>Search orders</legend>
50                 <ol>
51                 <li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]" /></li>
52                 <li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]" /></li>
53         <li><label for="isbn">ISBN: </label> <input type="text" name="isbn" id="isbn" value="[% isbn %]" /></li>
54                 [% IF (UNIMARC) %]
55         <li><label for="ean">EAN: </label> <input type="text" name="ean" id="ean" value="[% ean %]" /></li>
56                 [% END %]
57                 <li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% name %]" /></li>
58                 <li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% basket %]" /></li>
59         <li><label for="basket_creators">Basket created by: </label>
60             <input autocomplete="off" id="find_patron" type="text" style="width:150px" class="noEnterSubmit" />
61             <div>
62                 <div id="basket_creators" style="float:left;"></div>
63             </div>
64         </li>
65         <li><label for="booksellerinvoicenumber ">Bookseller invoice no: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% booksellerinvoicenumber %]" /></li>
66         <li>
67             <label for="basketgroupname">Basket group:</label>
68             <input type="text" name="basketgroupname" id="basketgroupname" value="[% basketgroupname %]" />
69         </li>
70         <li>
71           <label for="ordernumber">Order line:</label>
72           <input type="text" name="ordernumber" id="ordernumber" value="[% ordernumber %]" />
73           [% IF search_children_too %]
74             <input type="checkbox" name="search_children_too" id="search_children_too" value="1" checked="checked" />
75           [% ELSE %]
76             <input type="checkbox" name="search_children_too" id="search_children_too" value="1" />
77           [% END %]
78           <label class="yesno" for="search_children_too">Display children too.</label>
79         </li>
80
81         <li>
82             <label for="orderstatus">Order status: </label>
83             <select name="orderstatus" id="orderstatus">
84                 [% IF orderstatus == "" %]
85                   <option value="">Any status except cancelled</option>
86                 [% ELSE %]
87                   <option value="" selected="selected"></option>
88                 [% END %]
89                 [% IF orderstatus == "new" %]
90                   <option value="new" selected="selected">New</option>
91                 [% ELSE %]
92                   <option value="new">New</option>
93                 [% END %]
94                 [% IF orderstatus == "ordered" %]
95                   <option value="ordered" selected="selected">Pending</option>
96                 [% ELSE %]
97                   <option value="ordered">Pending</option>
98                 [% END %]
99                 [% IF orderstatus == "partial" %]
100                   <option value="partial" selected="selected">Partially received</option>
101                 [% ELSE %]
102                   <option value="partial">Partially received</option>
103                 [% END %]
104                 [% IF orderstatus == "complete" %]
105                   <option value="complete" selected="selected">Received</option>
106                 [% ELSE %]
107                   <option value="complete">Received</option>
108                 [% END %]
109                 [% IF orderstatus == "cancelled" %]
110                   <option value="cancelled" selected="selected">Cancelled</option>
111                 [% ELSE %]
112                   <option value="cancelled">Cancelled</option>
113                 [% END %]
114             </select>
115         </li>
116         <li>
117             <label for="fund">Fund: </label>
118             <select name="budget" id="fund">
119                 <option value="">All funds</option>
120                 [% FOREACH bp_loo IN bp_loop %]
121                     <optgroup label="[% bp_loo.budget_period_description %]">
122                     [% FOREACH h_loo IN bp_loo.hierarchy %]
123                       [% IF h_loo.budget_id == budget_id %]
124                         <option type="text" value="[% h_loo.budget_id %]" branchcode="[% h_loo.budget_branchcode %]" selected="selected">
125                       [% ELSE %]
126                         <option type="text" value="[% h_loo.budget_id %]" branchcode="[% h_loo.budget_branchcode %]">
127                       [% END %]
128                             [% h_loo.budget_display_name %]
129                         </option>
130                     [% END %]
131                     </optgroup>
132                 [% END %]
133             </select>
134         </li>
135
136                 <li><label for="from">From: </label> 
137         <input type="text" size="10" id="from" name="from" value="[% from_placed_on %]" class="datepickerfrom" />
138                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
139                 </li>
140                 <li><label for="to">To: </label> 
141         <input type="text" size="10" id="to" name="to" value="[% to_placed_on %]" class="datepickerto" />
142                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
143                 </li>
144                 </ol>
145         </fieldset>
146     <input type="hidden" name="do_search" value="1" />
147         <fieldset class="action"><input type="submit" value="Search" /></fieldset>
148         </form>[% END %]
149     [% IF ( order_loop ) %]<h1>Search results</h1>
150         <div id="acqui_histsearch">
151         <table id="histsearcht">
152             <thead>
153                         <tr>
154                 <th>Order line (parent)</th>
155                 <th>Status</th>
156                                 <th>Basket</th>
157                 <th>Basket creator</th>
158                                 <th>Basket group</th>
159                 <th>Invoice number</th>
160                 <th class="anti-the">Summary</th>
161                                 <th>Vendor</th>
162                 <th class="title-string">Placed on</th>
163                 <th class="title-string">Received on</th>
164                 <th>Quantity received</th>
165                 <th>Pending order</th>
166                                 <th>Unit cost</th>
167                 <th>Fund</th>
168                         </tr>
169             </thead>
170             <tbody>
171             [% FOREACH order IN order_loop %]
172                 <tr>
173                     <td>
174                         [% order.ordernumber %]
175                         [% IF order.ordernumber != order.parent_ordernumber %]([% order.parent_ordernumber %])[% END %]
176                     </td>
177                     <td>
178                         [% SWITCH order.orderstatus %]
179                             [% CASE 'new' %]New
180                             [% CASE 'ordered' %]Pending
181                             [% CASE 'partial' %]Partially received
182                             [% CASE 'complete' %]Received
183                             [% CASE 'cancelled' %]Cancelled
184                         [% END %]
185                     </td>
186                     <td>[% order.basketname %] (<a href="basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
187                     <td>[% order.authorisedbyname %]</td>
188                     <td>
189                         [% IF ( order.basketgroupid ) %]
190                             [% order.groupname %] (<a href="basketgroup.pl?booksellerid=[% order.id %]">[% order.basketgroupid %]</a>)
191                         [% ELSE %]
192                             &nbsp;
193                         [% END %]
194                     </td>
195                     <td>[% IF ( order.invoicenumber ) %]
196                             <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% order.invoiceid %]">[% order.invoicenumber %]</a>
197                         [% ELSE %]
198                             &nbsp;
199                         [% END %]
200                     </td>
201                     <td>
202                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
203                         <br />[% order.author %] <br /> [% order.isbn %]
204                     </td>
205                     <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.id %]">[% order.name %]</a></td>
206                     <td><span title="[% order.creationdate %]">[% order.creationdate | $KohaDates %]</span></td>
207                     <td>
208                         [% IF order.datereceived %]
209                             <span title="[% order.datereceived %]">[% order.datereceived | $KohaDates %]</span>
210                         [% ELSE %]
211                             <span title="0000-00-00"></span>
212                         [% END %]
213                     </td>
214                     <td>[% order.quantityreceived %]</td>
215                     <td>[% order.quantity %]</td>
216                     <td>[% order.ecost %]</td>
217                     <td>[% order.budget_name %]</td>
218                 </tr>
219             [% END %]
220             </tbody>
221         </table>
222     </div>
223     [% ELSIF search_done %]
224       There is no order for this search.
225     [% END %]
226
227 </div>
228 </div>
229 <div class="yui-b">
230 [% INCLUDE 'acquisitions-menu.inc' %]
231 </div>
232 </div>
233 [% INCLUDE 'intranet-bottom.inc' %]