@@ -, +, @@ --- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 19 +++++-------------- .../bootstrap/en/modules/opac-user.tt | 11 +++-------- .../bootstrap/en/modules/sco/sco-main.tt | 7 ++++--- svc/checkouts | 2 ++ 4 files changed, 14 insertions(+), 25 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -522,13 +522,6 @@ $(document).ready(function() { + __("No renewal before %s").format(oObj.can_renew_date) + ""; - span_style = "display: none"; - span_class = "renewals-allowed"; - } else if ( oObj.can_renew_error == "auto_too_soon" ) { - msg += "" - + __("Scheduled for automatic renewal") - + ""; - span_style = "display: none"; span_class = "renewals-allowed"; } else if ( oObj.can_renew_error == "auto_too_late" ) { @@ -550,13 +543,6 @@ $(document).ready(function() { + __("Automatic renewal failed, account expired") + ""; - span_style = "display: none"; - span_class = "renewals-allowed"; - } else if ( oObj.can_renew_error == "auto_renew" ) { - msg += "" - + __("Scheduled for automatic renewal") - + ""; - span_style = "display: none"; span_class = "renewals-allowed"; } else if ( oObj.can_renew_error == "onsite_checkout" ) { @@ -604,6 +590,11 @@ $(document).ready(function() { } content += ")"; } + if(oObj.auto_renew){ + content += "("; + content += __("Scheduled for automatic renewal"); + content += ")"; + } return content; } --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -500,17 +500,12 @@ / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library [% END %] ) - [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %] - Automatic renewal - ( - [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining - [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %] - / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library - [% END %] - ) [% ELSIF ( ISSUE.item_denied_renewal ) %] Renewal not allowed [% END %] + [% IF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %] +
This item is scheduled for auto renewal. + [% END %] [% END %] [% IF ( OPACFinesTab ) %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -356,9 +356,7 @@ [% END %] [% ELSE %] - [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %] - This item has been scheduled for automatic renewal and cannot be renewed - [% ELSIF ISSUE.renew_error == 'onsite_checkout' %] + [% IF ISSUE.renew_error == 'onsite_checkout' %] This is a on-site checkout, it cannot be renewed. [% ELSIF ISSUE.renew_error == 'too_unseen' %] You have renewed this item the maximum number of consecutive times without it being seen by the library. @@ -373,6 +371,9 @@ [% END %] [% END %] + [% IF ISSUE.auto_renew %] +
This item is scheduled for automatic renewal + [% END %] [% UNLESS ( nofines ) %] --- a/svc/checkouts +++ a/svc/checkouts @@ -72,6 +72,7 @@ my $sql = ' issues.date_due, issues.date_due < now() as date_due_overdue, issues.timestamp, + issues.auto_renew, issues.onsite_checkout, @@ -272,6 +273,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { date_due => $c->{date_due}, date_due_overdue => $c->{date_due_overdue} ? JSON::true : JSON::false, timestamp => $c->{timestamp}, + auto_renew => $c->{auto_renew}, onsite_checkout => $c->{onsite_checkout}, enumchron => $c->{enumchron}, renewals_count => $renewals_count, --