From 2d3489f7237527d15b6bc0f589b7564239f3d50d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 10 May 2022 09:24:16 +0200 Subject: [PATCH] Bug 30650: Add link from the mainpage Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: Koha Team University Lyon 3 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/modules/intranet-main.tt | 9 ++++++++- mainpage.pl | 12 ++++++++++++ 2 files changed, 20 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 1b556f379b..02b7c5d265 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -166,7 +166,7 @@
[%# 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('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) || already_ran_jobs %] + [% 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('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) || already_ran_jobs || new_curbside_pickups.count %]
[% IF pending_article_requests %]
@@ -241,6 +241,13 @@
[% END %] + [% IF new_curbside_pickups.count %] +
+ New curbside pickups + [% new_curbside_pickups.count | html %] +
+ [% END %] +
[% END %] diff --git a/mainpage.pl b/mainpage.pl index 6972d39871..b34a46d8ed 100755 --- a/mainpage.pl +++ b/mainpage.pl @@ -34,6 +34,7 @@ use Koha::ProblemReports; use Koha::Quotes; use Koha::Suggestions; use Koha::BackgroundJobs; +use Koha::CurbsidePickups; my $query = CGI->new; @@ -108,6 +109,17 @@ unless ( $logged_in_user->has_permission( { parameters => 'manage_background_job $template->param( already_ran_jobs => $already_ran_jobs ); } +if ( C4::Context->preference('CurbsidePickup') ) { + $template->param( + new_curbside_pickups => Koha::CurbsidePickups->search( + { + branchcode => $homebranch, + scheduled_pickup_datetime => { '>' => \'DATE(NOW())' }, + } + )->filter_by_to_be_staged + ); +} + $template->param( pendingcomments => $pendingcomments, pendingtags => $pendingtags, -- 2.39.5