Bugzilla – Attachment 165139 Details for
Bug 31097
Patron restriction types should display in staff interface and OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31097: Added more restrictions info
Bug-31097-Added-more-restrictions-info.patch (text/plain), 9.11 KB, created by
Philip Orr
on 2024-04-18 15:50:55 UTC
(
hide
)
Description:
Bug 31097: Added more restrictions info
Filename:
MIME Type:
Creator:
Philip Orr
Created:
2024-04-18 15:50:55 UTC
Size:
9.11 KB
patch
obsolete
>From ece91b163c600b3ab01106ac2b9c452fdd63f3f2 Mon Sep 17 00:00:00 2001 >From: Philip Orr <philip.orr@lmscloud.de> >Date: Thu, 18 Apr 2024 15:41:33 +0000 >Subject: [PATCH] Bug 31097: Added more restrictions info > >Added more info to the restrictions message >in circulation as well as to the OPAC display >in "Your account" and to the display of >restriction messages when trying to place a >hold in the OPAC. > >To Test: >1. Before applying patch, set system preference >"PatronRestrictionTypes" to "Allow" >2. Go to Administration -> Patron restriction types >3. Add some restriction types, make sure you >fill out both "Code" and "Label" >4. Go to any patron and add one or more of each >restriction type >4a. Make sure that you add some with an >expiration date and some without >4b. Make sure you add some with a comment and >some without >5. Go to that patron's checkout page >6. Notice that only the comments of the >restrictions are displayed and not all info >is displayed >7. Apply the patch >8. Reload the page >9. Notice the restriction types are now >displayed correctly >10. Notice the colon is only displayed >if there is a comment >11. Notice the expiration date is also displayed >12. Open the OPAC and log in with that user >(or if you want to log in with your own user: > make sure they have all the restrictions > mentioned above as well) >13. Go to "Your account" in the OPAC >14. Notice the display of restrictions >15. Try to place a hold on any record >16. Notice the display of restrictions >--- > .../prog/en/includes/patron_messages.inc | 11 +++++++++- > .../bootstrap/en/modules/opac-reserve.tt | 22 +++++++++++++++++-- > .../bootstrap/en/modules/opac-user.tt | 22 +++++++++++++++++-- > 3 files changed, 50 insertions(+), 5 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 75c64cb695..7df1808123 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -70,8 +70,17 @@ > [% IF debarredcomment.search('OVERDUES_PROCESS') %] > Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | $raw | html_line_break %] > [% ELSE %] >- [% FOR restriction IN patron.restrictions %] >+ [% FOREACH restriction IN patron.restrictions %] >+ [% IF restriction.expiration %] >+ [% restriction.expiration | $KohaDates %] >+ [% ELSE %] >+ <strong>Indefinite</strong> >+ [% END %] >+ [% IF restriction.comment %] > [% restriction.type.display_text | html %]: [% restriction.comment | html_line_break %]<br /> >+ [% ELSE %] >+ [% restriction.type.display_text | html %]<br /> >+ [% END %] > [% END %] > [% END %] > </em><br/> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index bacd8b77cb..b8a5b26f33 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -47,13 +47,31 @@ > <li id="debarred"> > Your account has been frozen. > [% IF debarred_comment %] >- Comment: >+ Comment:<br /> > <span id="userdebarred_comment"> > <strong> > [% IF debarred_comment.search('OVERDUES_PROCESS') %] > Restriction added by overdues process [% debarred_comment.remove('OVERDUES_PROCESS ') | html_line_break %] > [% ELSE %] >- [% debarred_comment | html_line_break %] >+ [% FOR restriction IN logged_in_user.restrictions %] >+ [% IF restriction.comment %] >+ [% restriction.type.display_text | html %]: [% restriction.comment | html_line_break %], frozen until: >+ [% IF restriction.expiration %] >+ [% restriction.expiration | $KohaDates %] >+ [% ELSE %] >+ <strong>Indefinite</strong> >+ [% END %] >+ <br /> >+ [% ELSE %] >+ [% restriction.type.display_text | html %], frozen until: >+ [% IF restriction.expiration %] >+ [% restriction.expiration | $KohaDates %] >+ [% ELSE %] >+ <strong>Indefinite</strong> >+ [% END %] >+ <br /> >+ [% END %] >+ [% END %] > [% END %] > </strong> > </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index f521bedf47..84fbd6be40 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -168,13 +168,31 @@ > [% ELSE %] > <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen. > [% IF ( borrower.debarredcomment ) %] >- Comment: >+ Comment:<br /> > <span id="userdebarred_comment"> > <strong> > [% IF borrower.debarredcomment.search('OVERDUES_PROCESS') %] > Restriction added by overdues process [% borrower.debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %] > [% ELSE %] >- [% borrower.debarredcomment | html_line_break %] >+ [% FOR restriction IN logged_in_user.restrictions %] >+ [% IF restriction.comment %] >+ [% restriction.type.display_text | html %]: [% restriction.comment | html_line_break %], frozen until: >+ [% IF restriction.expiration %] >+ [% restriction.expiration | $KohaDates %] >+ [% ELSE %] >+ <strong>Indefinite</strong> >+ [% END %] >+ <br /> >+ [% ELSE %] >+ [% restriction.type.display_text | html %], frozen until: >+ [% IF restriction.expiration %] >+ [% restriction.expiration | $KohaDates %] >+ [% ELSE %] >+ <strong>Indefinite</strong> >+ [% END %] >+ <br /> >+ [% END %] >+ [% END %] > [% END %] > </strong> > </span> >-- >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 31097
:
165059
|
165060
|
165138
|
165139
|
165218
|
165219
|
165220
|
165221
|
166054
|
166055
|
166255
|
166296
|
166428