From 8eac9d81805d436162839a7339d5b3c6e9c27e72 Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Thu, 1 Apr 2010 13:53:55 +0200 Subject: [PATCH] (BUG #4360) aqbudgets.pl: Adding the hierarchy of budgets in the tooltip Signed-off-by: Galen Charlton --- admin/aqbudgets.pl | 13 +++++++++++++ .../intranet-tmpl/prog/en/css/staff-global.css | 18 +++++++++++++++++- .../prog/en/modules/admin/aqbudgets.tmpl | 14 +++++++++++++- 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index 8d7bab75ab..8c6d2b4eaa 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -298,8 +298,21 @@ if ($op eq 'add_form') { $budget->{"budget_owner_name"} = $borrower->{'firstname'} . ' ' . $borrower->{'surname'}; $budget->{"budget_borrowernumber"} = $borrower->{'borrowernumber'}; + #Make a list of parents of the bugdet + my @budget_hierarchy; + push @budget_hierarchy, { element_name => $budget->{"budget_name"}, element_id => $budget->{"budget_id"} }; + my $parent_id = $budget->{"budget_parent_id"}; + while ($parent_id) { + my $parent = GetBudget($parent_id); + push @budget_hierarchy, { element_name => $parent->{"budget_name"}, element_id => $parent->{"budget_id"} }; + $parent_id = $parent->{"budget_parent_id"}; + } + push @budget_hierarchy, { element_name => $period->{"budget_period_description"} }; + @budget_hierarchy = reverse(@budget_hierarchy); + push( @loop, { %{$budget}, branchname => $branches->{ $budget->{branchcode} }->{branchname}, + budget_hierarchy => \@budget_hierarchy, } ); } 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 cf72ba848d..3519187b82 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1865,4 +1865,20 @@ img.spinner { } #cataloguing_additem_itemlist div { overflow : scroll; -} \ No newline at end of file +} +ul.budget_hierarchy { + margin-left: 0px; + padding-left: 0px; +} +ul.budget_hierarchy li { + display: inline; +} +ul.budget_hierarchy li:after { + content: " -> "; +} +ul.budget_hierarchy li:last-child:after { + content: ""; +} +ul.budget_hierarchy li:first-child:after { + content: ""; +} 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 baf13eab90..fdb74106d3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl @@ -198,7 +198,19 @@ style="color: red;" > - Owner: ">
Library:
Notes: + Owner: "> +
Library: +
Notes: + + + Edit Delete -- 2.39.5