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