[Patches] [PATCH] Bug 7259 - Show a count of items pending approval on staff client home and tools pages
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Thu Dec 8 04:10:02 NZDT 2011
From: Owen Leonard <oleonard at myacpl.org>
Date: Wed, 7 Dec 2011 10:02:56 -0500
Subject: [PATCH] Bug 7259 - Show a count of items pending approval on staff client home and tools pages
Content-Type: text/plain; charset="utf-8"
- Correcting permissions checks on the home page
- Adding default parameter (1) to numberofreviews subroutine
---
C4/Review.pm | 3 ++-
.../intranet-tmpl/prog/en/modules/intranet-main.tt | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/C4/Review.pm b/C4/Review.pm
index d74f077..49d90b3 100644
--- a/C4/Review.pm
+++ b/C4/Review.pm
@@ -91,7 +91,8 @@ sub updatereview {
}
sub numberofreviews {
- my ($status) = @_;
+ my ($param) = @_;
+ my $status = (defined($param) ? $param : 1);
my $dbh = C4::Context->dbh;
my $query =
"SELECT count(*) FROM reviews WHERE approved=?";
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt
index 3eb0b21..12861f6 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt
@@ -97,8 +97,8 @@
<h3><a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a></h3>
[% IF ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) %]
<ul>
- [% IF ( pendingcomments ) %]<li><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">[% pendingcomments %]</a></span></li>[% END %]
- [% IF ( pendingtags ) %]<li><a href="/cgi-bin/koha/tags/review.pl">Tags pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/tags/review.pl">[% pendingtags %]</a></span></li>[% END %]
+ [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) %]<li><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">[% pendingcomments %]</a></span></li>[% END %]
+ [% IF ( CAN_user_tools_moderate_tags && pendingtags ) %]<li><a href="/cgi-bin/koha/tags/review.pl">Tags pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/tags/review.pl">[% pendingtags %]</a></span></li>[% END %]
</ul>
[% END %]
[% END %]
--
1.7.3
More information about the Patches
mailing list