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