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