From 9aa84cb348731f3429e586ace93d5e54cceb572a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 16 Jun 2020 13:16:30 +0000 Subject: [PATCH] Bug 25771: Allow the user to sort checkouts by the renew column in the OPAC This patch makes it possible for the logged-in OPAC user to sort their checkouts by the number of renewals they have remaining on their checkouts. To test, apply the patch and log in to the OPAC as a user with multiple checkouts. To fully test the patch's functionality the user's checkouts should have a varying number of renewals available. On the "your summary" page, confirm that the "Renew" column is now sortable and that it sorts correctly by the number of renewals left on each checked-out item. Signed-off-by: Henry Bolshaw Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../bootstrap/en/modules/opac-user.tt | 82 ++++++++++--------- 1 file changed, 43 insertions(+), 39 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 22480d1bea..493a59d030 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -244,7 +244,7 @@ [% END %] Call no. [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %] - Renew + Renew [% END %] [% IF ( OPACFinesTab ) %] Fines @@ -345,45 +345,49 @@ [% ISSUE.itemcallnumber | html %] [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %] - - [% IF ISSUE.renewed %]Renewed!
[% END %] - [% IF ( ISSUE.status ) %] - [% IF ( canrenew ) %] - Renew - [% END %] - [% IF ISSUE.renewalfee > 0 %] - Fee for item type '[% ItemTypes.GetDescription( ISSUE.renewalitemtype) | html %]': [% ISSUE.renewalfee | $Price %] - [% END %] - [% IF ISSUE.itemtype_object.rentalcharge_daily > 0 %] - [% ISSUE.itemtype_object.rentalcharge_daily | $Price %] per day - [% END %] - [% IF ISSUE.itemtype_object.rentalcharge_hourly > 0 %] - [% ISSUE.itemtype_object.rentalcharge_hourly | $Price %] per hour - [% END %] - ([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining) - [% ELSIF ( ISSUE.on_reserve ) %] - Not renewable (on hold) - [% ELSIF ( ISSUE.too_many ) %] - Not renewable - [% ELSIF ( ISSUE.norenew_overdue ) %] - Not allowed (overdue) - [% ELSIF ( ISSUE.auto_too_late ) %] - No longer renewable - [% ELSIF ISSUE.auto_too_much_oweing %] - Automatic renewal failed, you have unpaid fines. - ([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining) - [% ELSIF ISSUE.auto_account_expired %] - Automatic renewal failed, your account is expired. - ([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining) - [% ELSIF ( ISSUE.too_soon ) %] - No renewal before [% ISSUE.soonestrenewdate | html %] - ([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining) - [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %] - Automatic renewal - ([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining) - [% ELSIF ( ISSUE.item_denied_renewal ) %] - Renewal not allowed + [% IF ( ISSUE.status && canrenew ) %] + + [% ELSE %] + [% END %] + [% IF ISSUE.renewed %]Renewed!
[% END %] + [% IF ( ISSUE.status ) %] + [% IF ( canrenew ) %] + Renew + [% END %] + [% IF ISSUE.renewalfee > 0 %] + Fee for item type '[% ItemTypes.GetDescription( ISSUE.renewalitemtype) | html %]': [% ISSUE.renewalfee | $Price %] + [% END %] + [% IF ISSUE.itemtype_object.rentalcharge_daily > 0 %] + [% ISSUE.itemtype_object.rentalcharge_daily | $Price %] per day + [% END %] + [% IF ISSUE.itemtype_object.rentalcharge_hourly > 0 %] + [% ISSUE.itemtype_object.rentalcharge_hourly | $Price %] per hour + [% END %] + ([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining) + [% ELSIF ( ISSUE.on_reserve ) %] + Not renewable (on hold) + [% ELSIF ( ISSUE.too_many ) %] + Not renewable + [% ELSIF ( ISSUE.norenew_overdue ) %] + Not allowed (overdue) + [% ELSIF ( ISSUE.auto_too_late ) %] + No longer renewable + [% ELSIF ISSUE.auto_too_much_oweing %] + Automatic renewal failed, you have unpaid fines. + ([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining) + [% ELSIF ISSUE.auto_account_expired %] + Automatic renewal failed, your account is expired. + ([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining) + [% ELSIF ( ISSUE.too_soon ) %] + No renewal before [% ISSUE.soonestrenewdate | html %] + ([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining) + [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %] + Automatic renewal + ([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining) + [% ELSIF ( ISSUE.item_denied_renewal ) %] + Renewal not allowed + [% END %] [% END %] [% IF ( OPACFinesTab ) %] -- 2.39.5