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

(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt (-14 / +13 lines)
Lines 58-64 $.tablesorter.addParser({ Link Here
58
    <div id="yui-main">
58
    <div id="yui-main">
59
    <div class="yui-b"><div class="yui-g">
59
    <div class="yui-b"><div class="yui-g">
60
	<div id="userdetails" class="container">
60
	<div id="userdetails" class="container">
61
62
	[% IF ( bor_messages ) %]
61
	[% IF ( bor_messages ) %]
63
	       <div class="dialog message">
62
	       <div class="dialog message">
64
	               <h3>Messages For You</h3>
63
	               <h3>Messages For You</h3>
Lines 80-86 $.tablesorter.addParser({ Link Here
80
		[% IF ( patronupdate ) %]<div class="dialog message"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
79
		[% IF ( patronupdate ) %]<div class="dialog message"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
81
		
80
		
82
81
83
        [% IF ( BORROWER_INF.flagged ) %]
82
        [% IF ( patron_flagged ) %]
84
		<div class="dialog alert">
83
		<div class="dialog alert">
85
        <ul>
84
        <ul>
86
            [% IF ( BORROWER_INF.debarred ) %]
85
            [% IF ( BORROWER_INF.debarred ) %]
Lines 187-193 $.tablesorter.addParser({ Link Here
187
        [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
186
        [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
188
        <th>Call No.</th>
187
        <th>Call No.</th>
189
        [% IF ( OpacRenewalAllowed ) %]
188
        [% IF ( OpacRenewalAllowed ) %]
190
        [% UNLESS  patron_flagged %]<th class="{sorter: false}">Renew</th>[% END %]
189
        <th class="{sorter: false}">Renew</th>
191
        [% END %]
190
        [% END %]
192
[% IF ( OPACFinesTab ) %]
191
[% IF ( OPACFinesTab ) %]
193
        <th>Fines</th>
192
        <th>Fines</th>
Lines 235-246 $.tablesorter.addParser({ Link Here
235
                [% IF ( show_barcode ) %]<td>[% ISSUE.barcode %]</td>[% END %]
234
                [% IF ( show_barcode ) %]<td>[% ISSUE.barcode %]</td>[% END %]
236
                <td>[% ISSUE.itemcallnumber %]</td>
235
                <td>[% ISSUE.itemcallnumber %]</td>
237
                [% IF ( OpacRenewalAllowed ) %]
236
                [% IF ( OpacRenewalAllowed ) %]
238
                    [% UNLESS patron_flagged %]
237
                    <td>[% IF ( ISSUE.status ) %][% IF ( canrenew ) %]<input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% ISSUE.itemnumber %]&amp;borrowernumber=[% ISSUE.borrowernumber %]">Renew</a>[% END %] <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
239
                    <td>[% IF ( ISSUE.status ) %]<input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% ISSUE.itemnumber %]&amp;borrowernumber=[% ISSUE.borrowernumber %]">Renew</a> <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
240
                        [% ELSE %]
238
                        [% ELSE %]
241
                        Not renewable[% IF ( ISSUE.too_many ) %] <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>[% ELSE %][% IF ( ISSUE.on_reserve ) %] <span class="renewals">(On hold)</span>[% END %][% END %] 
239
                        Not renewable[% IF ( ISSUE.too_many ) %] <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>[% ELSE %][% IF ( ISSUE.on_reserve ) %] <span class="renewals">(On hold)</span>[% END %][% END %] 
242
                        [% END %]</td>
240
                        [% END %]</td>
243
                    [% END %]
244
                [% END %]
241
                [% END %]
245
[% IF ( OPACFinesTab ) %]
242
[% IF ( OPACFinesTab ) %]
246
                <td>[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
243
                <td>[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
Lines 253-260 $.tablesorter.addParser({ Link Here
253
        </table>
250
        </table>
254
	   [% IF ( canrenew ) %]
251
	   [% IF ( canrenew ) %]
255
		[% IF ( OpacRenewalAllowed ) %]
252
		[% IF ( OpacRenewalAllowed ) %]
256
		<input type="submit" value="Renew Selected" />
253
        [% IF ( canrenew ) %]
257
		[% END %]
254
                <input type="submit" value="Renew Selected" />
255
        [% END %]
256
        [% END %]
258
        [% END %]
257
        [% END %]
259
		</form>
258
		</form>
260
		[% IF ( OpacRenewalAllowed ) %]
259
		[% IF ( OpacRenewalAllowed ) %]
Lines 265-271 $.tablesorter.addParser({ Link Here
265
			[% FOREACH ISSUE IN ISSUES %]
264
			[% FOREACH ISSUE IN ISSUES %]
266
			<input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
265
			<input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
267
			[% END %]
266
			[% END %]
268
			[% UNLESS patron_flagged %]<input type="submit" value="Renew All" />[% END %]
267
			<input type="submit" value="Renew All" />
269
		</form>
268
		</form>
270
		[% END %]
269
		[% END %]
271
        [% END %]
270
        [% END %]
Lines 288-294 $.tablesorter.addParser({ Link Here
288
<th>Call No.</th>
287
<th>Call No.</th>
289
<th>Due</th>
288
<th>Due</th>
290
[% IF ( OpacRenewalAllowed ) %]
289
[% IF ( OpacRenewalAllowed ) %]
291
                    [% UNLESS patron_flagged %]<th class="{sorter: false}">Renew</th>[% END %][% END %]
290
                    <th class="{sorter: false}">Renew</th>
291
[% END %]
292
[% IF ( OPACFinesTab ) %]
292
[% IF ( OPACFinesTab ) %]
293
<th>Fines</th>
293
<th>Fines</th>
294
[% END %]
294
[% END %]
Lines 320-334 $.tablesorter.addParser({ Link Here
320
<td>[% OVERDUE.itemcallnumber %]</td>
320
<td>[% OVERDUE.itemcallnumber %]</td>
321
<td>[% OVERDUE.date_due %]</td>
321
<td>[% OVERDUE.date_due %]</td>
322
                [% IF ( OpacRenewalAllowed ) %]
322
                [% IF ( OpacRenewalAllowed ) %]
323
                    [% UNLESS patron_flagged %]
324
<td>
323
<td>
325
[% IF ( OVERDUE.debarred ) %]Account Frozen
324
[% IF ( OVERDUE.debarred ) %]Account Frozen
326
[% ELSIF ( OVERDUE.status ) %]
325
[% ELSIF ( OVERDUE.status ) %]
327
<a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber %]&amp;bornum=[% OVERDUE.borrowernumber %]">Renew</a> <span class="renewals">([% OVERDUE.renewsleft %] of [% OVERDUE.renewsallowed %] renewals remaining)</span>
326
[% IF ( canrenew ) %]<a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber %]&amp;bornum=[% OVERDUE.borrowernumber %]">Renew</a>[% END %] <span class="renewals">([% OVERDUE.renewsleft %] of [% OVERDUE.renewsallowed %] renewals remaining)</span>
328
[% ELSIF ( OVERDUE.onreserve ) %]On Reserve
327
[% ELSIF ( OVERDUE.onreserve ) %]On hold
329
[% ELSE %]No renewals left
328
[% ELSE %]No renewals left
330
[% END %]
329
[% END %]
331
</td>[% END %][% END %]
330
</td>[% END %]
332
[% IF ( OPACFinesTab ) %]
331
[% IF ( OPACFinesTab ) %]
333
<td>[% IF ( OVERDUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
332
<td>[% IF ( OVERDUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
334
[% END %]
333
[% END %]
(-)a/opac/opac-user.pl (-4 / +3 lines)
Lines 60-65 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
60
60
61
my $OPACDisplayRequestPriority = (C4::Context->preference("OPACDisplayRequestPriority")) ? 1 : 0;
61
my $OPACDisplayRequestPriority = (C4::Context->preference("OPACDisplayRequestPriority")) ? 1 : 0;
62
my $patronupdate = $query->param('patronupdate');
62
my $patronupdate = $query->param('patronupdate');
63
my $canrenew = 1;
63
64
64
# get borrower information ....
65
# get borrower information ....
65
my ( $borr ) = GetMemberDetails( $borrowernumber );
66
my ( $borr ) = GetMemberDetails( $borrowernumber );
Lines 71-76 $borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} ); Link Here
71
72
72
if ( $borr->{'debarred'} || $borr->{'gonenoaddress'} || $borr->{'lost'} ) {
73
if ( $borr->{'debarred'} || $borr->{'gonenoaddress'} || $borr->{'lost'} ) {
73
    $borr->{'flagged'} = 1;
74
    $borr->{'flagged'} = 1;
75
    $canrenew = 0;
74
}
76
}
75
77
76
if ( $borr->{'amountoutstanding'} > 5 ) {
78
if ( $borr->{'amountoutstanding'} > 5 ) {
Lines 84-89 $no_renewal_amt ||= 0; Link Here
84
86
85
if ( $borr->{amountoutstanding} > $no_renewal_amt ) {
87
if ( $borr->{amountoutstanding} > $no_renewal_amt ) {
86
    $borr->{'flagged'} = 1;
88
    $borr->{'flagged'} = 1;
89
    $canrenew = 0;
87
    $template->param(
90
    $template->param(
88
        renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ),
91
        renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ),
89
    );
92
    );
Lines 108-120 $template->param( BORROWER_INFO => \@bordat, Link Here
108
#get issued items ....
111
#get issued items ....
109
112
110
my $count          = 0;
113
my $count          = 0;
111
my $toggle = 0;
112
my $overdues_count = 0;
114
my $overdues_count = 0;
113
my @overdues;
115
my @overdues;
114
my @issuedat;
116
my @issuedat;
115
my $itemtypes = GetItemTypes();
117
my $itemtypes = GetItemTypes();
116
my ($issues) = GetPendingIssues($borrowernumber);
118
my ($issues) = GetPendingIssues($borrowernumber);
117
my $canrenew = 0;
118
if ($issues){
119
if ($issues){
119
	foreach my $issue ( sort { $b->{'date_due'} cmp $a->{'date_due'} } @$issues ) {
120
	foreach my $issue ( sort { $b->{'date_due'} cmp $a->{'date_due'} } @$issues ) {
120
		# check for reserves
121
		# check for reserves
Lines 145-151 if ($issues){ Link Here
145
		($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
146
		($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
146
        if($status && C4::Context->preference("OpacRenewalAllowed")){
147
        if($status && C4::Context->preference("OpacRenewalAllowed")){
147
            $issue->{'status'} = $status;
148
            $issue->{'status'} = $status;
148
            $canrenew = 1;
149
        }
149
        }
150
		$issue->{'too_many'} = 1 if $renewerror and $renewerror eq 'too_many';
150
		$issue->{'too_many'} = 1 if $renewerror and $renewerror eq 'too_many';
151
		$issue->{'on_reserve'} = 1 if $renewerror and $renewerror eq 'on_reserve';
151
		$issue->{'on_reserve'} = 1 if $renewerror and $renewerror eq 'on_reserve';
152
- 

Return to bug 6598