Bug 36064: Add holds with cancellation request info to staff interface main page
To Test: 1. APPLY PATCH, restart_all 2. Make some holds 3. Make sure there is a Default waiting hold cancellation policy. 4. Make the holds watiing by checking them in. 5. Go to the OPAC and request to cancel. 6. Go to the staff interface home page, you should see 'Holds with cancellation requests: X'. 7. Cancel the hold. 8. Back on the main page it should not be counted again the number for 'Holds with cancellation requests: X' 9. Log in as a staff member with Staff access but without circulate_remaining_permissions. 10. You should not see the 'Holds with cancellation requests: X' line. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
a50eacf11d
commit
f0a08c3608
|
|
@ -180,7 +180,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_suggestions_suggestions_manage && ( pendingsuggestions || all_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('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && pending_biblio_tickets && CAN_user_editcatalogue_edit_catalogue ) || ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) || already_ran_jobs || new_curbside_pickups.count %]
|
||||
[% IF ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_suggestions_suggestions_manage && ( pendingsuggestions || all_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('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && pending_biblio_tickets && CAN_user_editcatalogue_edit_catalogue ) || ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) || already_ran_jobs || new_curbside_pickups.count || ( holds_with_cancellation_requests && CAN_user_circulate_circulate_remaining_permissions ) %]
|
||||
<div id="area-pending" class="page-section">
|
||||
[% IF pending_article_requests %]
|
||||
<div class="pending-info" id="article_requests_pending">
|
||||
|
|
@ -269,6 +269,12 @@
|
|||
</div>
|
||||
[% END %]
|
||||
|
||||
[% IF holds_with_cancellation_requests && CAN_user_circulate_circulate_remaining_permissions %]
|
||||
<div class="pending-info" id="holds_with_cancellation_requests">
|
||||
<a href="/cgi-bin/koha/circ/waitingreserves.pl?allbranches=1#holdscancelled_panel">Holds with cancellation requests</a>:
|
||||
<span class="pending-number-link">[% holds_with_cancellation_requests | html %]</span>
|
||||
</div>
|
||||
[% END %]
|
||||
</div>
|
||||
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -125,6 +125,8 @@ unless ( $logged_in_user->has_permission( { parameters => 'manage_background_job
|
|||
$template->param( already_ran_jobs => $already_ran_jobs );
|
||||
}
|
||||
|
||||
my $holds_with_cancellation_requests = Koha::Holds->waiting->search()->filter_by_has_cancellation_requests->count;
|
||||
|
||||
if ( C4::Context->preference('CurbsidePickup') ) {
|
||||
$template->param(
|
||||
new_curbside_pickups => Koha::CurbsidePickups->search(
|
||||
|
|
@ -141,7 +143,8 @@ $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
|
||||
pending_problem_reports => $pending_problem_reports,
|
||||
holds_with_cancellation_requests => $holds_with_cancellation_requests,
|
||||
);
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
Loading…
Reference in New Issue