Bugzilla – Attachment 190835 Details for
Bug 36073
Add holds queue notification to the staff interface home page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36073: Add holds queue notification to mainpage
Bug-36073-Add-holds-queue-notification-to-mainpage.patch (text/plain), 5.63 KB, created by
Lucas Gass (lukeg)
on 2026-01-02 16:05:18 UTC
(
hide
)
Description:
Bug 36073: Add holds queue notification to mainpage
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2026-01-02 16:05:18 UTC
Size:
5.63 KB
patch
obsolete
>From ccf43538a292d311b10f3798d7bb103a862cfff0 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 2 Jan 2026 16:04:04 +0000 >Subject: [PATCH] Bug 36073: Add holds queue notification to mainpage > >1. Make some holds for several different branches >2. Build the holds queue ( perl /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl ) >3. From the mainpage you should now see something like: > > Holds queue: Midway: 1 / All libraries: 1 >4. CLick on the link to make sure the link works and the count is accurate >5. Test this with both superlibrarians and staff you have the 'circulate_circulate_remaining_permissions' permission. >--- > .../prog/en/modules/intranet-main.tt | 17 ++++++++++++++++- > mainpage.pl | 10 ++++++++++ > 2 files changed, 26 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 db64bc30b99..d4680e1ac32 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -186,7 +186,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_with_cancellation_requests && CAN_user_circulate_circulate_remaining_permissions ) || self_registered_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 ) || self_registered_count || CAN_user_circulate_circulate_remaining_permissions && holds_queue_count %] > <div id="area-pending" class="page-section"> > [% IF pending_article_requests %] > <div class="pending-info" id="article_requests_pending"> >@@ -280,6 +280,21 @@ > </div> > [% END %] > >+ [% IF CAN_user_circulate_circulate_remaining_permissions && holds_queue_count %] >+ <div class="pending-info" id="holds_queue"> >+ Holds queue: >+ [% IF local_holds_queue_count %] >+ <a href="/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=[% Branches.GetLoggedInBranchcode | uri %]&run_report=1"> >+ <span class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% local_holds_queue_count | html %]</span> >+ </a> >+ / >+ [% END %] >+ <a href="/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=&run_report=1"> >+ <span class="pending-number-link">All libraries: [% holds_queue_count | html %]</span> >+ </a> >+ </div> >+ [% END %] >+ > [% IF new_curbside_pickups.count %] > <div class="pending-info" id="new_curbside_pickups"> > <a href="/cgi-bin/koha/circ/curbside_pickups.pl">New curbside pickups</a>: >diff --git a/mainpage.pl b/mainpage.pl >index 64b86fab2e6..f2438fce79a 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -152,6 +152,16 @@ my $local_holds_to_pull = Koha::Holds->search( > { join => 'item' } > )->count; > >+my $holds_queue_count = Koha::Hold::HoldsQueueItems->search()->count; >+ >+my $local_holds_queue_count = >+ Koha::Hold::HoldsQueueItems->search( { 'me.holdingbranch' => C4::Context->userenv()->{'branch'} } )->count; >+ >+$template->param( >+ holds_queue_count => $holds_queue_count, >+ local_holds_queue_count => $local_holds_queue_count, >+); >+ > if ( C4::Context->preference('CurbsidePickup') ) { > $template->param( > new_curbside_pickups => Koha::CurbsidePickups->search( >-- >2.39.5
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 36073
:
190835
|
190845
|
190847
|
190849