From a078297d1fafdfa64f5a126bc72f024924f2b164 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 20 Jan 2010 15:43:52 -0500 Subject: [PATCH] Fix for Bugs 3998, 3968. Includes other markup corrections and reformats Bug 3998: Confusing warning on budget add page Bug 3968: Empty Blue Box Pop Up - Removed warning, made budget amount a required field. - Added conditional logic to prevent display of tooltip when there is no content - Moved filter form into sidebar - Changed Budgets.pm to pass an ID to a form field - Improvements to breadcrumbs and title tags - Restructured budgets admin toolbar to match existing toolbar patterns: "new," "edit," etc. --- C4/Budgets.pm | 1 + .../prog/en/css/staff-global.css | 21 +- ...ts-admin.inc => budgets-admin-toolbar.inc} | 91 ++-- .../en/modules/admin/aqbudgetperiods.tmpl | 18 +- .../prog/en/modules/admin/aqbudgets.tmpl | 408 +++++++++--------- .../prog/en/modules/admin/aqplan.tmpl | 5 +- 6 files changed, 265 insertions(+), 279 deletions(-) rename koha-tmpl/intranet-tmpl/prog/en/includes/{budgets-admin.inc => budgets-admin-toolbar.inc} (68%) diff --git a/C4/Budgets.pm b/C4/Budgets.pm index 3c3c4c3e40..8ef85edbf9 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -318,6 +318,7 @@ sub GetBudgetPermDropbox { $labels{'1'} = 'Owner'; $labels{'2'} = 'Library'; my $radio = CGI::scrolling_list( + -id => 'budget_permission', -name => 'budget_permission', -values => [ '0', '1', '2' ], -default => $perm, diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 548c1690fc..21ebc190c0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -239,7 +239,6 @@ table.invis tr,table.invis td { border : white; } - td, th { border-bottom : 1px solid #BCBCBC; border-left : 1px solid #BCBCBC; @@ -255,6 +254,12 @@ td.borderless { border : 0 none; } +td.data, +th.data { + font-family : "Courier New", Courier, monospace; + text-align : right; +} + th { background-color : #E8E8E8; font-weight : bold; @@ -523,6 +528,16 @@ div.yui-b fieldset.brief ol { div.yui-b fieldset.brief select { width: 12em; } +div.yui-b fieldset.brief li.radio { + padding : .7em 0; +} +div.yui-b fieldset.brief li.radio label { + display : inline; +} + +div.yui-b fieldset.brief li.radio input { + padding:0.3em 0; +} fieldset.rows { border-width : 1px; @@ -808,7 +823,7 @@ fieldset.rows .inputnote { visibility:visible; /* you propably don't need to change this one */ display:block; } -#newbiblio a, #addchild a, #newentry a, #newshelf a, #newmenuc .first-child, #newsupplier .first-child, #newlabel a, #newtemplate a, #newlabelbatch a, #newpatroncardbatch a, #newprofile a, #newsubscription a, #newdictionary a, #newbasket a { +#newbiblio a, #addchild a, #newentry a, #newshelf a, #newmenuc .first-child, #newsupplier .first-child, #newlabel a, #newtemplate a, #newlabelbatch a, #newpatroncardbatch a, #newprofile a, #newsubscription a, #newdictionary a, #newbasket a, #newrootbudget-button, #budgets_menuc .first-child, #periods_menuc .first-child { padding-left : 34px; background-image: url("../../img/toolbar-new.gif"); background-position : center left; @@ -904,7 +919,7 @@ fieldset.rows .inputnote { background-repeat : no-repeat; } -#editmenuc .first-child, #deleteshelf .first-child,#newmenuc .first-child, #addbiblio .first-child, #z3950search .first-child, #printmenuc .first-child, #newsupplier .first-child, #savemenuc .first-child { +#editmenuc .first-child, #deleteshelf .first-child,#newmenuc .first-child, #addbiblio .first-child, #z3950search .first-child, #printmenuc .first-child, #newsupplier .first-child, #savemenuc .first-child, #budgets_menuc .first-child, #periods_menuc .first-child { padding-left : 15px; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc similarity index 68% rename from koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin.inc rename to koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc index 480b08191d..b364dabd90 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc @@ -5,122 +5,107 @@ $(document).ready(function() { $("#periods_menuc").empty(); $("#budgets_menuc").empty(); - - + $("#newrootbudgetc").empty(); // IF THERE IS NO BUDGETS DEFINED YET, THEN DISPLAY PERIOD BUTTON *ONLY* $("#planning_menuc").empty(); - yuiToolbar(); }); // YUI Toolbar Functions function yuiToolbar() { + + var budgets_menu = [ + { text: _("New root budget"), url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form" }, + { text: _("New budget for ''"), url: "/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=" + , disabled:true + , disabled:true + } + ] + + var newrootbudgetButton = new YAHOO.widget.Button("newrootbudget"); + + + var periods_menu = [ - { text: _("Display all root budgets"), url: "/cgi-bin/koha/admin/aqbudgetperiods.pl" }, - { text: _("New root budget"), url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form" }, - { text: _("Edit root budget ''"), url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&budget_period_id=" }, - { text: _("Duplicate root budget ''"), }, - + { text: _("Duplicate root budget ''") } ] + // IF THERE IS NO BUDGETS DEFINED YET, THEN DISPLAY PERIOD BUTTON *ONLY* - var budgets_menu = [ - { text: _("Display budgets"), url: "/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=" }, - { text: _("New budget for ''"), url: "/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=" - , disabled:true - , disabled:true - }, - ] - - var planning_menu = [ + var planning_menu = [ - { text: _("Plan by MONTHS"), + { text: _("Plan by MONTHS"), url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=&authcat=MONTHS" , id:'disabled' }, - { text: _("Plan by BRANCHES"), - url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=&authcat=BRANCHES" + { text: _("Plan by BRANCHES"), + url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=&authcat=BRANCHES" , id:'disabled' }, - { text: _("Plan by ITEMTYPES"), - url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=&authcat=ITEMTYPES" + { text: _("Plan by ITEMTYPES"), + url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=&authcat=ITEMTYPES" , id:'disabled' }, - { text: _("Plan by "), + { text: _("Plan by "), url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=&authcat=" , id:'disabled' }, - - ] - - - - - new YAHOO.widget.Button({ + new YAHOO.widget.Button({ type: "menu", - label: _("Root Budgets"), + label: _("Edit"), name: "periods_button", menu: periods_menu, container: "periods_menuc" }); -// IF THERE IS NO BUDGETS DEFINED YET, THEN DISPLAY PERIOD BUTTON *ONLY* - - new YAHOO.widget.Button({ type: "menu", - label: _("Budgets"), + label: _("New"), name: "budgets_button", menu: budgets_menu, container: "budgets_menuc" }); - new YAHOO.widget.Button({ type: "menu", - label: _("Budget planning"), + label: _("Planning"), name: "planning_button", menu: planning_menu, container: "planning_menuc" }); - - - - + +// IF THERE IS NO BUDGETS DEFINED YET, THEN DISPLAY PERIOD BUTTON *ONLY* + + } //yui-toolbar... //]]> - + +
  • New Root Budget
  • +
  • New
  • +
  • Root Budgets
  • +
  • ">Budget planning
  • + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl index c29a9dab31..c226f7c692 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl @@ -47,7 +47,7 @@ alert(alertString2); } } - $(document).ready(function() { + $(document).ready(function() { $("#periodsh").tablesorter({ widgets : ['zebra'], sortList: [[0,0]], @@ -108,7 +108,7 @@ Root budgets - Cannot Delete root budget '' + Cannot delete root budget '' Delete root budget ''? @@ -117,7 +117,7 @@ - Root Budget administration + Root budgets administration @@ -126,7 +126,7 @@
    - + @@ -273,16 +273,15 @@ - + " title="View budgets for "> - ✓ - X + Active  + Locked  ?op=add_form&budget_period_id=">Edit ?op=delete_confirm&budget_period_id=">Delete - ">Budgets ">Add Budget @@ -297,8 +296,5 @@
    -
    - -
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl index 36240dbed9..3e567b2fb8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl @@ -1,34 +1,37 @@ -<!--TMPL_IF NAME="budget_id" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget +Koha › Administration › Budgets<!-- TMPL_IF name="add_form" --> › <!--TMPL_IF NAME="budget_id" -->Modify Budget<!-- TMPL_IF NAME="budget_name" --> '<!-- TMPL_VAR NAME="budget_name" -->'<!-- /TMPL_IF --><!-- TMPL_ELSE -->Add Budget <!-- /TMPL_IF --><!-- /TMPL_IF --> - + - +/lib/jquery/plugins/treetable/stylesheets/jquery.treeTable.css" rel="stylesheet" type="text/css" /> - - - + + + - - Koha › Administration › Budgets - - + AdministrationRoot budgetsBudgets for '' + ">BudgetsModify budget ''Add budget + Budgets › Delete budget?
    - +

    Budgets for ''

    - -
    -
    - Budget filters -
      -
    • - - -
    • -
    • - - - - - - -
    • -
    - - - " /> - -
    -
    - - - - - - - - - - - + + + + + + + + + + + - - - + + + + + + + + + + + + + + " class="highlight child-of-node- tooltiped"> @@ -210,49 +193,34 @@ - - - - + + + - - - + + + - - - - - - - - - - - - - - - - - + + + + +
    Budget hierarchyBudget nameTotal
    allocated
    Base-level
    allocated
    Base-level
    spent
    Base-level
    remaining
     Actions
    Budget hierarchyBudget nameTotal
    allocated
    Base-level
    allocated
    Base-level
    spent
    Base-level
    remaining
     Actions
    Period allocated
    STYLE="color: green;" - STYLE="color: red;" > + style="color: green;" + style="color: red;" > - "> - - - Edit Delete Owner: ">
    Library:
    Notes:
    Edit Delete - &budget_period_id=" >Edit - &budget_period_id=">Delete - &budget_period_id=">Add Sub-Budget + + &budget_period_id=" >Edit + &budget_period_id=">Delete + &budget_period_id=">Add Sub-Budget
    No budget found
    Period allocated
    No budget found
    -Currency =
    -
    +

    Currency =

    +
    @@ -261,9 +229,9 @@
    - ModifyAdd Root Budget + ModifyAdd Budget - + for period @@ -272,74 +240,69 @@
    1. - - - - " /> + Budget Parent: + + " />
    2. - +
    3. - + " size="30" />
    4. - + " size="60" />
    5. - + " size="8" />
    6. - + " size="8" /> -
      % before alert
    7. - - " size="8" /> -
      % before blocking
      + + " size="8" />" />
    8. -
    9. - + Owner: "> - - + +
    10. - - - +
    11. - +
    12. - - + +
    13. - +
    14. - + + " />
    - Cancel - + Cancel + " />
    @@ -391,7 +354,7 @@

    Delete Budget ?

    - +
    Budget Amount:Budget Amount:
    @@ -412,7 +375,36 @@
    - +
    +
    +

    Budget filters

    +
      +
    1. + + +
    2. +
    3. + + + + + + + +
    4. +
    + + + " /> + +
    +
    +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl index 25c1f5d167..0fd8915fe5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl @@ -99,7 +99,7 @@ YAHOO.util.Event.onAvailable("popmenu", function () {
    - +
    @@ -299,8 +299,5 @@ No budgets to display for this search criteria
    -
    - -
    -- 2.39.5