use C4::Members;
use C4::Branch;
use C4::Debug;
+use C4::Suggestions;
my $query = CGI->new;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
);
}
+my $status = $query->param('status') || "ASKED";
+my $suggestions_count = CountSuggestion($status);
+
my $budget_arr =
GetBudgetHierarchy( '', $user->{branchcode},
$template->{param_map}->{'USER_INFO'}[0]->{'borrowernumber'} );
}
$template->param(
-
type => 'intranet',
loop_budget => $budget_arr,
branchname => $branchname,
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;
<ul>
<li><a href="/cgi-bin/koha/acqui/lateorders.pl">Late orders</a></li>
- <li><!-- TMPL_IF name="suggestion" --> <a href="/cgi-bin/koha/suggestion/suggestion.pl"><!--TMPL_VAR NAME="suggestion" --> suggestions waiting</a>
- <!-- TMPL_ELSE --> <a href="/cgi-bin/koha/suggestion/suggestion.pl">No suggestions waiting</a> <!-- /TMPL_IF -->
- </li>
- <li><a href="/cgi-bin/koha/suggestion/suggestion.pl">Manage suggestions</a></li>
+ <!-- TMPL_IF NAME="suggestion" --><li><a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a></li><!-- TMPL_ELSE --><!-- /TMPL_IF -->
<!-- TMPL_IF name="CAN_user_acquisition_budget_manage" -->
<li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets & Funds</a></li>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</fieldset>
</div>
+
+<!-- TMPL_IF NAME="suggestion" --><!-- TMPL_IF name="suggestions_count" -->
+<div id="acqui_acqui_home_suggestions">
+ <fieldset>
+ <legend>Pending suggestions</legend>
+ <p><!--TMPL_VAR NAME="suggestions_count" --> suggestions waiting. <a href="/cgi-bin/koha/suggestion/suggestion.pl">Manage suggestions</a>.</p>
+ </fieldset>
+</div><!-- /TMPL_IF --><!-- /TMPL_IF -->
+
</div>
<div class="yui-u">