Summary: | No renewal before advisory text not wrapped in selector | ||
---|---|---|---|
Product: | Koha | Reporter: | Sally <sally.healey> |
Component: | OPAC | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | david, fridolin.somers, jonathan.druart, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement adds more <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
|
Version(s) released in: |
22.05.00
|
Circulation function: | |||
Attachments: |
Bug 28876: No renewal before advisory text not wrapped in selector
Bug 28876: No renewal before advisory text not wrapped in selector Bug 28876: Wrap no renewal before advisory text in selector |
Description
Sally
2021-08-18 09:37:33 UTC
Created attachment 125899 [details] [review] 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. Created attachment 125900 [details] [review] 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. 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. This will also be easier for translation Created attachment 128551 [details] [review] 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 Skipping QA. Pushed to master for 22.05, thanks to everybody involved [U+1F984] |