Bug 12150 - Use more javascript string formatting in intranet for translated strings.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / acquisitions-toolbar.inc
1 <script type="text/javascript">
2 //<![CDATA[
3 function confirm_deletion() {
4     if (confirm(_("Are you sure you want to delete this vendor?"))) {
5         window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=delete";
6     }
7 }
8 //]]>
9 </script>
10 <div id="toolbar" class="btn-toolbar">
11     [% IF ( booksellerid ) %]
12         <div class="btn-group">
13         <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-plus"></i> New
14         <span class="caret"></span>
15         </a>
16         <ul class="dropdown-menu">
17             [% IF ( CAN_user_acquisition_order_manage ) %]
18                 <li><a href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% booksellerid %]&amp;op=add_form">Basket</a></li>
19             [% END %]
20             [% IF ( CAN_user_acquisition_contracts_manage ) %]
21                 <li><a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;booksellerid=[% booksellerid %]">Contract</a></li>
22             [% END %]
23             [% IF ( CAN_user_acquisition_vendors_manage ) %]
24                 <li><a href="/cgi-bin/koha/acqui/supplier.pl?op=enter">Vendor</a></li>
25             [% END %]
26         </ul>
27         </div>
28             [% IF ( CAN_user_acquisition_vendors_manage ) %]
29                 <div class="btn-group"><a class="btn btn-small" id="editsupplier" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&amp;op=enter"><i class="icon-pencil"></i> Edit vendor</a></div>
30                 [% UNLESS ( basketcount OR subscriptioncount ) %]
31                     <div class="btn-group"><a class="btn btn-small" id="deletesupplier" href="javascript:confirm_deletion()"><i class="icon-remove"></i> Delete vendor</a></div>
32                 [% END %]
33             [% END %]
34             [% IF ( CAN_user_acquisition_order_receive && basketcount ) %]
35                 <div class="btn-group"><a class="btn btn-small" id="receive" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]"><i class="icon-inbox"></i> Receive shipments</a></div>
36             [% END %]
37         [% ELSE %]
38             <div class="btn-group"><a class="btn btn-small" href="/cgi-bin/koha/acqui/supplier.pl?op=enter"><i class="icon-plus"></i> New vendor</a></div>
39         [% END %]
40 </div>