Koha/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc
Owen Leonard 36aa22d3c8 Bug 9674 - Replace YUI buttons and menu on acquisitions pages with Bootstrap
This patch converts the toolbar on acquisitions pages to Bootstrap,
replacing YUI button code with Bootstrap markup.

To test, view acquisitions pages and confirm that buttons look correct
and work correctly:

- acqui-home.pl (Acquisitions home page)
- booksellers.pl (Acquisitions -> Vendor search)
- supplier.pl (Acquisitions -> Vendor search -> Vendor)
- aqcontract.pl (Acquisitions -> Vendor search -> Vendor -> Contracts)
- uncertainprice.pl (Aquisitions -> Vendor search -> Vendor -> Uncertain
  prices)

View these pages for vendors with and without orders.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Buttons works. No errors.
Tested vendors with and without orders (delete button in last case)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, changes are consistent.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-02 12:22:07 -05:00

40 lines
2.2 KiB
HTML

<script type="text/javascript">
//<![CDATA[
function confirm_deletion() {
if (confirm(_("Are you sure you want to delete this vendor?"))) {
window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=delete";
}
}
//]]>
</script>
<div id="toolbar" class="btn-toolbar">
[% IF ( booksellerid ) %]
<div class="btn-group">
<a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-plus"></i> New
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
[% IF ( CAN_user_acquisition_order_manage ) %]
<li><a href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% booksellerid %]&amp;op=add_form">Basket</a></li>
[% END %]
[% IF ( CAN_user_acquisition_contracts_manage ) %]
<li><a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;booksellerid=[% booksellerid %]">Contract</a></li>
[% END %]
[% IF ( CAN_user_acquisition_vendors_manage ) %]
<li><a href="/cgi-bin/koha/acqui/supplier.pl?op=enter">Vendor</a></li>
[% END %]
</ul>
</div>
[% IF ( CAN_user_acquisition_vendors_manage ) %]
<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>
[% UNLESS ( basketcount OR subscriptioncount ) %]
<div class="btn-group"><a class="btn btn-small" id="deletesupplier" href="javascript:confirm_deletion()"><i class="icon-remove"></i> Delete vendor</a></div>
[% END %]
[% END %]
[% IF ( CAN_user_acquisition_order_receive && basketcount ) %]
<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>
[% END %]
[% ELSE %]
<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>
[% END %]
</div>