View | Details | Raw Unified | Return to bug 18306
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-2 / +5 lines)
Lines 360-366 Link Here
360
                                [% END %]
360
                                [% END %]
361
                                </form>
361
                                </form>
362
362
363
                                [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
363
                                [% IF ( canrenew && can_renew_all && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
364
                                <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
364
                                <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
365
                                    <input type="hidden" name="from" value="opac_user" />
365
                                    <input type="hidden" name="from" value="opac_user" />
366
                                    <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
366
                                    <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
Lines 1024-1030 Link Here
1024
                    $("#renewall").submit();
1024
                    $("#renewall").submit();
1025
                });
1025
                });
1026
                [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
1026
                [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
1027
                    $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");
1027
                    $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a></div>");
1028
                        [% IF ( can_renew_all ) %]
1029
                            $("#renewcontrols").append("<a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a>");
1030
                        [% END %]
1028
                [% END %]
1031
                [% END %]
1029
            [% END %]
1032
            [% END %]
1030
1033
(-)a/opac/opac-user.pl (-2 / +6 lines)
Lines 84-89 for ( C4::Context->preference("OPACShowHoldQueueDetails") ) { Link Here
84
84
85
my $patronupdate = $query->param('patronupdate');
85
my $patronupdate = $query->param('patronupdate');
86
my $canrenew = 1;
86
my $canrenew = 1;
87
my $can_renew_all = 1;
87
88
88
$template->param( shibbolethAuthentication => C4::Context->config('useshibboleth') );
89
$template->param( shibbolethAuthentication => C4::Context->config('useshibboleth') );
89
90
Lines 230-235 if ( $pending_checkouts->count ) { # Useless test Link Here
230
        $issue->{'renewed'} = $renewed{ $issue->{'itemnumber'} };
231
        $issue->{'renewed'} = $renewed{ $issue->{'itemnumber'} };
231
232
232
        if ($renewerror) {
233
        if ($renewerror) {
234
            $can_renew_all = 0;
233
            $issue->{'too_many'}       = 1 if $renewerror eq 'too_many';
235
            $issue->{'too_many'}       = 1 if $renewerror eq 'too_many';
234
            $issue->{'on_reserve'}     = 1 if $renewerror eq 'on_reserve';
236
            $issue->{'on_reserve'}     = 1 if $renewerror eq 'on_reserve';
235
            $issue->{'norenew_overdue'} = 1 if $renewerror eq 'overdue';
237
            $issue->{'norenew_overdue'} = 1 if $renewerror eq 'overdue';
Lines 284-294 if ( $pending_checkouts->count ) { # Useless test Link Here
284
    }
286
    }
285
}
287
}
286
my $overduesblockrenewing = C4::Context->preference('OverduesBlockRenewing');
288
my $overduesblockrenewing = C4::Context->preference('OverduesBlockRenewing');
287
$canrenew = 0 if ($overduesblockrenewing ne 'allow' and $overdues_count == $count);
289
$canrenew = 0 if ( $overduesblockrenewing eq 'block' and $overdues_count > 0 );
290
$can_renew_all = 0 if ( $overduesblockrenewing eq 'blockitem' and $overdues_count > 0 );
291
$canrenew = 0 if ( $overduesblockrenewing eq 'blockitem' and $overdues_count == $count );
288
292
289
$template->param( ISSUES       => \@issuedat );
293
$template->param( ISSUES       => \@issuedat );
290
$template->param( issues_count => $count );
294
$template->param( issues_count => $count );
291
$template->param( canrenew     => $canrenew );
295
$template->param( canrenew     => $canrenew );
296
$template->param( can_renew_all  => $can_renew_all );
292
$template->param( OVERDUES       => \@overdues );
297
$template->param( OVERDUES       => \@overdues );
293
$template->param( overdues_count => $overdues_count );
298
$template->param( overdues_count => $overdues_count );
294
299
295
- 

Return to bug 18306