[Bug 28876] New: No renewal before advisory text not wrapped in selector
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 Bug ID: 28876 Summary: No renewal before advisory text not wrapped in selector Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: sally.healey@cheshiresharedservices.gov.uk QA Contact: testopia@bugs.koha-community.org Using 'No renewal before' in the circulation rules is a very useful setting, as it blocks a patron from accidentally renewing too many times in quick succession on the OPAC and using up all of their permitted renewals. But the setting also adds some advisory text to the OPAC which confuses our patrons. We would like to be able to hide this text, but it's not wrapped in a selector so we can't target it. To replicate: - Create a circulation rule which includes: Renewals allowed: 4 Renewal period: 21 No renewal before: 20 - Check an appropriate item out to an account with a due date of +10 days - Log into the OPAC with the account - Renew the item - Note that the following (example) information appears in the Renew column: Renewed! No renewal before 19/08/2021 00:00 (3 of 4 renewals remaining) - Use Chrome/Firefox dev/inspect tools and note that 'Renewed!' is wrapped in a span class called 'blabel label-success', and '(3 of 4 renewals remaining)' is wrapped in a span class called 'renewals'. It would be really helpful if a span class could be added to this part of the opac-user.tt template: [% ELSIF ( ISSUE.too_soon ) %] No renewal before [% ISSUE.soonestrenewdate | html %] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 125899 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125899&action=edit Bug 28876: No renewal before advisory text not wrapped in selector This patch adds some more <span>s to the user summary page in the OPAC so that information about renewal status can be targeted with CSS or JS. It adds each <span> with a "usr-msg" class for general styling and a specific class for each renewal message, e.g. <span class="usr-msg no-renew-hold">Not renewable <span class="renewals">(on hold)</span></span> These classes are added: - no-renew-hold - Not renewable (on hold) - no-renew-too-many - Not renewable (too many renwals) - no-renew-unseen - Item must be renewed at the library - no-renew-overdue - Not allowed (overdue) - no-renew-too-late - No longer renewable - auto-renew-fines - Automatic renewal failed, you have unpaid fines - auto-renew-expired - Automatic renewal failed, your account is expired - no-renewal-before - No renewal before [date] - automatic-renewal - Automatic renewal To test, apply the patch and try to locate or set up a patron to have multiple checkouts with multiple renewal conditions: - On hold - Too many renewals - Overdues (if OverduesBlockRenewing is on) ...etc. In the OPAC, log in and view the table of checkouts on the "your summary" page. Confirm that messages in the "Renew" column are marked up correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125899|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 125900 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125900&action=edit Bug 28876: No renewal before advisory text not wrapped in selector This patch adds some more <span>s to the user summary page in the OPAC so that information about renewal status can be targeted with CSS or JS. It adds each <span> with a "usr-msg" class for general styling and a specific class for each renewal message, e.g. <span class="usr-msg no-renew-hold">Not renewable <span class="renewals">(on hold)</span></span> These classes are added: - no-renew-hold - Not renewable (on hold) - no-renew-too-many - Not renewable (too many renwals) - no-renew-unseen - Item must be renewed at the library - no-renew-overdue - Not allowed (overdue) - no-renew-too-late - No longer renewable - auto-renew-fines - Automatic renewal failed, you have unpaid fines - auto-renew-expired - Automatic renewal failed, your account is expired - no-renewal-before - No renewal before [date] - automatic-renewal - Automatic renewal To test, apply the patch and try to locate or set up a patron to have multiple checkouts with multiple renewal conditions: - On hold - Too many renewals - Overdues (if OverduesBlockRenewing is on) ...etc. In the OPAC, log in and view the table of checkouts on the "your summary" page. Confirm that messages in the "Renew" column are marked up correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- I tested for six of the classes and these all worked as expected: 1. no-renew-hold - Not renewable (on hold) [check out an item with renewals allowed, place an item level hold] 2. no-renew-too-many - Not renewable (too many renwals) [change circulation rules so only one renewal allowed (change 'Renewals allowed (count)' to 1), check out an item, from the patron's account summary in the OPAC select renew and refresh the page] 3. no-renew-unseen - Item must be renewed at the library [set UnseenRenewals to allow, change circulation rules so that Unseen renewals allowed (count) = 1, check out an item, in the OPAC summary renew, message now says 'Item must be renewed at the library.'] 4. no-renew-overdue - Not allowed (overdue) [set OverduesBlockRenewing = block renewing for all the patron's items, check out an item with renewals allowed, make check out date before current date] 5. no-renewal-before - No renewal before [date] [set circulation rules: circulation period = 21 and No renewal before = 20; check out an item, in OPAC renew from summary page] 6. automatic-renewal - Automatic renewal [check out an item with renewals] I wasn't able to figure out how to test for the remaining classes: - no-renew-too-late - No longer renewable - auto-renew-fines - Automatic renewal failed, you have unpaid fines - auto-renew-expired - Automatic renewal failed, your account is expired - no-renew-too-late - No longer renewable Happy to sign off if this is sufficient, otherwise I will leave for someone else who knows how to test the remaining classes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- This will also be easier for translation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125900|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128551&action=edit Bug 28876: Wrap no renewal before advisory text in selector This patch adds some more <span>s to the user summary page in the OPAC so that information about renewal status can be targeted with CSS or JS. It adds each <span> with a "usr-msg" class for general styling and a specific class for each renewal message, e.g. <span class="usr-msg no-renew-hold">Not renewable <span class="renewals">(on hold)</span></span> These classes are added: - no-renew-hold - Not renewable (on hold) - no-renew-too-many - Not renewable (too many renwals) - no-renew-unseen - Item must be renewed at the library - no-renew-overdue - Not allowed (overdue) - no-renew-too-late - No longer renewable - auto-renew-fines - Automatic renewal failed, you have unpaid fines - auto-renew-expired - Automatic renewal failed, your account is expired - no-renewal-before - No renewal before [date] - automatic-renewal - Automatic renewal To test, apply the patch and try to locate or set up a patron to have multiple checkouts with multiple renewal conditions: - On hold - Too many renewals - Overdues (if OverduesBlockRenewing is on) ...etc. In the OPAC, log in and view the table of checkouts on the "your summary" page. Confirm that messages in the "Renew" column are marked up correctly. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> JD amended patch: fix commit title -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Status|Signed Off |Passed QA --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Skipping QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to master |RESOLVED CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28876 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement adds more release notes| |<span>s to the user summary | |page in the OPAC so that | |information about the | |renewal status can be | |targeted with CSS or JS. It | |adds each <span> with a | |"usr-msg" class for general | |styling and a specific | |class for each renewal | |message, for example: | | | |<span class="usr-msg | |no-renew-hold">Not | |renewable <span | |class="renewals">(on | |hold)</span></span> | | | |These | |classes are added: | | | |- | |no-renew-hold: Not | |renewable (on hold) | |- | |no-renew-too-many: Not | |renewable (too many | |renewals) | |- | |no-renew-unseen: Item must | |be renewed at the library | |- | |no-renew-overdue: Not | |allowed (overdue) | |- | |no-renew-too-late: No | |longer renewable | |- | |auto-renew-fines: Automatic | |renewal failed, you have | |unpaid fines | |- | |auto-renew-expired: | |Automatic renewal failed, | |your account is expired | |- | |no-renewal-before: No | |renewal before [date] | |- | |automatic-renewal: | |Automatic renewal -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org