@@ -, +, @@ Followup 2 --- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 32 ++++++++++++++-------- opac/opac-user.pl | 1 + 2 files changed, 21 insertions(+), 12 deletions(-) --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -11,8 +11,9 @@ var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?"); var MSG_CONFIRM_SUSPEND_HOLDS = _("Are you sure you want to suspend all holds?"); var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended holds?"); - $(function() { - $('#opac-user-views').tabs(); + $(document).ready(function(){ + + $('#opac-user-views').tabs(); var dTables = $("#checkoutst,#holdst,#overduest"); dTables.each(function(){ @@ -27,8 +28,10 @@ var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended })); }); -[% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] - [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]$("#renewselected").submit(function(){ + [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] + + [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %] + $("#renewselected").submit(function(){ valid = false; $("input[type=checkbox]").each(function(){ if($(this).is(':checked')){ @@ -46,9 +49,14 @@ var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended $("#renewall_link").live('click',function(){ $("#renewall").submit(); }); - $("#checkoutst caption").append("
"+_("Renew selected")+" "+_("Renew all")+"
");[% END %] - $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future - }); + [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] + $("#checkoutst caption").append("
"+_("Renew selected")+" "+_("Renew all")+"
"); + [% END %] + [% END %] + + $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future + + }); //]]> @@ -105,7 +113,7 @@ var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended Please note: Your account renewal failed because of the following: - [% FOREACH error IN RENEW_ERROR.split('|') %] + [% FOREACH error IN RENEW_ERROR.split('\|') %] [% IF error == 'card_expired' %] Your account has expired. Please contact the library for more information. [% ELSIF error == 'too_many' %] @@ -162,7 +170,7 @@ var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended [% UNLESS ( item_level_itypes ) %]Item type [% END %] [% IF ( show_barcode ) %]Barcode[% END %] Call No. - [% IF ( OpacRenewalAllowed ) %] + [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] Renew [% END %] [% IF ( OPACFinesTab ) %] @@ -210,7 +218,7 @@ var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended [% UNLESS ( item_level_itypes ) %][% IF ( ISSUE.imageurl ) %][% ISSUE.description %][% END %] [% ISSUE.description %][% END %] [% IF ( show_barcode ) %][% ISSUE.barcode %][% END %] [% ISSUE.itemcallnumber %] - [% IF ( OpacRenewalAllowed ) %] + [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] [% IF ( ISSUE.status ) %][% IF ( canrenew ) %] Renew[% END %] ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) [% ELSE %] Not renewable[% IF ( ISSUE.too_many ) %] ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)[% ELSE %][% IF ( ISSUE.on_reserve ) %] (On hold)[% END %][% END %] @@ -225,11 +233,11 @@ var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended [% END %] - [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %] + [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] [% END %] - [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %] + [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
--- a/opac/opac-user.pl +++ a/opac/opac-user.pl @@ -144,6 +144,7 @@ $template->param( BORROWER_INFO => \@bordat, surname => $borr->{surname}, showname => $borr->{showname}, RENEW_ERROR => $renew_error, + borrower => $borr, ); #get issued items .... --