From f7c95d3c6782645e05caaa5fffc2fcca3ff015ed Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 10 Mar 2020 22:52:29 +0000 Subject: [PATCH] Bug 4461: Add problem reports link to mainpage and admin home Signed-off-by: Martin Renvoize Signed-off-by: David Nind --- koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc | 3 +++ koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 9 ++++++++- mainpage.pl | 3 +++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc index fd5d5953a6..c5bd432b9e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc @@ -151,6 +151,9 @@ [% IF ( Koha.Preference('EnableAdvancedCatalogingEditor') && CAN_user_parameters_manage_keyboard_shortcuts ) %]
  • Keyboard shortcuts
  • [% END %] + [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %] +
  • OPAC problem reports
  • + [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt index dc162f47df..fded276005 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt @@ -238,6 +238,10 @@
    Keyboard shortcuts
    Define which keys trigger actions in the advanced cataloging editor
    [% END %] + [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %] +
    OPAC problem reports
    +
    Manage OPAC problem reports submitted by patrons
    + [% END %] [% END %] 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 f6a213523e..e094e74e59 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -134,7 +134,7 @@
    [%# Following statement must be in one line for translatability %] - [% IF ( ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests) || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count ) %] + [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count ) || ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports ) %]
    [% IF pending_article_requests %]
    @@ -188,6 +188,13 @@
    [% END %] + [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports ) %] +
    + OPAC problem reports pending: + [% pending_problem_reports.count | html %] +
    + [% END %] +
    [% END %] diff --git a/mainpage.pl b/mainpage.pl index 49f46fc272..75072b1073 100755 --- a/mainpage.pl +++ b/mainpage.pl @@ -31,6 +31,7 @@ use Koha::Patron::Modifications; use Koha::Patron::Discharge; use Koha::Reviews; use Koha::ArticleRequests; +use Koha::ProblemReports; my $query = new CGI; @@ -74,6 +75,7 @@ my $pending_article_requests = Koha::ArticleRequests->search_limited( $branch ? ( 'me.branchcode' => $branch ) : (), } )->count; +my $pending_problem_reports = Koha::ProblemReports->search({ status => 'N' }); $template->param( pendingcomments => $pendingcomments, @@ -82,6 +84,7 @@ $template->param( pending_borrower_modifications => $pending_borrower_modifications, pending_discharge_requests => $pending_discharge_requests, pending_article_requests => $pending_article_requests, + pending_problem_reports => $pending_problem_reports ); output_html_with_http_headers $query, $cookie, $template->output; -- 2.11.0