Bug 4461: Add problem reports link to mainpage and admin home

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Aleisha Amohia 2020-03-10 22:52:29 +00:00 committed by Martin Renvoize
parent c95ae98d60
commit 12d2d3f69b
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
4 changed files with 18 additions and 1 deletions

View File

@ -151,6 +151,9 @@
[% IF ( Koha.Preference('EnableAdvancedCatalogingEditor') && CAN_user_parameters_manage_keyboard_shortcuts ) %]
<li><a href="/cgi-bin/koha/admin/adveditorshortcuts.pl">Keyboard shortcuts</a></li>
[% END %]
[% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %]
<li><a href="/cgi-bin/koha/admin/problem-reports.pl">OPAC problem reports</a></li>
[% END %]
</ul>
[% END %]
</div>

View File

@ -238,6 +238,10 @@
<dt><a href="/cgi-bin/koha/admin/adveditorshortcuts.pl">Keyboard shortcuts</a></dt>
<dd>Define which keys trigger actions in the advanced cataloging editor</dd>
[% END %]
[% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %]
<dt><a href="/cgi-bin/koha/admin/problem-reports.pl">OPAC problem reports</a></dt>
<dd>Manage OPAC problem reports submitted by patrons</dd>
[% END %]
</dl>
[% END %]
</div>

View File

@ -134,7 +134,7 @@
<div class="row">
<div class="col-sm-12">
[%# 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 ) %]
<div id="area-pending">
[% IF pending_article_requests %]
<div class="pending-info" id="article_requests_pending">
@ -188,6 +188,13 @@
</div>
[% END %]
[% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports ) %]
<div class="pending-info" id="problem_reports_pending">
<a href="/cgi-bin/koha/admin/problem-reports.pl">OPAC problem reports pending</a>:
<span class="pending-number-link">[% pending_problem_reports.count | html %]</span>
</div>
[% END %]
</div>
[% END %]

View File

@ -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;