1 <div id="toolbar"><script type="text/javascript">
4 // prepare DOM for YUI Toolbar
5 $(document).ready(function() {
6 $("#periods_menuc").empty();
7 $("#budgets_menuc").empty();
11 // IF THERE IS NO BUDGETS DEFINED YET, THEN DISPLAY PERIOD BUTTON *ONLY*
12 <!-- TMPL_UNLESS NAME="period_button_only" -->
13 $("#planning_menuc").empty();
20 // YUI Toolbar Functions
22 function yuiToolbar() {
24 { text: _("Display all root budgets"), url: "/cgi-bin/koha/admin/aqbudgetperiods.pl" },
25 { text: _("New root budget"), url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form" },
26 <!-- TMPL_IF NAME="budget_period_id" -->
27 { text: _("Edit root budget '<!-- TMPL_VAR NAME="budget_period_description" -->'"), url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->" },
28 { text: _("Duplicate root budget '<!-- TMPL_VAR NAME="budget_period_description" -->'"), },
32 // IF THERE IS NO BUDGETS DEFINED YET, THEN DISPLAY PERIOD BUTTON *ONLY*
33 <!-- TMPL_IF NAME="budget_period_id" -->
36 { text: _("Display budgets"), url: "/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->" },
37 { text: _("New budget for '<!-- TMPL_VAR NAME="budget_period_description" -->'"), url: "/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->"
38 <!-- TMPL_IF NAME="budget_period_locked" -->, disabled:true<!-- /TMPL_IF -->
39 <!-- TMPL_UNLESS NAME="CAN_user_acquisition_budget_add_del" -->, disabled:true <!-- /TMPL_UNLESS -->
45 { text: _("Plan by MONTHS"),
46 url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->&authcat=MONTHS"
47 <!-- TMPL_UNLESS NAME="CAN_user_acquisition_planning_manage" -->, id:'disabled' <!-- /TMPL_UNLESS -->
50 { text: _("Plan by BRANCHES"),
51 url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->&authcat=BRANCHES"
52 <!-- TMPL_UNLESS NAME="CAN_user_acquisition_planning_manage" -->, id:'disabled' <!-- /TMPL_UNLESS -->
55 { text: _("Plan by ITEMTYPES"),
56 url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->&authcat=ITEMTYPES"
57 <!-- TMPL_UNLESS NAME="CAN_user_acquisition_planning_manage" -->, id:'disabled' <!-- /TMPL_UNLESS -->
60 <!-- TMPL_LOOP NAME="auth_cats_loop" -->
61 { text: _("Plan by <!-- TMPL_VAR NAME="authcat" --> "),
62 url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->&authcat=<!-- TMPL_VAR NAME="authcat" -->"
63 <!-- TMPL_UNLESS NAME="CAN_user_acquisition_planning_manage" -->, id:'disabled' <!-- /TMPL_UNLESS -->
74 new YAHOO.widget.Button({
76 label: _("Root Budgets"),
77 name: "periods_button",
79 container: "periods_menuc"
82 // IF THERE IS NO BUDGETS DEFINED YET, THEN DISPLAY PERIOD BUTTON *ONLY*
83 <!-- TMPL_UNLESS NAME="period_button_only" -->
85 new YAHOO.widget.Button({
88 name: "budgets_button",
90 container: "budgets_menuc"
94 new YAHOO.widget.Button({
96 label: _("Budget planning"),
97 name: "planning_button",
99 container: "planning_menuc"
102 <!-- /TMPL_UNLESS -->
116 <li id="periods_menuc"><a id="periods_menu" href="/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form">Root Budgets</a></li>
119 <!-- TMPL_UNLESS NAME="period_button_only" -->
120 <li id="budgets_menuc"><a id="budgets_menu" href="/cgi-bin/koha/cataloguing/addbiblio.pl">Budgets</a></li>
121 <li id="planning_menuc"><a id="planning_menu" href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Budget planning</a></li>
122 <!-- /TMPL_UNLESS -->