Bug 24857: No words
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / histsearch.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE TablesSettings %]
5 [% USE Branches %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% IF ( order_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %] &rsaquo; Acquisitions &rsaquo; Koha</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 </head>
11
12 <body id="acq_histsearch" class="acq">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'acquisitions-search.inc' %]
15
16 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
17     <ol>
18         <li>
19             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
20         </li>
21         <li>
22             <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
23         </li>
24
25     [% IF ( order_loop ) %]
26     <li>
27         <a href="/cgi-bin/koha/acqui/histsearch.pl">Orders search</a>
28     </li>
29     <li>
30         <a href="#" aria-current="page">
31             Search results
32         </a>
33     </li>
34     [% ELSE %]
35     <li>
36         <a href="#" aria-current="page">
37             Order search
38         </a>
39     </li>
40     [% END %]
41     </ol>
42 </nav>
43
44 <div class="main container-fluid">
45     <div class="row">
46         <div class="col-sm-10 col-sm-push-2">
47             <main>
48
49                 <h1>Order search</h1>
50
51                 [% IF !order_loop && search_done %]
52                     <div class="dialog message">
53                         Your search returned no results.
54                     </div>
55                 [% END %]
56
57                 [% UNLESS ( order_loop ) %]
58                     [% PROCESS filter_form context => "main" %]
59                 [% END %]
60
61
62     [% IF ( order_loop ) %]<h1>Search results</h1>
63         <div id="acqui_histsearch">
64         <table id="histsearcht">
65             <thead>
66                         <tr>
67                 <th>Order line (parent)</th>
68                 <th>Status</th>
69                                 <th>Basket</th>
70                 <th>Basket creator</th>
71                 <th>Basket group</th>
72                 <th>Managing library</th>
73                 <th>Invoice number</th>
74                 <th class="anti-the">Summary</th>
75                                 <th>Vendor</th>
76                 <th>Placed on</th>
77                 <th>Received on</th>
78                 <th>Quantity received</th>
79                 <th>Quantity ordered</th>
80                                 <th>Unit cost</th>
81                 <th>Fund</th>
82                 <th>Internal note</th>
83                 <th>Vendor note</th>
84                         </tr>
85             </thead>
86             <tbody>
87             [% FOREACH order IN order_loop %]
88                 <tr>
89                     <td>
90                         [% order.ordernumber | html %]
91                         [% IF order.ordernumber != order.parent_ordernumber %]([% order.parent_ordernumber | html %])[% END %]
92                     </td>
93                     <td>
94                         [% SWITCH order.orderstatus %]
95                             [% CASE 'new' %]<span>New</span>
96                             [% CASE 'ordered' %]<span>Ordered</span>
97                             [% CASE 'partial' %]<span>Partially received</span>
98                             [% CASE 'complete' %]<span>Received</span>
99                             [% CASE 'cancelled' %]<span>Cancelled</span>
100                         [% END %]
101                         [% IF order.is_standing %](standing order)[% END %]
102                     </td>
103                     <td><a href="basket.pl?basketno=[% order.basketno | uri %]">[% order.basketname | html %] ([% order.basketno | html %])</a></td>
104                     <td>[% order.authorisedbyname | html %]</td>
105                     <td>
106                         [% IF ( order.basketgroupid ) %]
107                         <a href="basketgroup.pl?op=add&booksellerid=[% order.id | uri %]&basketgroupid=[% order.basketgroupid | uri %]">[% order.groupname | html %] ([% order.basketgroupid | html %])</a>
108                         [% ELSE %]
109                             &nbsp;
110                         [% END %]
111                     </td>
112                     <td>[% Branches.GetName(order.managing_library) | html %]</td>
113                     <td>[% IF ( order.invoicenumber ) %]
114                             <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% order.invoiceid | uri %]">[% order.invoicenumber | html %]</a>
115                         [% ELSE %]
116                             &nbsp;
117                         [% END %]
118                     </td>
119                     <td>
120                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber | uri %]">[% order.title | html %]</a>
121                         <br />[% order.author | html %] <br /> [% order.isbn | html %]
122                     </td>
123                     <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.id | uri %]">[% order.name | html %]</a></td>
124                     <td data-order="[% order.creationdate | html %]">[% order.creationdate | $KohaDates %]</td>
125                     <td data-order="[% order.datereceived | html %]">
126                         [% order.datereceived | $KohaDates %]
127                     </td>
128                     <td>[% order.quantityreceived | html %]</td>
129                     <td>[% order.quantity | html %]</td>
130                     <td>[% order.ecost | html %]</td>
131                     <td>[% order.budget_name | html %]</td>
132                     <td>[% order.order_internalnote | html %]</td>
133                     <td>[% order.order_vendornote | html %]</td>
134                 </tr>
135             [% END %]
136             </tbody>
137         </table>
138     </div>
139     [% END %]
140
141 </main>
142 </div> <!-- /.col-sm-10.col-sm-push-2 -->
143
144 <div class="col-sm-2 col-sm-pull-10">
145     <aside>
146         [% IF ( order_loop ) %]
147             [% PROCESS filter_form context => "sidebar" %]
148         [% END %]
149         [% INCLUDE 'acquisitions-menu.inc' %]
150     </aside>
151 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
152 </div>
153
154 [% MACRO jsinclude BLOCK %]
155     [% Asset.js("js/acquisitions-menu.js") | $raw %]
156 [% INCLUDE 'calendar.inc' %]
157     [% INCLUDE 'datatables.inc' %]
158     [% INCLUDE 'columns_settings.inc' %]
159     [% Asset.js("js/autocomplete/patrons.js") | $raw %]
160     <script>
161         var MSG_REMOVE_PATRON = _("Remove");
162         $(document).ready(function() {
163             var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
164             KohaTable("histsearcht", {
165                 "sPaginationType": "full"
166             }, table_settings );
167
168             patron_autocomplete({
169                 patron_container: $("#basket_creators"),
170                 input_autocomplete: $("#find_patron"),
171                 patron_input_name: 'created_by',
172                 field_to_retrieve: 'borrowernumber'
173             });
174         });
175     </script>
176 [% END %]
177
178 [% BLOCK filter_form %]
179     <form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
180         [% IF ( context == "sidebar" ) %]
181             <fieldset class="brief">
182                 <h4>Search orders</h4>
183         [% ELSE %]
184             <fieldset class="rows">
185                 <legend>Search orders</legend>
186         [% END %]
187             [% INCLUDE 'filter-orders.inc' %]
188             <input type="hidden" name="do_search" value="1" />
189             <fieldset class="action"><input type="submit" value="Search" /></fieldset>
190         </fieldset>
191     </form>
192 [% END %]
193
194 [% INCLUDE 'intranet-bottom.inc' %]