Bug 8942: Translation process breaks javascript
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / booksellers.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Search for vendor [% supplier %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <style type="text/css">
6 #vendors td{
7         vertical-align: top;
8 }
9 </style>
10 <link rel="stylesheet" href="[% themelang %]/css/datatables.css" />
11 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
12 [% INCLUDE 'datatables-strings.inc' %]
13 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
14 <script type="text/javascript">
15 //<![CDATA[
16 $(document).ready(function() {
17     [% IF (dateformat == 'metric') %]
18         dt_add_type_uk_date();
19     [% END %]
20     $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
21         'bPaginate': false,
22         'bFilter': false,
23         'bInfo': false,
24         'aoColumnDefs': [
25             { 'aTargets': [-1], 'bSortable': false }
26         ]
27     }));
28     $("#supplierlist").change(function() {
29         var id = $(this).find("option:selected").val();
30         window.location.href = "#" + id;
31     });
32 });
33 //]]>
34 </script>
35
36 </head>
37 <body id="acq_booksellers" class="acq">
38 [% INCLUDE 'header.inc' %]
39 [% INCLUDE 'acquisitions-search.inc' %]
40
41 <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; Search for vendor <em>[% supplier %]</em> </div>
42
43 <div id="doc3" class="yui-t2">
44    
45     <div id="bd">
46     <div id="yui-main">
47     <div class="yui-b">
48     
49 [% INCLUDE 'acquisitions-toolbar.inc' %]
50 [% IF ( count == 1 ) %] 
51 <h1> [% supplier_name %] </h1>
52 [% ELSE %]
53 <h1>You searched on <b>vendor [% supplier %],</b> [% count %] results found</h1>
54 [% END %]
55 [% IF ( loop_suppliers.size ) %]
56     [% UNLESS (count == 1) %]
57         <p>Choose a vendor in the list to jump directly to the right place.
58         <select id="supplierlist">
59             [% FOREACH supplier IN loop_suppliers %]
60                 <option value="[% supplier.booksellerid %]">[% supplier.name %]</option>
61             [% END %]
62         </select>
63         </p>
64     [% END %]
65     <div id="acqui_order_supplierlist">
66         [% FOREACH supplier IN loop_suppliers %]
67             <div class="supplier">
68                 <span class="suppliername">
69                     [% IF (supplier.name) %]
70                         <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a>
71                     [% ELSE %]
72                         <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">NO NAME</a>
73                     [% END %]
74                 </span>
75                 <span class="action">
76                     [% IF ( CAN_user_acquisition_order_manage ) %]
77                         [% IF ( supplier.active ) %]
78                             <input type="button" value="New basket" onclick="window.location.href='/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% supplier.booksellerid %]&amp;op=add_form'" />
79                         [% ELSE %]
80                             (inactive)
81                         [% END %]
82                     [% END %]
83                     <input type="button" value="Receive shipment" onclick="window.location.href='/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]'" />
84                 </span>
85                 <div class="baskets">
86                     [% IF ( supplier.loop_basket.size ) %]
87                         <table class="baskets">
88                             <thead>
89                                 <tr>
90                                     <th>Basket (#)</th>
91                                     <th>Item count</th>
92                                     <th>Biblio count</th>
93                                     <th>Items expected</th>
94                                     <th>Created by</th>
95                                     <th>Date</th>
96                                     <th>&nbsp;</th>
97                                 </tr>
98                             </thead>
99                             <tbody>
100                                 [% FOREACH basket IN supplier.loop_basket %]
101                                     [% IF ( basket.uncertainprices ) %]
102                                         <tr class="problem">
103                                     [% ELSE %]
104                                         <tr>
105                                     [% END %]
106                                         <td>[% basket.basketname %] (#[% basket.basketno %])</td>
107                                         <td>[% basket.total_items %]</td>
108                                         <td>[% basket.total_biblios %]</td>
109                                         <td>[% basket.expected_items %]</td>
110                                         <td>
111                                             [% basket.authorisedby_firstname %]
112                                             [% basket.authorisedby_surname %]
113                                         </td>
114                                         <td>[% basket.creationdate | $KohaDates %]</td>
115                                         <td>
116                                             [% IF ( basket.closedate ) %]
117                                                 closed on [% basket.closedate | $KohaDates %]
118                                                 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">View</a>
119                                             [% ELSE %]
120                                                 [% IF ( basket.active ) %]
121                                                     <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">Modify</a>
122                                                 [% ELSE %]
123                                                     <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">View</a>
124                                                 [% END %]
125                                             [% END %]
126                                         </td>
127                                     </tr>
128                                 [% END %][%# FOREACH basket IN supplier.loop_basket %]
129                             </tbody>
130                         </table>
131                     [% ELSE %]
132                         <p>No pending baskets</p>
133                     [% END %][%# IF ( supplier.loop_basket.size ) %]
134                 </div>
135             </div>
136         [% END %][%# FOREACH supplier IN loop_suppliers %]
137     </div>
138 [% END %][%# IF ( loop_suppliers.size ) %]
139 </div>
140 </div>
141 <div class="yui-b">
142 [% INCLUDE 'acquisitions-menu.inc' %]
143 </div>
144 </div>
145 [% INCLUDE 'intranet-bottom.inc' %]