Bug 31823: Add page-section to uncertain prices page (acq)
[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">Home</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
58             <div class="page-section">
59                 <h2>Contact information</h2>
60                 <p><strong>Address: </strong>
61                     [% booksellerpostal | html %]
62                     [% bookselleraddress1 | html %]
63                     [% bookselleraddress2 | html %]
64                     [% bookselleraddress3 | html %]
65                     [% bookselleraddress4 | html %]
66                 </p>
67                 <p><strong>Phone: </strong>
68                     [% booksellerphone | html %] / Fax:
69                 <dl>
70                     [% FOREACH contact IN contacts %]
71                         <dt><strong>Contact: </strong></dt>
72                         <dd>[% contact.name | html %]
73                             [% contact.position | html %]
74                             [% contact.phone | html %]
75                             [% contact.altphone | html %]
76                             [% contact.email | html %]
77                             [% contact.notes | html %]
78                         </dd>
79                     [% END %]
80                 </dl>
81                 [% IF ( booksellernotes ) %]
82                 <p><strong>Notes: </strong>
83                     [% booksellernotes | html %]</p>
84                 [% END %]
85             </div> <!-- /.page-section -->
86         [% END %]
87
88         <h1>Orders with uncertain prices</h1>
89
90         <div class="page-section">
91             <form action="[% scriptname | html %]" method="post">
92                 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
93                 <label for="owner">Orders from:</label>
94                 <select id="owner" name="owner">
95                     [% IF ( owner ) %]
96                         <option value="0">Everyone</option>
97                         <option value="1" selected="selected">me</option>
98                     [% ELSE %]
99                         <option value="0" selected="selected">Everyone</option>
100                         <option value="1">me</option>
101                     [% END %]
102                 </select>
103                 <input type="submit" class="btn btn-primary" value="Filter" />
104             </form>
105             <form action="[% scriptname | html %]" method="post" id="uncertainprices">
106                 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
107                 <input type="hidden" name="op" value="validate" />
108                 <table id="uncertainpricet">
109                     <thead>
110                         <tr>
111                             <th>Basket</th>
112                             <th>[% tp('noun', 'Order') | html %]</th>
113                             <th>By</th>
114                             <th class="NoSort">Uncertain</th>
115                             <th class="NoSort">Price</th>
116                             <th class="NoSort">Quantity</th>
117                             <th class="NoSort">Edit</th>
118                         </tr>
119                     </thead>
120                     <tbody>
121                         [% FOREACH uncertainpriceorder IN uncertainpriceorders %]
122                             <tr>
123                                 <td>
124                                     <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% uncertainpriceorder.basketno | uri %]">[% uncertainpriceorder.basketname | html %]</a>
125                                 </td>
126                                 <td>
127                                     [% INCLUDE 'biblio-title.inc' biblio=uncertainpriceorder link = 1 %]
128                                     [% IF ( uncertainpriceorder.author ) %] <em>by</em> [% uncertainpriceorder.author | html %][% END %]
129                                     [% IF ( uncertainpriceorder.publishercode ) %]
130                                         <br /><em>Publisher:</em> [% uncertainpriceorder.publishercode | html %]
131                                         [%- IF    ( uncertainpriceorder.publicationyear ) -%], [% uncertainpriceorder.publicationyear | html %]
132                                         [%- ELSIF ( uncertainpriceorder.copyrightdate ) -%] [% uncertainpriceorder.copyrightdate | html %]
133                                         [% END %]
134                                     [% END %]
135                                     [% IF ( uncertainpriceorder.isbn ) %]<br />[% uncertainpriceorder.isbn | html %][% END %]
136                                     <br />
137                                 </td>
138                                 <td>
139                                     [% uncertainpriceorder.firstname | html %] [% uncertainpriceorder.surname | html %]
140                                 </td>
141                                 <td>
142                                     <input type="checkbox" name="uncertainprice[% uncertainpriceorder.ordernumber | html %]" value="1" checked="checked" />
143                                 </td>
144                                 <td>
145                                     <input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber | html %]" type="text" size="10" name="price[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.listprice | html %]" />
146                                 </td>
147                                 <td>
148                                 [% IF basket.effective_create_items == 'ordering' %]
149                                     [% uncertainpriceorder.quantity | html %]
150                                     <input type="hidden" name="qty[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.quantity | html %]" />
151                                 [% ELSE %]
152                                     <input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber | html %]" type="text" size="10" name="qty[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.quantity | html %]" />
153                                 [% END %]
154                                 </td>
155                                 <td class="actions">
156                                     <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>
157                                 </td>
158                             </tr>
159                         [% END %]
160                     </tbody>
161                 </table>
162                 <fieldset class="action"><input type="submit" class="btn btn-primary" value="Save" /></fieldset>
163             </form>
164         </div> <!-- /.page-section -->
165         [% END %]
166
167 </main>
168 </div> <!-- /.col-sm-10.col-sm-push-2 -->
169
170 <div class="col-sm-2 col-sm-pull-10">
171     <aside>
172         [% INCLUDE 'vendor-menu.inc' %]
173     </aside>
174 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
175 </div> <!-- /.row -->
176
177 [% MACRO jsinclude BLOCK %]
178     [% Asset.js("js/acquisitions-menu.js") | $raw %]
179     [% Asset.js("js/acq.js") | $raw %]
180     [% INCLUDE 'datatables.inc' %]
181     <script>
182         $(document).ready(function() {
183             var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
184                 "aoColumnDefs": [
185                     { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
186                 ],
187                 "sPaginationType": "full"
188             }));
189             $(".check_uncertain").on("change",function(){
190                 var form = document.getElementById("uncertainprices");
191                 var ordernumber = $(this).data("ordernumber");
192                 uncheckbox( form, ordernumber );
193             });
194         });
195     </script>
196     [% Asset.js("js/acq.js") | $raw %]
197 [% END %]
198
199 [% INCLUDE 'intranet-bottom.inc' %]