|
Lines 25-36
use C4::Output;
Link Here
|
| 25 |
use C4::Auth; |
25 |
use C4::Auth; |
| 26 |
use C4::Koha; |
26 |
use C4::Koha; |
| 27 |
use C4::NewsChannels; # GetNewsToDisplay |
27 |
use C4::NewsChannels; # GetNewsToDisplay |
| 28 |
use C4::Suggestions qw/CountSuggestion/; |
|
|
| 29 |
use C4::Tags qw/get_count_by_tag_status/; |
28 |
use C4::Tags qw/get_count_by_tag_status/; |
| 30 |
use Koha::Patron::Modifications; |
29 |
use Koha::Patron::Modifications; |
| 31 |
use Koha::Patron::Discharge; |
30 |
use Koha::Patron::Discharge; |
| 32 |
use Koha::Reviews; |
31 |
use Koha::Reviews; |
| 33 |
use Koha::ArticleRequests; |
32 |
use Koha::ArticleRequests; |
|
|
33 |
use Koha::Suggestions; |
| 34 |
|
34 |
|
| 35 |
my $query = new CGI; |
35 |
my $query = new CGI; |
| 36 |
|
36 |
|
|
Lines 65-71
my $branch =
Link Here
|
| 65 |
|
65 |
|
| 66 |
my $pendingcomments = Koha::Reviews->search_limited({ approved => 0 })->count; |
66 |
my $pendingcomments = Koha::Reviews->search_limited({ approved => 0 })->count; |
| 67 |
my $pendingtags = get_count_by_tag_status(0); |
67 |
my $pendingtags = get_count_by_tag_status(0); |
| 68 |
my $pendingsuggestions = CountSuggestion("ASKED"); |
68 |
|
|
|
69 |
# Get current branch count and total viewable count, if they don't match then pass |
| 70 |
# both to template |
| 71 |
my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED" }); |
| 72 |
my $local_pendingsuggestions_count = $pendingsuggestions->filter_by_user_branch(1)->count(); |
| 73 |
my $pendingsuggestions_count = $pendingsuggestions->filter_by_user_branch()->count(); |
| 74 |
$template->param( all_pendingsuggestions => $pendingsuggestions_count != $local_pendingsuggestions_count ? $pendingsuggestions_count : 0 ); |
| 75 |
|
| 69 |
my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count( $branch ); |
76 |
my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count( $branch ); |
| 70 |
my $pending_discharge_requests = Koha::Patron::Discharge::count({ pending => 1 }); |
77 |
my $pending_discharge_requests = Koha::Patron::Discharge::count({ pending => 1 }); |
| 71 |
my $pending_article_requests = Koha::ArticleRequests->search_limited( |
78 |
my $pending_article_requests = Koha::ArticleRequests->search_limited( |
|
Lines 78-84
my $pending_article_requests = Koha::ArticleRequests->search_limited(
Link Here
|
| 78 |
$template->param( |
85 |
$template->param( |
| 79 |
pendingcomments => $pendingcomments, |
86 |
pendingcomments => $pendingcomments, |
| 80 |
pendingtags => $pendingtags, |
87 |
pendingtags => $pendingtags, |
| 81 |
pendingsuggestions => $pendingsuggestions, |
88 |
pendingsuggestions => $local_pendingsuggestions_count, |
| 82 |
pending_borrower_modifications => $pending_borrower_modifications, |
89 |
pending_borrower_modifications => $pending_borrower_modifications, |
| 83 |
pending_discharge_requests => $pending_discharge_requests, |
90 |
pending_discharge_requests => $pending_discharge_requests, |
| 84 |
pending_article_requests => $pending_article_requests, |
91 |
pending_article_requests => $pending_article_requests, |
| 85 |
- |
|
|