Bug 28876: Wrap no renewal before advisory text in selector
authorOwen Leonard <oleonard@myacpl.org>
Thu, 7 Oct 2021 16:44:47 +0000 (16:44 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 4 Jan 2022 07:47:42 +0000 (21:47 -1000)
commit442fb97155285ff4063cdd6279328ebed62ea6d4
tree976c49eda07a8ff72457bea1b54815a2c828e5fe
parent197f73e8ae7412de6337daa3b35a0a1e4ea51a80
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
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt