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