From 4fed97397a3986fbba4a5cddaf3bfaa38eb870cd Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 7 Sep 2010 15:48:03 +0200 Subject: [PATCH] Fix for Bug 4498 - Acq always shows '1 suggestions waiting' - Removing 'suggestions waiting' link from left-hand menu. A plain 'suggestions' link is still shown if suggestions are enabled. - Putting back the 'pending suggestions' box that used to appear on the Acquisitions home page. This will show, with a count of pending suggestions, only if suggestions are turned on and there are pending suggestions. Signed-off-by: Katrin Fischer Signed-off-by: Chris Cormack (cherry picked from commit d9de6ebab3ecca5e967c658541c0ec62db0ae2e7) Signed-off-by: Chris Nighswonger --- acqui/acqui-home.pl | 6 +++++- .../intranet-tmpl/prog/en/includes/acquisitions-menu.inc | 5 +---- .../intranet-tmpl/prog/en/modules/acqui/acqui-home.tmpl | 9 +++++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index 45a04bf25e..ed96a9eba6 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -38,6 +38,7 @@ use C4::Budgets; use C4::Members; use C4::Branch; use C4::Debug; +use C4::Suggestions; my $query = CGI->new; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -74,6 +75,9 @@ if ( $cur_format eq 'FR' ) { ); } +my $status = $query->param('status') || "ASKED"; +my $suggestions_count = CountSuggestion($status); + my $budget_arr = GetBudgetHierarchy( '', $user->{branchcode}, $template->{param_map}->{'USER_INFO'}[0]->{'borrowernumber'} ); @@ -123,7 +127,6 @@ foreach my $budget ( @{$budget_arr} ) { } $template->param( - type => 'intranet', loop_budget => $budget_arr, branchname => $branchname, @@ -132,6 +135,7 @@ $template->param( totordered => $num_formatter->format_price($totordered), totcomtd => $num_formatter->format_price($totcomtd), totavail => $num_formatter->format_price($totavail), + suggestions_count => $suggestions_count, ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc index 07e24de576..392a6c52bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc @@ -1,9 +1,6 @@