Bugzilla – Attachment 135823 Details for
Bug 30849
Make pending patron modification notices on staff main page number of modifications at logged in branch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30849: show pending modifications by branch
Bug-30849-show-pending-modifications-by-branch.patch (text/plain), 3.65 KB, created by
Lucas Gass (lukeg)
on 2022-06-08 16:09:51 UTC
(
hide
)
Description:
Bug 30849: show pending modifications by branch
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-06-08 16:09:51 UTC
Size:
3.65 KB
patch
obsolete
>From d8600d8fc0d3d1d018a3d9732afbf5577ab5f17a Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 8 Jun 2022 16:05:30 +0000 >Subject: [PATCH] Bug 30849: show pending modifications by branch > >To test: >1. Add some borrower modifications from the OPAC from patrons that belong to some different libraries. >2. On the staff client mainpage (mainpage.pl) you should see a link 'Patrons requesting modifications:' but no way of knowing if they are patrons from your logged in branch or not >3. Apply patch, restart_all >4. Try step 2 again and now you should see something like 'Patrons requesting modifications: Centerville: 1 / All libraries: 2'; >5. Trying and and fulfilling some modifcations and make sure the numbers on mainpage.pl are always correct. >--- > .../intranet-tmpl/prog/en/modules/intranet-main.tt | 13 +++++++++---- > mainpage.pl | 3 +++ > 2 files changed, 12 insertions(+), 4 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 8f121beab3..4c226c01cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -206,11 +206,16 @@ > </div> > [% END %] > >- >- [% IF ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) %] >+ [% IF CAN_user_borrowers_edit_borrowers && pending_borrower_modifications %] > <div class="pending-info" id="patron_updates_pending"> >- <a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>: >- <span class="pending-number-link">[% pending_borrower_modifications | html %]</span> >+ Patrons requesting modifications: >+ <a href="/cgi-bin/koha/members/members-update.pl"> >+ <span class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% pending_local_borrowermods | html %]</a> >+ </a> >+ / >+ <a href="/cgi-bin/koha/members/members-update.pl"> >+ <span class="pending-number-link">All libraries: [% pending_borrower_modifications | html %]</a> >+ </a> > </div> > [% END %] > >diff --git a/mainpage.pl b/mainpage.pl >index 6972d39871..85984ca76d 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -93,6 +93,8 @@ if( C4::Context->only_my_library ){ > } > > my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count( $branch ); >+my $local_pendingmodifications_count = Koha::Patron::Modifications->pending_count( C4::Context->userenv()->{'branch'} ); >+ > my $pending_discharge_requests = Koha::Patron::Discharge::count({ pending => 1 }); > my $pending_article_requests = Koha::ArticleRequests->search_limited( > { >@@ -112,6 +114,7 @@ $template->param( > pendingcomments => $pendingcomments, > pendingtags => $pendingtags, > pending_borrower_modifications => $pending_borrower_modifications, >+ pending_local_borrowermods => $local_pendingmodifications_count, > pending_discharge_requests => $pending_discharge_requests, > pending_article_requests => $pending_article_requests, > pending_problem_reports => $pending_problem_reports >-- >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 30849
:
135823
|
137644