Bugzilla – Attachment 123163 Details for
Bug 28073
Make patron modifications auto-open panel for referring patron record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28073: Patron modifications should auto-open panel for referring patron record
Bug-28073-Patron-modifications-should-auto-open-pa.patch (text/plain), 9.14 KB, created by
Katrin Fischer
on 2021-07-24 23:07:59 UTC
(
hide
)
Description:
Bug 28073: Patron modifications should auto-open panel for referring patron record
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-07-24 23:07:59 UTC
Size:
9.14 KB
patch
obsolete
>From 3b036606d8926adc8bfe14d76812db9b16544cc9 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 1 Apr 2021 21:14:37 +0000 >Subject: [PATCH] Bug 28073: Patron modifications should auto-open panel for > referring patron record >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch makes it possible to link directly to the correct panel on >the "Update patron records" page. The link on the checkout and patron >details screen has been updated to read "Patron has pending >modifications." > >Also changed: Moved the "Patron's address in doubt" message so that it >is above the table of changed fields. > >To test, apply the patch and if necessary submit patron modification >requests from multiple patrons via the OPAC. > > - Open the checkout page for one of these patrons. > - If you are logged in as a user with permission to edit patron > records you should see a message, "Pending modifications: Review > pending modifications," which links to the pending modifications > page. > - Clicking the link should open the page for reviewing pending > patron modifications, and the correct panel should be > automatically expanded. > - If you are logged in as a user without permission to edit patrons > you should see the message "Pending modifications: Patron has > pending modifications," which isn't linked. > - The process should work exactly the same from the patron detail page. > - Following the "Pending modifications" link from the staff interface > home page or the patrons home page should work as before: The page > opens with the first panel expanded. > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/includes/patron_messages.inc | 6 ++-- > .../prog/en/modules/members/members-update.tt | 33 ++++++++++++++-------- > members/members-update.pl | 3 +- > 3 files changed, 27 insertions(+), 15 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >index 8f56ab2dd5..72e747bd14 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -6,9 +6,11 @@ > <ul> > [% IF ( has_modifications ) %] > <li class="has_modifications"> >- <span class="circ-hlt">Pending modifications:</span> Patron has pending modifications. >+ <span class="circ-hlt">Pending modifications:</span> > [% IF CAN_user_borrowers_edit_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %] >- <a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a> >+ <a href="/cgi-bin/koha/members/members-update.pl?active=[% patron.borrowernumber | uri %]">Review pending modifications</a> >+ [% ELSE %] >+ Patron has pending modifications > [% END %] > </li> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt >index 5d0178d72b..6e90e23687 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt >@@ -114,9 +114,9 @@ > <div id="pending_updates"> > [% FOREACH pm IN PendingModifications %] > [% SET borrowernumber = pm.borrowernumber %] >- <h3><a href="#panel_modify_[% pm.borrowernumber | uri %]">[% borrowers.$borrowernumber.surname | html %][% IF ( borrowers.$borrowernumber.firstname ) %], [% borrowers.$borrowernumber.firstname | html %][% END %] - [% Categories.GetName( borrowers.$borrowernumber.categorycode ) | html %] ([% Branches.GetName( borrowers.$borrowernumber.branchcode ) | html %]) ([% borrowers.$borrowernumber.cardnumber | html %]) - Requested on [% pm.timestamp | $KohaDates with_hours = 1 %]</a></h3> >+ <h3 class="panel-header" id="panel-header-[% pm.borrowernumber | html %]"><a href="#panel_modify_[% pm.borrowernumber | uri %]">[% borrowers.$borrowernumber.surname | html %][% IF ( borrowers.$borrowernumber.firstname ) %], [% borrowers.$borrowernumber.firstname | html %][% END %] - [% Categories.GetName( borrowers.$borrowernumber.categorycode ) | html %] ([% Branches.GetName( borrowers.$borrowernumber.branchcode ) | html %]) ([% borrowers.$borrowernumber.cardnumber | html %]) - Requested on [% pm.timestamp | $KohaDates with_hours = 1 %]</a></h3> > <div id="panel_modify_[% pm.borrowernumber | html %]"> >- <div style="background-color:#E6F0F2;padding:.5em;margin:.3em 0;"> >+ <div class="btn-toolbar"> > <input type="radio" id="approve_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="approve" /> > <label for="approve_modify_[% pm.borrowernumber | html %]">Approve</label> > >@@ -127,6 +127,16 @@ > <label for="ignore_modify_[% pm.borrowernumber | html %]">Ignore</label> > | <a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% pm.borrowernumber | html %]" >Patron details</a> > </div> >+ >+ [% IF borrowers.$borrowernumber.gonenoaddress > 0 %] >+ <div class="dialog message" style="margin-top:.8em"> >+ <h4>Patron's address in doubt</h4> >+ <p>The <strong>Gone no address</strong> flag is set for this patron. If this modification request resolves the issue, please unset the flag.</p> >+ <input type="checkbox" id="unset_gna_[% pm.borrowernumber | html %]" name="unset_gna_[% pm.borrowernumber | html %]" value="unset_gna_[% pm.borrowernumber | html %]"/> >+ <label for="unset_gna_[% pm.borrowernumber | html %]">Unset Gone no address for this patron</label> >+ </div> >+ [% END %] >+ > [% IF !pm.extended_attributes and pm.size > 3 or pm.extended_attributes and pm.size > 4 %] > [%# timestamp+verification_token+borrowernumber=3 %] > <div class="members-update-table"> >@@ -179,19 +189,10 @@ > </table> > </div> > [% END %] >- [% IF borrowers.$borrowernumber.gonenoaddress > 0 %] >- <div class="dialog message" style="margin-top:.8em"> >- <h4>Patron's address in doubt</h4> >- <p>The <strong>Gone no address</strong> flag is set for this patron. If this modification request resolves the issue, please unset the flag.</p> >- <input type="checkbox" id="unset_gna_[% pm.borrowernumber | html %]" name="unset_gna_[% pm.borrowernumber | html %]" value="unset_gna_[% pm.borrowernumber | html %]"/> >- <label for="unset_gna_[% pm.borrowernumber | html %]">Unset Gone no address for this patron</label> >- </div> >- [% END %] > </div> > [% END %] > </div> > <fieldset class="action"><input type="submit" value="Submit" /></fieldset> >- > </form> > [% ELSE %] > <div class="dialog message"> >@@ -207,7 +208,15 @@ > [% Asset.js("js/members-menu.js") | $raw %] > <script> > $(function() { >- $( "#pending_updates" ).accordion(); >+ $( "#pending_updates" ).accordion({ >+ collapsible: true, >+ heightStyle: "content", >+ [%- IF ( active ) -%] >+ active: $(".panel-header").index( $("#panel-header-[% active | html %]") ) >+ [%- ELSE -%] >+ active: 0 >+ [%- END -%] >+ }); > }); > </script> > [% END %] >diff --git a/members/members-update.pl b/members/members-update.pl >index 9965d495f1..e6dffec97a 100755 >--- a/members/members-update.pl >+++ b/members/members-update.pl >@@ -70,7 +70,8 @@ foreach my $pm (@$pending_modifications) { > > $template->param( > PendingModifications => $pending_modifications, >- borrowers => $borrowers >+ borrowers => $borrowers, >+ active => ( $query->param('active') || 0 ), > ); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >2.11.0
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 28073
:
119118
|
119128
| 123163