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