[biblibre-newacq] (bug #3611) improve aqbudgetperiods
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Mon, 14 Sep 2009 13:56:28 +0000 (15:56 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 30 Sep 2009 09:30:31 +0000 (11:30 +0200)
Adds New Budget button periods list.
Show "Budgets" and "Budget Planning" menus only if we're in a budget period

koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl

index 79dc451..0071f99 100644 (file)
                 ]
 
 // IF THERE IS NO BUDGETS DEFINED YET, THEN DISPLAY PERIOD BUTTON *ONLY*
-<!-- TMPL_UNLESS NAME="period_button_only" -->
+<!-- TMPL_IF NAME="budget_period_id" -->
 
                 var budgets_menu = [
-                        { text: _("Display budgets"), url: "/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->" },
+                        { text: _("Display budgets"), url: "/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->" },                        
                         { 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" -->"
                            <!-- TMPL_IF NAME="budget_period_locked" -->,  id:'disabled' <!-- /TMPL_IF  -->
                            <!-- TMPL_UNLESS NAME="CAN_user_acquisition_budget_add_del" -->,  id:'disabled' <!-- /TMPL_UNLESS  -->
@@ -67,7 +67,7 @@
 
 
 
-<!-- /TMPL_UNLESS  -->
+<!-- /TMPL_IF  -->
 
             new YAHOO.widget.Button({
                 type: "menu",
index b3c3e5c..7232ea9 100644 (file)
             <a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;budget_period_id=<!-- TMPL_VAR name="budget_period_id" escape="HTML" -->">Edit</a>
             <a href="<!-- TMPL_VAR name="script_name"-->?op=delete_confirm&amp;budget_period_id=<!-- TMPL_VAR name="budget_period_id" -->">Delete</a>
             <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR name="budget_period_id" -->">Budgets</a>
+               <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Add Budget</a>
         </td>
         </tr>
     <!-- /TMPL_LOOP -->