Bug 6072: fixing permission inconsistencies MT5306
[wip/koha-chris_n.git] / koha-tmpl / intranet-tmpl / prog / en / includes / acquisitions-toolbar.inc
1 <div id="toolbar"><script type="text/javascript">
2     //<![CDATA[
3
4     // prepare DOM for YUI Toolbar
5
6     $(document).ready(function() {
7         yuiToolbar();
8     });
9
10     // YUI Toolbar Functions
11
12     function yuiToolbar() {   
13     
14         new YAHOO.widget.Button("newperiod");
15         new YAHOO.widget.Button("newbudget");
16         new YAHOO.widget.Button("newsupplier");
17         new YAHOO.widget.Button("newbasket");
18         new YAHOO.widget.Button("editsupplier");
19         new YAHOO.widget.Button("receive");
20         new YAHOO.widget.Button("newcontract");
21         new YAHOO.widget.Button("editcontracts");
22
23         var manageorders = [
24             <!-- TMPL_IF name="CAN_user_acquisition_order_manage" -->
25                 { text: _("New basket"), url: "/cgi-bin/koha/acqui/basketheader.pl?booksellerid=<!-- TMPL_VAR NAME="id" -->&op=add_form"},
26                 { text: _("Baskets"), url: "/cgi-bin/koha/acqui/booksellers.pl?supplierid=<!--TMPL_VAR Name="id"-->"},
27                 { text: _("Basket groups"), url: "/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=<!-- TMPL_VAR NAME="id" -->"},
28             <!-- /TMPL_IF -->
29             { text: _("Receive shipments"), url: "/cgi-bin/koha/acqui/parcels.pl?supplierid=<!--TMPL_VAR Name="id"-->" },
30             <!-- TMPL_IF name="basketno" -->
31                 { text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=<!-- TMPL_VAR NAME="id" -->&basketno=<!--TMPL_VAR name="basketno" -->&owner=1"}
32             <!-- TMPL_ELSE -->
33                 { text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=<!-- TMPL_VAR NAME="id" -->&owner=1"}
34             <!-- /TMPL_IF -->
35         ]
36         <!-- TMPL_IF NAME="id" -->
37             <!-- TMPL_IF NAME="basketcount" -->
38                 new YAHOO.widget.Button({type: "menu", label: _("Manage orders"), name: "manageorders", menu: manageorders, container: "toolbar-list"});
39             <!-- /TMPL_IF -->
40         <!-- /TMPL_IF -->
41     }
42
43     //]]>
44     </script>
45     <ul id="toolbar-list" class="toolbar">
46         <!-- TMPL_IF NAME="id" -->
47             <!-- TMPL_IF name="CAN_user_acquisition_vendors_manage" -->
48                 <li><a id="editsupplier" href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!--TMPL_VAR Name="id"-->&amp;op=enter">Edit</a></li>
49                 <li><a id="newcontract" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=<!-- TMPL_VAR name="id" -->">New Contract</a></li>
50                 <li><a id="editcontracts" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=<!-- TMPL_VAR name="id" -->">Contracts</a></li>
51                 <!-- TMPL_UNLESS NAME="basketcount" -->
52                     <li><a id="newbasket" href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=<!-- TMPL_VAR name="id" -->&op=add_form">New Basket</a></li>
53                 <!-- /TMPL_UNLESS -->
54             <!-- /TMPL_IF -->
55         <!-- TMPL_ELSE -->
56             <li><a id="newbudget" href="/cgi-bin/koha/acqui/supplier.pl?op=enter">New Vendor</a></li>
57         <!-- /TMPL_IF -->
58     </ul>
59 </div>