Bugzilla – Attachment 162000 Details for
Bug 36063
Add Holds to Pull info to intranet-main page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36063: Add holds to pull info to staff interface main page
Bug-36063-Add-holds-to-pull-info-to-staff-interfac.patch (text/plain), 5.08 KB, created by
David Nind
on 2024-02-10 02:23:58 UTC
(
hide
)
Description:
Bug 36063: Add holds to pull info to staff interface main page
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-02-10 02:23:58 UTC
Size:
5.08 KB
patch
obsolete
>From 23598d7f6fd25f01d7adb3a9a4afa1a9a08cb072 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 9 Feb 2024 23:16:14 +0000 >Subject: [PATCH] Bug 36063: Add holds to pull info to staff interface main > page > >To test: >1. APPLY PATCH, restart_all >2. Make some holds >3. Go to the staff interface home page, you should see 'New holds to pull: X'. >4. Check those holds in so they are waiting. Now they should not be counted against the number you see on the staff main page. >5. Log in as a staff member with Staff access but without circulate_remaining_permissions. >6. You should not see the 'New holds to pull: X' line. > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 8 +++++++- > mainpage.pl | 6 +++++- > 2 files changed, 12 insertions(+), 2 deletions(-) > >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 845d7759eb..6bdf0367e4 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 %] >+ [% 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 ) %] > <div id="area-pending" class="page-section"> > [% IF pending_article_requests %] > <div class="pending-info" id="article_requests_pending"> >@@ -270,6 +270,12 @@ > </div> > [% END %] > >+ [% IF holds_to_pull && CAN_user_circulate_circulate_remaining_permissions %] >+ <div class="pending-info" id="holds_to_pull"> >+ <a href="/cgi-bin/koha/circ/pendingreserves.pl">New holds to pull</a>: >+ <span class="pending-number-link">[% holds_to_pull | html %]</span> >+ </div> >+ [% END %] > </div> > > [% END %] >diff --git a/mainpage.pl b/mainpage.pl >index e1c033f18a..254a2de308 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -38,6 +38,7 @@ use Koha::BackgroundJobs; > use Koha::CurbsidePickups; > use Koha::Tickets; > use Koha::Token; >+use Koha::Holds; > > my $query = CGI->new; > >@@ -127,6 +128,8 @@ unless ( $logged_in_user->has_permission( { parameters => 'manage_background_job > $template->param( already_ran_jobs => $already_ran_jobs ); > } > >+my $holds_to_pull = Koha::Holds->search( found => undef )->count; >+ > if ( C4::Context->preference('CurbsidePickup') ) { > $template->param( > new_curbside_pickups => Koha::CurbsidePickups->search( >@@ -143,7 +146,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_to_pull => $holds_to_pull, > ); > > 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 36063
:
161997
| 162000