Bugzilla – Attachment 162002 Details for
Bug 36064
Add information about holds with cancellation requests to staff start page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36064: Add holds with cancellation request info to staff interface main page
Bug-36064-Add-holds-with-cancellation-request-info.patch (text/plain), 5.43 KB, created by
ByWater Sandboxes
on 2024-02-10 17:09:22 UTC
(
hide
)
Description:
Bug 36064: Add holds with cancellation request info to staff interface main page
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2024-02-10 17:09:22 UTC
Size:
5.43 KB
patch
obsolete
>From 5c2fb897d302bea31716916ba3a9420d3ff725d4 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 9 Feb 2024 23:57:11 +0000 >Subject: [PATCH] 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: Christopher Brannon <cbrannon@cdalibrary.org> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 8 +++++++- > mainpage.pl | 2 ++ > 2 files changed, 9 insertions(+), 1 deletion(-) > >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 8a8bc4246c..ffd0938493 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -181,7 +181,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 || ( holds_to_pull && CAN_user_circulate_circulate_remaining_permissions ) %] >+ [% 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_to_pull && CAN_user_circulate_circulate_remaining_permissions ) || ( 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"> >@@ -276,6 +276,12 @@ > <span class="pending-number-link">[% holds_to_pull | html %]</span> > </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 %] >diff --git a/mainpage.pl b/mainpage.pl >index 254a2de308..1a132d4337 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -129,6 +129,7 @@ unless ( $logged_in_user->has_permission( { parameters => 'manage_background_job > } > > my $holds_to_pull = Koha::Holds->search( found => undef )->count; >+my $holds_with_cancellation_requests = Koha::Holds->waiting->search()->filter_by_has_cancellation_requests->count; > > if ( C4::Context->preference('CurbsidePickup') ) { > $template->param( >@@ -148,6 +149,7 @@ $template->param( > pending_article_requests => $pending_article_requests, > pending_problem_reports => $pending_problem_reports, > holds_to_pull => $holds_to_pull, >+ holds_with_cancellation_requests => $holds_with_cancellation_requests, > ); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36064
:
161998
|
161999
|
162002
|
162105
|
165796
|
165797
|
165798
|
165799
|
165809
|
165810
|
165823
|
165824
|
170654
|
170655
|
173159
|
173160
|
173161