From 442fb97155285ff4063cdd6279328ebed62ea6d4 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 7 Oct 2021 16:44:47 +0000 Subject: [PATCH] Bug 28876: Wrap no renewal before advisory text in selector This patch adds some more 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 with a "usr-msg" class for general styling and a specific class for each renewal message, e.g. Not renewable (on hold) 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 JD amended patch: fix commit title Signed-off-by: Fridolin Somers --- .../bootstrap/en/modules/opac-user.tt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 a3f258e041..424d3bc9d9 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -378,17 +378,17 @@ [% END %] ) [% ELSIF ( ISSUE.on_reserve ) %] - Not renewable (on hold) + Not renewable (on hold) [% ELSIF ( ISSUE.too_many ) %] - Not renewable + Not renewable [% ELSIF ( ISSUE.too_unseen ) %] - Item must be renewed at the library. [% ISSUE.renewsleft | html %] renewals remaining + Item must be renewed at the library. [% ISSUE.renewsleft | html %] renewals remaining [% ELSIF ( ISSUE.norenew_overdue ) %] - Not allowed (overdue) + Not allowed (overdue) [% ELSIF ( ISSUE.auto_too_late ) %] - No longer renewable + No longer renewable [% ELSIF ISSUE.auto_too_much_oweing %] - Automatic renewal failed, you have unpaid fines. + Automatic renewal failed, you have unpaid fines. ( [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %] @@ -396,7 +396,7 @@ [% END %] ) [% ELSIF ISSUE.auto_account_expired %] - Automatic renewal failed, your account is expired. + Automatic renewal failed, your account is expired. ( [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %] @@ -404,7 +404,7 @@ [% END %] ) [% ELSIF ( ISSUE.too_soon ) %] - No renewal before [% ISSUE.soonestrenewdate | html %] + No renewal before [% ISSUE.soonestrenewdate | html %] ( [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %] @@ -412,7 +412,7 @@ [% END %] ) [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %] - Automatic renewal + Automatic renewal ( [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %] -- 2.39.5