From 40598e4d432488e6e1451ec280b02a337cb0ff0e Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 30 Jan 2026 19:00:23 +0000 Subject: [PATCH] Bug 41740: Add count of pending curbside pickups to circulation home To test: 1 - Enable the Curbside pickup module http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CurbsidePickup 2 - Enable the module for Centerville: http://localhost:8081/cgi-bin/koha/admin/curbside_pickup.pl 3 - Allow 'Patron pickup' and add a slot for the current day of the week from 00:00 to 23:59 4 - Sign in to OPAC 5 - PLace a hold 6 - Go to your account 7 - Click 'Curbside pickups' 8 - Schedule a pickup 9 - Return to staff interface 10 - Note the homepage has a link for 'New curbside pickups (1)' 11 - Go to Circulation 12 - Note the Curbside button has no extra info 13 - Apply patch 14 - Reload circulation homepage 15 - Note button now has "( 1 new )" 16 - Click the button 17 - Mark the request as 'Staged and ready' 18 - Reload circulation home 19 - Confirm the button shows no new requests Signed-off-by: Nick Clemens Signed-off-by: David Nind --- circ/circulation-home.pl | 9 +++++++++ .../prog/en/modules/circ/circulation-home.tt | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/circ/circulation-home.pl b/circ/circulation-home.pl index ca86f10363..d966bb1ff4 100755 --- a/circ/circulation-home.pl +++ b/circ/circulation-home.pl @@ -23,6 +23,7 @@ use C4::Output qw( output_html_with_http_headers ); use C4::Context; use Koha::BiblioFrameworks; use Koha::Checkouts; +use Koha::CurbsidePickups; my $query = CGI->new; my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( @@ -37,4 +38,12 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( # Checking if there is a Fast Cataloging Framework $template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find('FA'); +if ( C4::Context->preference('CurbsidePickup') ) { + $template->param( + new_curbside_pickups => Koha::CurbsidePickups->search( + { branchcode => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef } + )->filter_by_to_be_staged->filter_by_scheduled_today, + ); +} + output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt index 5def67f655..13e68c22fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt @@ -90,7 +90,12 @@ [% IF ( Koha.Preference('CurbsidePickup') && CAN_user_circulate_manage_curbside_pickups ) %]
  • - Curbside pickups + + Curbside pickups + [% IF ( new_curbside_pickups.count ) %] + ( [% new_curbside_pickups.count | html %] new ) + [% END %] +
  • [% END %]
  • -- 2.39.5