Bug 26712: Set focus for cursor to basket name input box on basketheader.pl
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / uncertainprice.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% PROCESS 'i18n.inc' %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername | html %][% ELSE %]Orders with uncertain prices[% END %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 </head>
10
11 <body id="acq_uncertainprice" class="acq">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'acquisitions-search.inc' %]
14
15 <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 ( booksellername ) %]<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a> &rsaquo; Uncertain prices for vendor [% booksellername | html %][% ELSE %]Uncertain prices[% END %]</div>
16
17 <div class="main container-fluid">
18     <div class="row">
19         <div class="col-sm-10 col-sm-push-2">
20             <main>
21
22 [% INCLUDE 'acquisitions-toolbar.inc' %]
23         [% IF ( validate ) %]
24             [% SET metacontent = '0; url=' _  scriptname  _ '?booksellerid=' _  booksellerid %]
25             <META HTTP-EQUIV=Refresh CONTENT="[% metacontent | html %]">
26         [% ELSE %]
27         [% IF ( booksellername ) %]
28             <h1>Orders with uncertain prices for vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
29             <h2>Contact information</h2>
30             <p><strong>Address: </strong>
31                 [% booksellerpostal | html %]
32                 [% bookselleraddress1 | html %]
33                 [% bookselleraddress2 | html %]
34                 [% bookselleraddress3 | html %]
35                 [% bookselleraddress4 | html %]
36             </p>
37             <p><strong>Phone: </strong>
38                 [% booksellerphone | html %] / Fax:
39             <dl>
40                 [% FOREACH contact IN contacts %]
41                     <dt><strong>Contact: </strong></dt>
42                     <dd>[% contact.name | html %]
43                         [% contact.position | html %]
44                         [% contact.phone | html %]
45                         [% contact.altphone | html %]
46                         [% contact.email | html %]
47                         [% contact.notes | html %]
48                     </dd>
49                 [% END %]
50             </dl>
51             [% IF ( booksellernotes ) %]
52             <p><strong>Notes: </strong>
53                 [% booksellernotes | html %]</p>
54             [% END %]
55         [% END %]
56
57         <h2>Orders with uncertain prices</h2>
58         <form action="[% scriptname | html %]" method="post">
59         <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
60         <label for="owner">Orders from:</label>
61         <select id="owner" name="owner">
62             [% IF ( owner ) %]
63             <option value="0">Everyone</option>
64             <option value="1" selected="selected">me</option>
65             [% ELSE %]
66             <option value="0" selected="selected">Everyone</option>
67             <option value="1">me</option>
68             [% END %]
69         </select>
70         <input type="submit" value="Filter" />
71         </form>
72         <form action="[% scriptname | html %]" method="post" id="uncertainprices">
73         <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
74         <input type="hidden" name="op" value="validate" />
75         <table id="uncertainpricet">
76         <thead>
77             <tr>
78             <th>Basket</th>
79            <th>[% tp('noun', 'Order') | html %]</th>
80             <th>By</th>
81             <th>Uncertain</th>
82             <th>Price</th>
83             <th>Quantity</th>
84             </tr>
85         </thead>
86         <tbody>
87             [% FOREACH uncertainpriceorder IN uncertainpriceorders %]
88             <tr>
89         <td>
90             [% uncertainpriceorder.basketname | html %]
91         </td>
92             <td>
93             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% uncertainpriceorder.biblionumber | uri %]">[% uncertainpriceorder.title | html %]</a>
94             [% IF ( uncertainpriceorder.author ) %] <em>by</em> [% uncertainpriceorder.author | html %][% END %]
95             [% IF ( uncertainpriceorder.publishercode ) %]
96                 <br /><em>Publisher:</em> [% uncertainpriceorder.publishercode | html %]
97                 [%- IF    ( uncertainpriceorder.publicationyear ) -%], [% uncertainpriceorder.publicationyear | html %]
98                 [%- ELSIF ( uncertainpriceorder.copyrightdate ) -%] [% uncertainpriceorder.copyrightdate | html %]
99                 [% END %]
100             [% END %]
101             [% IF ( uncertainpriceorder.isbn ) %]<br />[% uncertainpriceorder.isbn | html %][% END %]
102             <br />
103             <a href="neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% uncertainpriceorder.basketno | uri %]">
104                 Edit
105             </a>
106         </td>
107         <td>
108             [% uncertainpriceorder.firstname | html %] [% uncertainpriceorder.surname | html %]
109         </td>
110             <td>
111                 <input type="checkbox" name="uncertainprice[% uncertainpriceorder.ordernumber | html %]" value="1" checked="checked" />
112             </td>
113             <td>
114             <input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber | html %]" type="text" size="10" name="price[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.listprice | html %]" />
115             </td>
116             <td>
117         [% IF basket.effective_create_items == 'ordering' %]
118             [% uncertainpriceorder.quantity | html %]
119             <input type="hidden" name="qty[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.quantity | html %]" />
120         [% ELSE %]
121             <input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber | html %]" type="text" size="10" name="qty[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.quantity | html %]" />
122         [% END %]
123             </td>
124             </tr>
125             [% END %]
126     </tbody>
127         </table>
128     <fieldset class="action"><input type="submit" value="Save" /></fieldset>
129         </form>
130         [% END %]
131
132 </main>
133 </div> <!-- /.col-sm-10.col-sm-push-2 -->
134
135 <div class="col-sm-2 col-sm-pull-10">
136     <aside>
137         [% INCLUDE 'vendor-menu.inc' %]
138     </aside>
139 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
140 </div> <!-- /.row -->
141
142 [% MACRO jsinclude BLOCK %]
143     [% Asset.js("js/acquisitions-menu.js") | $raw %]
144     [% INCLUDE 'datatables.inc' %]
145     <script>
146         $(document).ready(function() {
147             var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
148                 "aoColumnDefs": [
149                     { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
150                 ],
151                 "sPaginationType": "full"
152             }));
153             $(".check_uncertain").on("change",function(){
154                 var form = document.getElementById("uncertainprices");
155                 var ordernumber = $(this).data("ordernumber");
156                 uncheckbox( form, ordernumber );
157             });
158         });
159     </script>
160     [% Asset.js("js/acq.js") | $raw %]
161 [% END %]
162
163 [% INCLUDE 'intranet-bottom.inc' %]