Lines 25-31
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; |
Lines 33-38
use Koha::Reviews;
Link Here
|
33 |
use Koha::ArticleRequests; |
32 |
use Koha::ArticleRequests; |
34 |
use Koha::ProblemReports; |
33 |
use Koha::ProblemReports; |
35 |
use Koha::Quotes; |
34 |
use Koha::Quotes; |
|
|
35 |
use Koha::Suggestions; |
36 |
|
36 |
|
37 |
my $query = new CGI; |
37 |
my $query = new CGI; |
38 |
|
38 |
|
Lines 68-74
my $branch =
Link Here
|
68 |
|
68 |
|
69 |
my $pendingcomments = Koha::Reviews->search_limited({ approved => 0 })->count; |
69 |
my $pendingcomments = Koha::Reviews->search_limited({ approved => 0 })->count; |
70 |
my $pendingtags = get_count_by_tag_status(0); |
70 |
my $pendingtags = get_count_by_tag_status(0); |
71 |
my $pendingsuggestions = CountSuggestion("ASKED"); |
71 |
|
|
|
72 |
# Get current branch count and total viewable count, if they don't match then pass |
73 |
# both to template |
74 |
|
75 |
if( C4::Context->only_my_library ){ |
76 |
my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'} })->count(); |
77 |
$template->param( pendingsuggestions => $local_pendingsuggestions_count ); |
78 |
} else { |
79 |
my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED" }); |
80 |
my $local_pendingsuggestions_count = $pendingsuggestions->search({ 'me.branchcode' => C4::Context->userenv()->{'branch'} })->count(); |
81 |
my $pendingsuggestions_count = $pendingsuggestions->count(); |
82 |
$template->param( |
83 |
all_pendingsuggestions => $pendingsuggestions_count != $local_pendingsuggestions_count ? $pendingsuggestions_count : 0, |
84 |
pendingsuggestions => $local_pendingsuggestions_count |
85 |
); |
86 |
} |
87 |
|
72 |
my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count( $branch ); |
88 |
my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count( $branch ); |
73 |
my $pending_discharge_requests = Koha::Patron::Discharge::count({ pending => 1 }); |
89 |
my $pending_discharge_requests = Koha::Patron::Discharge::count({ pending => 1 }); |
74 |
my $pending_article_requests = Koha::ArticleRequests->search_limited( |
90 |
my $pending_article_requests = Koha::ArticleRequests->search_limited( |
Lines 82-88
my $pending_problem_reports = Koha::ProblemReports->search({ status => 'New' });
Link Here
|
82 |
$template->param( |
98 |
$template->param( |
83 |
pendingcomments => $pendingcomments, |
99 |
pendingcomments => $pendingcomments, |
84 |
pendingtags => $pendingtags, |
100 |
pendingtags => $pendingtags, |
85 |
pendingsuggestions => $pendingsuggestions, |
|
|
86 |
pending_borrower_modifications => $pending_borrower_modifications, |
101 |
pending_borrower_modifications => $pending_borrower_modifications, |
87 |
pending_discharge_requests => $pending_discharge_requests, |
102 |
pending_discharge_requests => $pending_discharge_requests, |
88 |
pending_article_requests => $pending_article_requests, |
103 |
pending_article_requests => $pending_article_requests, |
89 |
- |
|
|