Koha/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc
Owen Leonard 7fcff602f5 Bug 7113: Standardize vendor id name in templates and scripts
New revision updates for current master and cleans up new
instances introduced by recent commits.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2 problems found, fixing those in follo up patches:
- late orders don't allow more than 1 order to be selected
- basketgroups: 'Edit vendor' does the same as 'Manage orders'
2012-02-17 19:04:00 +01:00

59 lines
2.8 KiB
HTML

<div id="toolbar"><script type="text/javascript">
//<![CDATA[
// prepare DOM for YUI Toolbar
$(document).ready(function() {
yuiToolbar();
});
// YUI Toolbar Functions
function yuiToolbar() {
new YAHOO.widget.Button("newperiod");
new YAHOO.widget.Button("newbudget");
new YAHOO.widget.Button("newsupplier");
new YAHOO.widget.Button("newbasket");
new YAHOO.widget.Button("editsupplier");
new YAHOO.widget.Button("receive");
new YAHOO.widget.Button("newcontract");
new YAHOO.widget.Button("editcontracts");
var manageorders = [
[% IF ( CAN_user_acquisition_order_manage ) %]
{ text: _("New basket"), url: "/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% booksellerid %]&op=add_form"},
{ text: _("Baskets"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]"},
{ text: _("Basket groups"), url: "/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid %]"},
[% END %]
{ text: _("Receive shipments"), url: "/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]" },
[% IF ( basketno ) %]
{ text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&owner=1"}
[% ELSE %]
{ text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1"}
[% END %]
]
[% IF ( booksellerid ) %]
[% IF ( basketcount ) %]
new YAHOO.widget.Button({type: "menu", label: _("Manage orders"), name: "manageorders", menu: manageorders, container: "toolbar-list"});
[% END %]
[% END %]
}
//]]>
</script>
<ul id="toolbar-list" class="toolbar">
[% IF ( booksellerid ) %]
[% IF ( CAN_user_acquisition_vendors_manage ) %]
<li><a id="editsupplier" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&amp;op=enter">Edit</a></li>
<li><a id="newcontract" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=[% booksellerid %]">New Contract</a></li>
<li><a id="editcontracts" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid %]">Contracts</a></li>
[% UNLESS ( basketcount ) %]
<li><a id="newbasket" href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% booksellerid %]&op=add_form">New Basket</a></li>
[% END %]
[% END %]
[% ELSE %]
<li><a id="newbudget" href="/cgi-bin/koha/acqui/supplier.pl?op=enter">New Vendor</a></li>
[% END %]
</ul>
</div>