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

(-)a/Koha/Schema/Result/Issue.pm (-4 / +28 lines)
Lines 184-193 __PACKAGE__->belongs_to( Link Here
184
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZEh31EKBmURMKxDxI+H3EA
184
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZEh31EKBmURMKxDxI+H3EA
185
185
186
__PACKAGE__->belongs_to(
186
__PACKAGE__->belongs_to(
187
  "borrower",
187
    "borrower",
188
  "Koha::Schema::Result::Borrower",
188
    "Koha::Schema::Result::Borrower",
189
  { borrowernumber => "borrowernumber" },
189
    { borrowernumber => "borrowernumber" },
190
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
190
    { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
191
);
192
193
__PACKAGE__->belongs_to(
194
  "item",
195
  "Koha::Schema::Result::Item",
196
  { itemnumber => "itemnumber" },
197
  {
198
    is_deferrable => 1,
199
    join_type     => "LEFT",
200
    on_delete     => "CASCADE",
201
    on_update     => "CASCADE",
202
  },
203
);
204
205
__PACKAGE__->belongs_to(
206
  "branch",
207
  "Koha::Schema::Result::Branch",
208
  { branchcode => "branchcode" },
209
  {
210
    is_deferrable => 1,
211
    join_type     => "LEFT",
212
    on_delete     => "CASCADE",
213
    on_update     => "CASCADE",
214
  },
191
);
215
);
192
216
193
1;
217
1;
(-)a/api/checkin.pl (+75 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2014 ByWater Solutions
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 2 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use CGI;
23
use JSON qw(to_json);
24
25
use C4::Circulation;
26
use C4::Items qw(GetBarcodeFromItemnumber);
27
use C4::Context;
28
use C4::Auth qw(check_cookie_auth);
29
30
use Koha::DateUtils qw(output_pref_due);
31
32
my $input = new CGI;
33
34
my ( $auth_status, $sessionID ) =
35
  check_cookie_auth( $input->cookie('CGISESSID'),
36
    { circulate => 'circulate_remaining_permissions' } );
37
38
if ( $auth_status ne "ok" ) {
39
    exit 0;
40
}
41
42
binmode STDOUT, ":encoding(UTF-8)";
43
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
44
45
my $itemnumber     = $input->param('itemnumber');
46
my $borrowernumber = $input->param('borrowernumber');
47
my $override_limit = $input->param('override_limit');
48
my $exempt_fine    = $input->param('exempt_fine');
49
my $branchcode     = $input->param('branchcode')
50
  || C4::Context->userenv->{'branch'};
51
52
my $barcode = GetBarcodeFromItemnumber($itemnumber);
53
54
my $data;
55
$data->{itemnumber}     = $itemnumber;
56
$data->{borrowernumber} = $borrowernumber;
57
$data->{branchcode}     = $branchcode;
58
59
if ( C4::Context->preference("InProcessingToShelvingCart") ) {
60
    my $item = GetItem($itemnumber);
61
    if ( $item->{'location'} eq 'PROC' ) {
62
        $item->{'location'} = 'CART';
63
        ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} );
64
    }
65
}
66
67
if ( C4::Context->preference("ReturnToShelvingCart") ) {
68
    my $item = GetItem($itemnumber);
69
    $item->{'location'} = 'CART';
70
    ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} );
71
}
72
73
( $data->{returned} ) = AddReturn( $barcode, $branchcode, $exempt_fine );
74
75
print to_json($data);
(-)a/api/checkouts.pl (+133 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# This software is placed under the gnu General Public License, v2 (http://www.gnu.org/licenses/gpl.html)
4
5
# Copyright 2014 ByWater Solutions
6
#
7
# This file is part of Koha.
8
#
9
# Koha is free software; you can redistribute it and/or modify it under the
10
# terms of the GNU General Public License as published by the Free Software
11
# Foundation; either version 3 of the License, or (at your option) any later
12
# version.
13
#
14
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
15
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License along
19
# with Koha; if not, write to the Free Software Foundation, Inc.,
20
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
22
use Modern::Perl;
23
24
use CGI;
25
use JSON qw(to_json);
26
27
use C4::Auth qw(check_cookie_auth);
28
use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue );
29
use C4::Charset;
30
use C4::Circulation qw(GetIssuingCharges CanBookBeRenewed GetRenewCount);
31
use C4::Context;
32
33
use Koha::Database;
34
use Koha::DateUtils;
35
36
my $input = new CGI;
37
38
my ( $auth_status, $sessionID ) =
39
  check_cookie_auth( $input->cookie('CGISESSID'),
40
    { circulate => 'circulate_remaining_permissions' } );
41
42
if ( $auth_status ne "ok" ) {
43
    exit 0;
44
}
45
46
my $schema = Koha::Database->new()->schema();
47
48
my @sort_columns = qw/date_due title itype issuedate branchcode itemcallnumber/;
49
50
my @borrowernumber    = $input->param('borrowernumber');
51
my $offset            = $input->param('iDisplayStart');
52
my $results_per_page  = $input->param('iDisplayLength');
53
my $sorting_column    = $sort_columns[ $input->param('iSortCol_0') ];
54
my $sorting_direction = $input->param('sSortDir_0');
55
56
$results_per_page = undef if ( $results_per_page == -1 );
57
58
binmode STDOUT, ":encoding(UTF-8)";
59
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
60
61
my $checkouts_rs =
62
  $schema->resultset('Issue')->search( { borrowernumber => \@borrowernumber },
63
    { prefetch => { 'item' => 'biblio' }, orderby => 'issuedate' } );
64
65
my $borrower;
66
my @checkouts;
67
while ( my $c = $checkouts_rs->next() ) {
68
69
    # No point in fetching this every time if only one borrower
70
    $borrower = $c->borrower()
71
      if ( !$borrower || @borrowernumber > 1 );
72
73
    my $borrowernumber = $borrower->borrowernumber();
74
    my $itemnumber     = $c->item()->itemnumber();
75
    my $biblionumber   = $c->item()->biblionumber();
76
77
    my ($charge) =
78
      GetIssuingCharges( $c->itemnumber()->itemnumber(), $borrowernumber );
79
80
    my ( $can_renew, $can_renew_error ) =
81
      CanBookBeRenewed( $borrowernumber, $itemnumber );
82
83
    my ( $renewals_count, $renewals_allowed, $renewals_remaining ) =
84
      GetRenewCount( $borrowernumber, $itemnumber );
85
86
    push(
87
        @checkouts,
88
        {
89
            DT_RowId           => "$itemnumber-$borrowernumber",
90
            title              => $c->item()->biblio()->title(),
91
            author             => $c->item()->biblio()->author(),
92
            barcode            => $c->item()->barcode(),
93
            itemtype           => $c->item()->effective_itemtype(),
94
            itemnotes          => $c->item()->itemnotes(),
95
            branchcode         => $c->branchcode(),
96
            branchname         => $c->branch->branchname(),
97
            itemcallnumber     => $c->item()->itemcallnumber() || q{},
98
            charge             => $charge,
99
            price              => $c->item->replacementprice() || q{},
100
            can_renew          => $can_renew,
101
            can_renew_error    => $can_renew_error,
102
            itemnumber         => $itemnumber,
103
            borrowernumber     => $borrowernumber,
104
            biblionumber       => $biblionumber,
105
            issuedate          => $c->issuedate(),
106
            date_due           => $c->date_due(),
107
            renewals_count     => $renewals_count,
108
            renewals_allowed   => $renewals_allowed,
109
            renewals_remaining => $renewals_remaining,
110
            issuedate_formatted =>
111
              output_pref( dt_from_string( $c->issuedate() ) ),
112
            date_due_formatted =>
113
              output_pref_due( dt_from_string( $c->date_due() ) ),
114
            subtitle => GetRecordValue(
115
                'subtitle', GetMarcBiblio($biblionumber),
116
                GetFrameworkCode($biblionumber)
117
            ),
118
            borrower => {
119
                surname    => $borrower->surname(),
120
                firstname  => $borrower->firstname(),
121
                cardnumber => $borrower->cardnumber(),
122
            }
123
        }
124
    );
125
}
126
127
my $data;
128
$data->{'iTotalRecords'}        = scalar @checkouts;                 #FIXME
129
$data->{'iTotalDisplayRecords'} = scalar @checkouts;
130
$data->{'sEcho'}                = $input->param('sEcho') || undef;
131
$data->{'aaData'}               = \@checkouts;
132
133
print to_json($data);
(-)a/api/renew.pl (+69 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2014 ByWater Solutions
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 2 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use CGI;
23
use JSON qw(to_json);
24
25
use C4::Circulation;
26
use C4::Context;
27
use C4::Auth qw(check_cookie_auth);
28
29
use Koha::DateUtils qw(output_pref_due dt_from_string);
30
31
my $input = new CGI;
32
33
my ( $auth_status, $sessionID ) =
34
  check_cookie_auth( $input->cookie('CGISESSID'),
35
    { circulate => 'circulate_remaining_permissions' } );
36
37
if ( $auth_status ne "ok" ) {
38
    exit 0;
39
}
40
41
binmode STDOUT, ":encoding(UTF-8)";
42
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
43
44
my $itemnumber     = $input->param('itemnumber');
45
my $borrowernumber = $input->param('borrowernumber');
46
my $override_limit = $input->param('override_limit');
47
my $branchcode     = $input->param('branchcode')
48
  || C4::Context->userenv->{'branch'};
49
my $date_due;
50
if ( $input->param('date_due') ) {
51
    $date_due = dt_from_string( $input->param('date_due') );
52
    $date_due->set_hour(23);
53
    $date_due->set_minute(59);
54
}
55
56
my $data;
57
$data->{itemnumber} = $itemnumber;
58
$data->{borrowernumber} = $borrowernumber;
59
$data->{branchcode} = $branchcode;
60
61
( $data->{renew_okay}, $data->{error} ) =
62
  CanBookBeRenewed( $borrowernumber, $itemnumber, $override_limit );
63
64
if ( $data->{renew_okay} ) {
65
    $date_due = AddRenewal( $borrowernumber, $itemnumber, $branchcode, $date_due );
66
    $data->{date_due} = output_pref_due( $date_due );
67
}
68
69
print to_json($data);
(-)a/circ/circulation.pl (-111 / +10 lines)
Lines 42-47 use CGI::Session; Link Here
42
use C4::Members::Attributes qw(GetBorrowerAttributes);
42
use C4::Members::Attributes qw(GetBorrowerAttributes);
43
use Koha::Borrower::Debarments qw(GetDebarments);
43
use Koha::Borrower::Debarments qw(GetDebarments);
44
use Koha::DateUtils;
44
use Koha::DateUtils;
45
use Koha::Database;
45
46
46
use Date::Calc qw(
47
use Date::Calc qw(
47
  Today
48
  Today
Lines 96-109 my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( Link Here
96
97
97
my $branches = GetBranches();
98
my $branches = GetBranches();
98
99
99
my @failedrenews = $query->param('failedrenew');    # expected to be itemnumbers 
100
our %renew_failed = ();
101
for (@failedrenews) { $renew_failed{$_} = 1; }
102
103
my @failedreturns = $query->param('failedreturn');
104
our %return_failed = ();
105
for (@failedreturns) { $return_failed{$_} = 1; }
106
107
my $findborrower = $query->param('findborrower') || q{};
100
my $findborrower = $query->param('findborrower') || q{};
108
$findborrower =~ s|,| |g;
101
$findborrower =~ s|,| |g;
109
my $borrowernumber = $query->param('borrowernumber');
102
my $borrowernumber = $query->param('borrowernumber');
Lines 355-363 if ($barcode) { Link Here
355
        }
348
        }
356
    }
349
    }
357
    
350
    
358
    # FIXME If the issue is confirmed, we launch another time GetMemberIssuesAndFines, now display the issue count after issue 
351
    my ( $od, $issue, $fines ) = GetMemberIssuesAndFines($borrowernumber);
359
    my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
352
    $template->param( issuecount => $issue );
360
    $template->param( issuecount   => $issue );
361
}
353
}
362
354
363
# reload the borrower info for the sake of reseting the flags.....
355
# reload the borrower info for the sake of reseting the flags.....
Lines 457-556 if ($borrowernumber) { Link Here
457
    $template->param( adultborrower => 1 ) if ( $borrower->{'category_type'} eq 'A' );
449
    $template->param( adultborrower => 1 ) if ( $borrower->{'category_type'} eq 'A' );
458
}
450
}
459
451
460
# make the issued books table.
461
my $todaysissues = '';
462
my $previssues   = '';
463
our @todaysissues   = ();
464
our @previousissues = ();
465
our @relissues      = ();
466
our @relprevissues  = ();
467
my $displayrelissues;
468
469
our $totalprice = 0;
470
471
sub build_issue_data {
472
    my $issueslist = shift;
473
    my $relatives = shift;
474
475
    # split in 2 arrays for today & previous
476
    foreach my $it ( @$issueslist ) {
477
        my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $it->{'itype'} : $it->{'itemtype'} );
478
479
        # set itemtype per item-level_itype syspref - FIXME this is an ugly hack
480
        $it->{'itemtype'} = ( C4::Context->preference( 'item-level_itypes' ) ) ? $it->{'itype'} : $it->{'itemtype'};
481
482
        ($it->{'charge'}, $it->{'itemtype_charge'}) = GetIssuingCharges(
483
            $it->{'itemnumber'}, $it->{'borrowernumber'}
484
        );
485
        $it->{'charge'} = sprintf("%.2f", $it->{'charge'});
486
        my ($can_renew, $can_renew_error) = CanBookBeRenewed( 
487
            $it->{'borrowernumber'},$it->{'itemnumber'}
488
        );
489
        $it->{"renew_error_${can_renew_error}"} = 1 if defined $can_renew_error;
490
        my $restype = C4::Reserves::GetReserveStatus( $it->{'itemnumber'} );
491
        $it->{'can_renew'} = $can_renew;
492
        $it->{'can_confirm'} = !$can_renew && !$restype;
493
        $it->{'renew_error'} = ( $restype eq "Waiting" or $restype eq "Reserved" ) ? 1 : 0;
494
        $it->{'checkoutdate'} = C4::Dates->new($it->{'issuedate'},'iso')->output('syspref');
495
        $it->{'issuingbranchname'} = GetBranchName($it->{'branchcode'});
496
497
        $totalprice += $it->{'replacementprice'} || 0;
498
        $it->{'itemtype'} = $itemtypeinfo->{'description'};
499
        $it->{'itemtype_image'} = $itemtypeinfo->{'imageurl'};
500
        $it->{'dd_sort'} = $it->{'date_due'};
501
        $it->{'dd'} = output_pref($it->{'date_due'});
502
        $it->{'displaydate_sort'} = $it->{'issuedate'};
503
        $it->{'displaydate'} = output_pref($it->{'issuedate'});
504
        #$it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ? 1 : 0 ;
505
        $it->{'od'} = $it->{'overdue'};
506
        $it->{'subtitle'} = GetRecordValue('subtitle', GetMarcBiblio($it->{biblionumber}), GetFrameworkCode($it->{biblionumber}));
507
        $it->{'renew_failed'} = $renew_failed{$it->{'itemnumber'}};
508
        $it->{'return_failed'} = $return_failed{$it->{'barcode'}};
509
510
        if ( ( $it->{'issuedate'} && $it->{'issuedate'} gt $todaysdate )
511
          || ( $it->{'lastreneweddate'} && $it->{'lastreneweddate'} gt $todaysdate ) ) {
512
            (!$relatives) ? push @todaysissues, $it : push @relissues, $it;
513
        } else {
514
            (!$relatives) ? push @previousissues, $it : push @relprevissues, $it;
515
        }
516
        ($it->{'renewcount'},$it->{'renewsallowed'},$it->{'renewsleft'}) = C4::Circulation::GetRenewCount($it->{'borrowernumber'},$it->{'itemnumber'}); #Add renewal count to item data display
517
    }
518
}
519
520
if ($borrower) {
521
522
    # Getting borrower relatives
523
    my @relborrowernumbers = GetMemberRelatives($borrower->{'borrowernumber'});
524
    #push @borrowernumbers, $borrower->{'borrowernumber'};
525
526
    # get each issue of the borrower & separate them in todayissues & previous issues
527
    my $issueslist = GetPendingIssues($borrower->{'borrowernumber'});
528
    my $relissueslist = [];
529
    if ( @relborrowernumbers ) {
530
        $relissueslist = GetPendingIssues(@relborrowernumbers);
531
    }
532
533
    build_issue_data($issueslist, 0);
534
    build_issue_data($relissueslist, 1);
535
  
536
    $displayrelissues = scalar($relissueslist);
537
538
    if ( C4::Context->preference( "todaysIssuesDefaultSortOrder" ) eq 'asc' ) {
539
        @todaysissues   = sort { $a->{'timestamp'} cmp $b->{'timestamp'} } @todaysissues;
540
    }
541
    else {
542
        @todaysissues   = sort { $b->{'timestamp'} cmp $a->{'timestamp'} } @todaysissues;
543
    }
544
545
    if ( C4::Context->preference( "previousIssuesDefaultSortOrder" ) eq 'asc' ){
546
        @previousissues = sort { $a->{'date_due'} cmp $b->{'date_due'} } @previousissues;
547
    }
548
    else {
549
        @previousissues = sort { $b->{'date_due'} cmp $a->{'date_due'} } @previousissues;
550
    }
551
}
552
553
554
my @values;
452
my @values;
555
my %labels;
453
my %labels;
556
my $CGIselectborrower;
454
my $CGIselectborrower;
Lines 702-707 if (C4::Context->preference('ExtendedPatronAttributes')) { Link Here
702
    );
600
    );
703
}
601
}
704
602
603
my @relatives = GetMemberRelatives( $borrower->{'borrowernumber'} );
604
my $relatives_issues_count =
605
  Koha::Database->new()->schema()->resultset('Issue')
606
  ->count( { borrowernumber => \@relatives } );
607
705
$template->param(
608
$template->param(
706
    lib_messages_loop => $lib_messages_loop,
609
    lib_messages_loop => $lib_messages_loop,
707
    bor_messages_loop => $bor_messages_loop,
610
    bor_messages_loop => $bor_messages_loop,
Lines 739-751 $template->param( Link Here
739
    duedatespec       => $duedatespec,
642
    duedatespec       => $duedatespec,
740
    message           => $message,
643
    message           => $message,
741
    CGIselectborrower => $CGIselectborrower,
644
    CGIselectborrower => $CGIselectborrower,
742
    totalprice        => sprintf('%.2f', $totalprice),
743
    totaldue          => sprintf('%.2f', $total),
645
    totaldue          => sprintf('%.2f', $total),
744
    todayissues       => \@todaysissues,
745
    previssues        => \@previousissues,
746
    relissues			=> \@relissues,
747
    relprevissues		=> \@relprevissues,
748
    displayrelissues		=> $displayrelissues,
749
    inprocess         => $inprocess,
646
    inprocess         => $inprocess,
750
    memberofinstution => $member_of_institution,
647
    memberofinstution => $member_of_institution,
751
    CGIorganisations  => $CGIorganisations,
648
    CGIorganisations  => $CGIorganisations,
Lines 758-763 $template->param( Link Here
758
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
655
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
759
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
656
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
760
    RoutingSerials => C4::Context->preference('RoutingSerials'),
657
    RoutingSerials => C4::Context->preference('RoutingSerials'),
658
    relatives_issues_count => $relatives_issues_count,
659
    relatives_borrowernumbers => \@relatives,
761
);
660
);
762
661
763
# save stickyduedate to session
662
# save stickyduedate to session
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-1 / +1 lines)
Lines 270-276 tr.even td, tr.even.highlight td { Link Here
270
    border-right : 1px solid #BCBCBC;
270
    border-right : 1px solid #BCBCBC;
271
}
271
}
272
272
273
td.od {
273
.overdue td.od {
274
	color : #cc0000;
274
	color : #cc0000;
275
	font-weight : bold;
275
	font-weight : bold;
276
}
276
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js (+264 lines)
Line 0 Link Here
1
$(document).ready(function() {
2
    var ymd = $.datepicker.formatDate('yy-mm-dd', new Date());
3
4
    $("#issues-table").dataTable({
5
        "sDom": "<'row-fluid'<'span6'><'span6'>r>t<'row-fluid'>t",
6
        "aaSorting": [],
7
        "aoColumns": [
8
            { 
9
                "mDataProp": function( oObj ) {
10
                    var today = new Date();
11
                    var due = new Date( oObj.date_due );
12
                    if ( today > due ) {
13
                        return "<span class='overdue'>" + oObj.date_due_formatted + "</span>"; 
14
                    } else {
15
                        return oObj.date_due_formatted;
16
                    }
17
                }
18
            },
19
            { 
20
                "mDataProp": function ( oObj ) {
21
                    title = "<a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" 
22
                          + oObj.biblionumber 
23
                          + "'>" 
24
                          + oObj.title;
25
26
                    $.each(oObj.subtitle, function( index, value ) {
27
                              title += " " + value.subfield;
28
                    });
29
30
                    title += "</a>";
31
32
                    if ( oObj.author ) {
33
                        title += " " + _("by") + " " + oObj.author;
34
                    }
35
36
                    if ( oObj.itemnotes ) {
37
                        var span_class = "";
38
                        if ( $.datepicker.formatDate('yy-mm-dd', new Date(oObj.issuedate) ) == ymd ) {
39
                            span_class = "circ-hlt";
40
                        }
41
                        title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
42
                    }
43
44
                    title += " " 
45
                          + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=" 
46
                          + oObj.biblionumber 
47
                          + "&itemnumber=" 
48
                          + oObj.itemnumber 
49
                          + "#" 
50
                          + oObj.itemnumber 
51
                          + "'>" 
52
                          + oObj.barcode 
53
                          + "</a>";
54
55
                    return title;
56
                }
57
            },
58
            { "mDataProp": "itemtype" },
59
            { "mDataProp": "issuedate" },
60
            { "mDataProp": "branchname" },
61
            { "mDataProp": "itemcallnumber" },
62
            { 
63
                "mDataProp": function ( oObj ) {
64
                    return parseFloat(oObj.charge).toFixed(2);
65
                }
66
            },
67
            { "mDataProp": "price" },
68
            { 
69
                "bSortable": false,
70
                "mDataProp": function ( oObj ) {
71
                    var content = "";
72
                    var span_style = "";
73
                    var span_class = "";
74
75
                    content += "<span style='padding: 0 1em;'>" + oObj.renewals_count + "</span>";
76
77
                    if ( oObj.can_renew ) {
78
                        // Do nothing 
79
                    } else if ( oObj.can_renew_error == "on_reserve" ) {
80
                        content += "<span class='renewals-disabled'>"
81
                                + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + _("On hold") + "</a>"
82
                                + "</span>";
83
84
                        span_style = "display: none";
85
                        span_class = "renewals-allowed";
86
                    } else if ( oObj.can_renew_error == "too_many" ) {
87
                        content += "<span class='renewals-disabled'>"
88
                                + _("Not renewable")
89
                                + "</span>";
90
91
                        span_style = "display: none";
92
                        span_class = "renewals-allowed";
93
                    } else {
94
                        content += "<span class='renewals-disabled'>" 
95
                                + oObj.can_renew_error 
96
                                + "</span>";
97
98
                        span_style = "display: none";
99
                        span_class = "renewals-allowed";
100
                    }
101
102
                    content += "<span class='" + span_class + "' style='" + span_style + "'>"
103
                            +  "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
104
                            +  "</span>";
105
106
                    if ( oObj.renewals_remaining ) {
107
                        content += "<span class='renewals'>(" 
108
                                + oObj.renewals_remaining 
109
                                + " " + _("of") + " " 
110
                                + oObj.renewals_allowed + " " 
111
                                + _("renewals remaining") + ")</span>"
112
                    }
113
114
115
                    return content;
116
                }
117
            },
118
            { 
119
                "bSortable": false,
120
                "mDataProp": function ( oObj ) {
121
                    if ( oObj.can_renew_error == "on_reserve" ) {
122
                        return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + _("On hold") + "</a>";
123
                    } else {
124
                        return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>";
125
                    }
126
                }
127
            },
128
            {
129
                "bVisible": exports_enabled ? true : false,
130
                "bSortable": false,
131
                "mDataProp": function ( oObj ) {
132
                    return "<input type='checkbox' class='export' id='export_" + oObj.biblionumber + "' name='biblionumbers' value='" + oObj.biblionumber + "' />";
133
                }
134
            }
135
        ],
136
        "fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
137
            var total_charge = 0;
138
            var total_price = 0;
139
            for ( var i=0; i < aaData.length; i++ ) {
140
                total_charge += aaData[i]['charge'] * 1;
141
                total_price  += aaData[i]['price'] * 1;
142
            }
143
            var nCells = nRow.getElementsByTagName('td');
144
            nCells[1].innerHTML = total_charge.toFixed(2);
145
            nCells[2].innerHTML = total_price.toFixed(2);
146
        },
147
        "bPaginate": false,
148
        "bProcessing": true,
149
        "bServerSide": true,
150
        "sAjaxSource": '/cgi-bin/koha/api/checkouts.pl',
151
        "fnServerData": function ( sSource, aoData, fnCallback ) {
152
            aoData.push( { "name": "borrowernumber", "value": borrowernumber } );
153
154
            $.getJSON( sSource, aoData, function (json) {
155
                fnCallback(json)
156
            } );
157
        },
158
    });
159
160
    // Don't load relatives' issues table unless it is clicked on
161
    var relativesIssuesTable;
162
    $("#relatives-issues-tab").click( function() { 
163
        if ( ! relativesIssuesTable ) {
164
            relativesIssuesTable = $("#relatives-issues-table").dataTable({
165
                "sDom": "<'row-fluid'<'span6'><'span6'>r>t<'row-fluid'>t",
166
                "aaSorting": [],
167
                "aoColumns": [
168
                    { 
169
                        "mDataProp": function( oObj ) {
170
                            var today = new Date();
171
                            var due = new Date( oObj.date_due );
172
                            if ( today > due ) {
173
                                return "<span class='overdue'>" + oObj.date_due_formatted + "</span>"; 
174
                            } else {
175
                                return oObj.date_due_formatted;
176
                            }
177
                        }
178
                    },
179
                    { 
180
                        "mDataProp": function ( oObj ) {
181
                            title = "<a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" 
182
                                  + oObj.biblionumber 
183
                                  + "'>" 
184
                                  + oObj.title;
185
186
                            $.each(oObj.subtitle, function( index, value ) {
187
                                      title += " " + value.subfield;
188
                            });
189
190
                            title += "</a>";
191
192
                            if ( oObj.author ) {
193
                                title += " " + _("by") + " " + oObj.author;
194
                            }
195
196
                            if ( oObj.itemnotes ) {
197
                                var span_class = "";
198
                                if ( $.datepicker.formatDate('yy-mm-dd', new Date(oObj.issuedate) ) == ymd ) {
199
                                    span_class = "circ-hlt";
200
                                }
201
                                title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
202
                            }
203
204
                            title += " " 
205
                                  + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=" 
206
                                  + oObj.biblionumber 
207
                                  + "&itemnumber=" 
208
                                  + oObj.itemnumber 
209
                                  + "#" 
210
                                  + oObj.itemnumber 
211
                                  + "'>" 
212
                                  + oObj.barcode 
213
                                  + "</a>";
214
215
                            return title;
216
                        }
217
                    },
218
                    { "mDataProp": "itemtype" },
219
                    { "mDataProp": "issuedate" },
220
                    { "mDataProp": "branchname" },
221
                    { "mDataProp": "itemcallnumber" },
222
                    { "mDataProp": "charge" },
223
                    { "mDataProp": "price" },
224
                    { 
225
                        "mDataProp": function( oObj ) {
226
                            return "<a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=" + oObj.borrowernumber + "'>" 
227
                                 + oObj.borrower.firstname + " " + oObj.borrower.surname + " (" + oObj.borrower.cardnumber + ")</a>"
228
                        }
229
                    },
230
                ],
231
                "bPaginate": false,
232
                "bProcessing": true,
233
                "bServerSide": true,
234
                "sAjaxSource": '/cgi-bin/koha/api/checkouts.pl',
235
                "fnServerData": function ( sSource, aoData, fnCallback ) {
236
                    $.each(relatives_borrowernumbers, function( index, value ) {
237
                        aoData.push( { "name": "borrowernumber", "value": value } );
238
                    });
239
240
                    $.getJSON( sSource, aoData, function (json) {
241
                        fnCallback(json)
242
                    } );
243
                },
244
            });
245
        }
246
    });
247
248
    $("#issues-table").on("sort",function() {
249
        $("#previous").hide();  // Don't want to see "previous checkouts" header sorted with other rows
250
    });
251
    $("#relatives-issues-table").on("sort",function() {
252
        $("#relprevious").hide();  // Don't want to see "previous checkouts" header sorted with other rows
253
    });
254
255
    if ( AllowRenewalLimitOverride ) {
256
        $( '#override_limit' ).click( function () {
257
            if ( this.checked ) {
258
                $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
259
            } else {
260
                $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
261
            }
262
        } ).attr( 'checked', false );
263
    }
264
 });
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js (-40 / +116 lines)
Lines 1-57 Link Here
1
$(document).ready(function() {
1
$(document).ready(function() {
2
    $('#patronlists').tabs();
2
    // Handle the select all/none links for checkouts table columns
3
    var allcheckboxes = $(".checkboxed");
3
    $("#CheckAllRenewals").on("click",function(){
4
    $("#renew_all").on("click",function(){
4
        $("#UncheckAllCheckins").click();
5
        allcheckboxes.checkCheckboxes(":input[name*=items]");
5
        $(".renew:visible").attr("checked", "checked" );
6
        allcheckboxes.unCheckCheckboxes(":input[name*=barcodes]");
6
        return false;
7
    });
8
    $("#CheckAllitems").on("click",function(){
9
        allcheckboxes.checkCheckboxes(":input[name*=items]");
10
        allcheckboxes.unCheckCheckboxes(":input[name*=barcodes]"); return false;
11
    });
7
    });
12
    $("#CheckNoitems").on("click",function(){
8
    $("#UncheckAllRenewals").on("click",function(){
13
        allcheckboxes.unCheckCheckboxes(":input[name*=items]"); return false;
9
        $(".renew:visible").removeAttr("checked");
10
        return false;
14
    });
11
    });
15
    $("#CheckAllreturns").on("click",function(){
12
16
        allcheckboxes.checkCheckboxes(":input[name*=barcodes]");
13
    $("#CheckAllCheckins").on("click",function(){
17
        allcheckboxes.unCheckCheckboxes(":input[name*=items]"); return false;
14
        $("#UncheckAllRenewals").click();
15
        $(".checkin:visible").attr("checked", "checked" );
16
        return false;
18
    });
17
    });
19
    $("#CheckNoreturns" ).on("click",function(){
18
    $("#UncheckAllCheckins").on("click",function(){
20
        allcheckboxes.unCheckCheckboxes(":input[name*=barcodes]"); return false;
19
        $(".checkin:visible").removeAttr("checked");
20
        return false;
21
    });
21
    });
22
22
23
    $("#CheckAllexports").on("click",function(){
23
    $("#CheckAllExports").on("click",function(){
24
        allcheckboxes.checkCheckboxes(":input[name*=biblionumbers]");
24
        $(".export:visible").attr("checked", "checked" );
25
        return false;
25
        return false;
26
    });
26
    });
27
    $("#CheckNoexports").on("click",function(){
27
    $("#UncheckAllExports").on("click",function(){
28
        allcheckboxes.unCheckCheckboxes(":input[name*=biblionumbers]");
28
        $(".export:visible").removeAttr("checked");
29
        return false;
29
        return false;
30
    });
30
    });
31
31
32
    $("#relrenew_all").on("click",function(){
32
    // Don't allow both return and renew checkboxes to be checked
33
        allcheckboxes.checkCheckboxes(":input[name*=items]");
33
    $(document).on("change", '.renew', function(){
34
        allcheckboxes.unCheckCheckboxes(":input[name*=barcodes]");
34
        if ( $(this).is(":checked") ) {
35
    });
35
            $( "#checkin_" + $(this).val() ).removeAttr("checked");
36
    $("#relCheckAllitems").on("click",function(){
36
        }
37
        allcheckboxes.checkCheckboxes(":input[name*=items]");
38
        allcheckboxes.unCheckCheckboxes(":input[name*=barcodes]"); return false;
39
    });
37
    });
40
    $("#relCheckNoitems").on("click",function(){
38
    $(document).on("change", '.checkin', function(){
41
        allcheckboxes.unCheckCheckboxes(":input[name*=items]"); return false;
39
        if ( $(this).is(":checked") ) {
40
            $( "#renew_" + $(this).val() ).removeAttr("checked");
41
        }
42
    });
42
    });
43
    $("#relCheckAllreturns").on("click",function(){
43
44
        allcheckboxes.checkCheckboxes(":input[name*=barcodes]");
44
    // Handle renewals
45
        allcheckboxes.unCheckCheckboxes(":input[name*=items]"); return false;
45
    $("#RenewCheckinChecked").on("click",function(){
46
        $(".checkin:checked:visible").each(function() {
47
            itemnumber = $(this).val();
48
49
            $(this).replaceWith("<img id='checkin_" + itemnumber + "' src='" + interface + "/" + theme + "/img/loading-small.gif' />");       
50
51
            params = { 
52
                itemnumber:     itemnumber, 
53
                borrowernumber: borrowernumber,
54
                branchcode:     branchcode,
55
                exempt_fine:    $("#exemptfine").is(':checked')
56
            };
57
58
            $.post( "/cgi-bin/koha/api/checkin.pl", params, function( data ) {
59
                id = "#checkin_" + data.itemnumber;
60
61
                content = "";
62
                if ( data.returned ) {
63
                    content = _("Returned");
64
                } else {
65
                    content = _("Unable to return");
66
                }
67
                    
68
                $(id).replaceWith( content );
69
            }, "json")
70
        });
71
72
        $(".renew:checked:visible").each(function() {
73
            var override_limit = $("#override_limit").is(':checked') ? 1 : 0;
74
75
            var itemnumber = $(this).val();
76
77
            $(this).replaceWith("<img id='renew_" + itemnumber + "' src='" + interface + "/" + theme + "/img/loading-small.gif' />");       
78
79
            var params = { 
80
                itemnumber:     itemnumber, 
81
                borrowernumber: borrowernumber,
82
                branchcode:     branchcode,
83
                override_limit: override_limit,
84
                date_due:       $("#newduedate").val()
85
            };
86
87
            $.post( "/cgi-bin/koha/api/renew.pl", params, function( data ) {
88
                var id = "#renew_" + data.itemnumber;
89
90
                var content = "";
91
                if ( data.renew_okay ) {
92
                    content = _("Renewed, due: ") + data.date_due;
93
                } else {
94
                    content = _("Renew failed: ");
95
                    if ( data.error == "no_checkout" ) {
96
                        content += _("not checked out");
97
                    } else if ( data.error == "too_many" ) {
98
                        content += _("too many renewals");
99
                    } else if ( data.error == "on_reserve" ) {
100
                        content += _("on reserve");
101
                    } else if ( data.error ) {
102
                        content += data.error;
103
                    } else {
104
                        content += _("reason unknown");
105
                    }
106
                }
107
                    
108
                $(id).replaceWith( content );
109
            }, "json")
110
        });
111
112
        // Prevent form submit
113
        return false;
46
    });
114
    });
47
    $("#relCheckNoreturns").on("click",function(){
115
48
        allcheckboxes.unCheckCheckboxes(":input[name*=barcodes]"); return false;
116
    $("#RenewAll").on("click",function(){
117
        $("#CheckAllRenewals").click();
118
        $("#UncheckAllCheckins").click();
119
        $("#RenewCheckinChecked").click();
120
121
        // Prevent form submit
122
        return false;
49
    });
123
    });
124
125
    $('#patronlists').tabs();
126
50
    $("#messages ul").after("<a href=\"#\" id=\"addmessage\">"+MSG_ADD_MESSAGE+"</a>");
127
    $("#messages ul").after("<a href=\"#\" id=\"addmessage\">"+MSG_ADD_MESSAGE+"</a>");
128
51
    $("#borrower_messages .cancel").on("click",function(){
129
    $("#borrower_messages .cancel").on("click",function(){
52
        $("#add_message_form").hide();
130
        $("#add_message_form").hide();
53
        $("#addmessage").show();
131
        $("#addmessage").show();
54
    });
132
    });
133
55
    $("#addmessage").on("click",function(){
134
    $("#addmessage").on("click",function(){
56
        $(this).hide();
135
        $(this).hide();
57
        $("#add_message_form").show();
136
        $("#add_message_form").show();
Lines 76-83 $(document).ready(function() { Link Here
76
        export_checkouts(export_format);
155
        export_checkouts(export_format);
77
        return false;
156
        return false;
78
    });
157
    });
158
79
    // Clicking the table cell checks the checkbox inside it
159
    // Clicking the table cell checks the checkbox inside it
80
    $("td").on("click",function(e){
160
    $(document).on("click", 'td', function(e){
81
        if(e.target.tagName.toLowerCase() == 'td'){
161
        if(e.target.tagName.toLowerCase() == 'td'){
82
          $(this).find("input:checkbox:visible").each( function() {
162
          $(this).find("input:checkbox:visible").each( function() {
83
            $(this).click();
163
            $(this).click();
Lines 107-119 function export_checkouts(format) { Link Here
107
    } else if (format == 'iso2709') {
187
    } else if (format == 'iso2709') {
108
        $("#dont_export_item").val(1);
188
        $("#dont_export_item").val(1);
109
    }
189
    }
110
    document.issues.action="/cgi-bin/koha/tools/export.pl";
190
111
    document.getElementById("export_format").value = format;
191
    document.getElementById("export_format").value = format;
112
    document.issues.submit();
192
    document.issues.submit();
113
114
    /* Reset form action to its initial value */
115
    document.issues.action="/cgi-bin/koha/reserve/renewscript.pl";
116
117
}
193
}
118
194
119
function validate1(date) {
195
function validate1(date) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-386 / +107 lines)
Lines 13-99 Link Here
13
</title>
13
</title>
14
[% INCLUDE 'doc-head-close.inc' %]
14
[% INCLUDE 'doc-head-close.inc' %]
15
[% INCLUDE 'calendar.inc' %]
15
[% INCLUDE 'calendar.inc' %]
16
[% IF ( UseTablesortForCirc ) %]<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
16
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
17
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
17
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
18
[% INCLUDE 'datatables-strings.inc' %]
18
[% INCLUDE 'datatables-strings.inc' %]
19
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>[% END %]
19
<!-- <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> -->
20
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
20
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
21
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script>
21
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script>
22
<script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script>
22
<script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script>
23
<script type="text/javascript" src="[% themelang %]/js/checkouts.js"></script>
23
<script type="text/javascript">
24
<script type="text/javascript">
24
//<![CDATA[
25
//<![CDATA[
26
/* Set some variable needed in circulation.js */
27
var interface = "[% interface %]";
28
var theme = "[% theme %]";
29
var borrowernumber = "[% borrowernumber %]";
30
var branchcode = "[% branch %]";
31
var exports_enabled = "[% exports_enabled %]";
32
var AllowRenewalLimitOverride = [% CAN_user_circulate_override_renewals && AllowRenewalLimitOverride %]; 
33
var relatives_borrowernumbers = new Array();
34
[% FOREACH b IN relatives_borrowernumbers %]
35
    relatives_borrowernumbers.push("[% b %]");
36
[% END %]
37
25
var MSG_ADD_MESSAGE = _("Add a new message");
38
var MSG_ADD_MESSAGE = _("Add a new message");
26
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
39
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
27
[% IF ( UseTablesortForCirc && dateformat == 'metric' ) %]dt_add_type_uk_date();[% END %]
40
[% IF ( UseTablesortForCirc && dateformat == 'metric' ) %]dt_add_type_uk_date();[% END %]
28
[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
41
[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
29
[% UNLESS ( borrowernumber ) %][% UNLESS ( CGIselectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
42
[% UNLESS ( borrowernumber ) %][% UNLESS ( CGIselectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
30
	 $(document).ready(function() {
43
31
        $('#patronlists').tabs([% IF ( UseTablesortForCirc ) %]{
44
$(document).ready(function() {
32
            // Correct table sizing for tables hidden in tabs
45
    [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
33
            // http://www.datatables.net/examples/api/tabs_and_scrolling.html
34
            "show": function(event, ui) {
35
                var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable();
36
                if ( oTable.length > 0 ) {
37
                    oTable.fnAdjustColumnSizing();
38
                }
39
            }
40
        }[% END %]);
41
        [% IF ( UseTablesortForCirc ) %]
42
        $("#issuest").dataTable($.extend(true, {}, dataTablesDefaults, {
43
            "sDom": 't',
44
            "aaSorting": [],
45
            "aoColumnDefs": [
46
                { "aTargets": [ -1, -2[% IF ( exports_enabled ) %], -3[% END %] ], "bSortable": false, "bSearchable": false }
47
            ],
48
            "aoColumns": [
49
                { "sType": "title-string" },{ "sType": "html" },null,{ "sType": "title-string" },null,null,null,null,null,null[% IF ( exports_enabled ) %],null[% END %]
50
            ],
51
            "bPaginate": false
52
        }));
53
54
        $("#relissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
55
            "sDom": 't',
56
            "aaSorting": [],
57
            "aoColumns": [
58
                { "sType": "title-string" },{ "sType": "html" },null,{ "sType": "title-string" },null,null,null,null,{ "sType": "html" }
59
            ],
60
            "bPaginate": false
61
        }));
62
63
        $("#issuest").on("sort",function() {
64
            $("#previous").hide();  // Don't want to see "previous checkouts" header sorted with other rows
65
        });
66
        $("#relissuest").on("sort",function() {
67
            $("#relprevious").hide();  // Don't want to see "previous checkouts" header sorted with other rows
68
        });
69
        [% END %]
70
        [% IF ( AllowRenewalLimitOverride ) %]
71
        $( '#override_limit' ).click( function () {
72
            if ( this.checked ) {
73
                $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
74
            } else {
75
                $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
76
            }
77
        } ).attr( 'checked', false );
78
        [% END %][% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
79
        // listen submit to trigger qslip on empty checkout
46
        // listen submit to trigger qslip on empty checkout
80
        $('#mainform').bind('submit',function() {
47
        $('#mainform').bind('submit',function() {
81
          if ($('#barcode').val() == '') {
48
            if ($('#barcode').val() == '') {
82
            return printx_window( '[% CircAutoPrintQuickSlip %]' ); }
49
                return printx_window( '[% CircAutoPrintQuickSlip %]' ); 
83
        });[% END %]
50
            }
84
51
        });
85
    [% IF ( CAN_user_circulate_override_renewals ) %]
86
    [% IF ( AllowRenewalLimitOverride ) %]
87
    $( '#override_limit' ).click( function () {
88
        if ( this.checked ) {
89
           $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
90
        } else {
91
           $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
92
        }
93
    } ).attr( 'checked', false );
94
    [% END %]
95
    [% END %]
52
    [% END %]
96
 });
53
});
97
//]]>
54
//]]>
98
</script>
55
</script>
99
</head>
56
</head>
Lines 515-521 No patron matched <span class="ex">[% message %]</span> Link Here
515
    [% ELSE %]
472
    [% ELSE %]
516
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
473
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
517
    [% END %]
474
    [% END %]
518
    <input type="submit" value="Check Out" />
475
    <button type="submit" class="btn"><i class="icon-barcode"></i> Check out</button>
519
476
520
    [% IF ( SpecifyDueDate ) %]<div class="date-select">
477
    [% IF ( SpecifyDueDate ) %]<div class="date-select">
521
        <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
478
        <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
Lines 527-533 No patron matched <span class="ex">[% message %]</span> Link Here
527
[% ELSE %]
484
[% ELSE %]
528
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
485
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
529
[% END %]
486
[% END %]
530
          <input type="button" class="action" id="cleardate" value="Clear" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" />
487
          <button class="btn btn-small action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" ><i class="icon-remove-circle"></i> Clear</button>
531
</div>[% END %]
488
</div>[% END %]
532
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
489
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
533
          <input type="hidden" name="branch" value="[% branch %]" />
490
          <input type="hidden" name="branch" value="[% branch %]" />
Lines 686-1031 No patron matched <span class="ex">[% message %]</span> Link Here
686
<div class="yui-g"><div id="patronlists" class="toptabs">
643
<div class="yui-g"><div id="patronlists" class="toptabs">
687
644
688
<ul>
645
<ul>
689
<li>    [% IF ( issuecount ) %]
646
    <li>
647
        [% IF ( issuecount ) %]
690
            <a href="#checkouts">[% issuecount %] Checkout(s)</a>
648
            <a href="#checkouts">[% issuecount %] Checkout(s)</a>
691
    [% ELSE %]
649
        [% ELSE %]
692
            <a href="#checkouts">0 Checkouts</a>
650
            <a href="#checkouts">0 Checkouts</a>
693
    [% END %]</li>
651
        [% END %]
694
[% IF ( displayrelissues ) %]
652
    </li>
695
<li><a href="#relissues">Relatives' checkouts</a></li>
653
696
[% END %]
654
    [% IF relatives_issues_count %]
697
<li>[% IF ( countreserv ) %]
655
        <li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
656
    [% END %]
657
658
    <li>
659
        [% IF ( countreserv ) %]
698
            <a href="#reserves">[% countreserv %] Hold(s)</a>
660
            <a href="#reserves">[% countreserv %] Hold(s)</a>
699
    [% ELSE %]
661
        [% ELSE %]
700
            <a href="#reserves">0 Holds</a>
662
            <a href="#reserves">0 Holds</a>
701
    [% END %]</li>
663
        [% END %]
702
    <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
664
    </li>
703
665
666
    <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
704
</ul>
667
</ul>
705
668
706
<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
669
<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
707
<div id="checkouts">
670
<div id="checkouts">
708
[% IF ( issuecount ) %]
671
[% IF ( issuecount ) %]
709
    <form name="issues" action="/cgi-bin/koha/reserve/renewscript.pl" method="post" class="checkboxed">
672
    <form name="issues" action="/cgi-bin/koha/tools/export.pl" method="post" class="checkboxed">
710
    <input type="hidden" value="circ" name="destination" />
673
        <table id="issues-table">
711
    <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
674
            <thead>
712
    <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
675
                <tr>
713
    <input type="hidden" name="branch" value="[% branch %]" />
676
                    <th scope="col">Due date</th>
714
        <table id="issuest">
677
                    <th scope="col">Title</th>
715
    <thead><tr>
678
                    <th scope="col">Item type</th>
716
        <th scope="col">Due date</th>
679
                    <th scope="col">Checked out on</th>
717
        <th scope="col">Title</th>
680
                    <th scope="col">Checked out from</th>
718
        <th scope="col">Item type</th>
681
                    <th scope="col">Call no</th>
719
        <th scope="col">Checked out on</th>
682
                    <th scope="col">Charge</th>
720
        <th scope="col">Checked out from</th>
683
                    <th scope="col">Price</th>
721
        <th scope="col">Call no</th>
684
                    <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th>
722
        <th scope="col">Charge</th>
685
                    <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th>
723
        <th scope="col">Price</th>
686
                    <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllExports">select all</a> | <a href="#" id="UncheckAllExports">none</a></p></th>
724
        <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllitems">select all</a> | <a href="#" id="CheckNoitems">none</a></p></th>
687
                </tr>
725
        <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th>
688
            </thead>
726
        [% IF ( exports_enabled ) %]
689
            [% INCLUDE 'checkouts-table-footer.inc' %]
727
          <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllexports">select all</a> | <a href="#" id="CheckNoexports">none</a></p></th>
690
        </table>
728
        [% END %]
691
729
    </tr></thead>
692
        [% IF ( issuecount ) %]
730
[% IF ( todayissues ) %]
693
            <fieldset class="action">
731
[% INCLUDE 'checkouts-table-footer.inc' %]
694
                [% IF ( CAN_user_circulate_override_renewals ) %]
732
	<tbody>
695
                    [% IF ( AllowRenewalLimitOverride ) %]
733
696
                        <label for="override_limit">Override renewal limit:</label>
734
    [% FOREACH todayissue IN todayissues %]
697
                        <input type="checkbox" name="override_limit" id="override_limit" value="1" />
735
    [% IF ( loop.odd ) %]
698
                    [% END %]
736
    <tr>
737
    [% ELSE %]
738
    <tr class="highlight">
739
    [% END %]
740
        [% IF ( todayissue.od ) %]<td class="od">[% ELSE %]<td>[% END %]
741
        <span title="[% todayissue.dd_sort %]">[% todayissue.dd %]</span>
742
743
            [% IF ( todayissue.itemlost ) %]
744
                <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', todayissue.itemlost ) %]</span>
745
            [% END %]
746
            [% IF ( todayissue.damaged ) %]
747
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', todayissue.damaged ) %]</span>
748
            [% END %]
749
        </td>
750
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% todayissue.biblionumber %]&amp;type=intra"><strong>[% todayissue.title |html %][% FOREACH subtitl IN todayissue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- <span class="circ-hlt">[% todayissue.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% todayissue.biblionumber %]&amp;itemnumber=[% todayissue.itemnumber %]#item[% todayissue.itemnumber %]">[% todayissue.barcode %]</a></td>
751
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td>
752
        <td><span title="[% todayissue.displaydate_sort %]">[% todayissue.checkoutdate %]</span></td>
753
        [% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %]
754
        <td>[% todayissue.issuingbranchname %]</td>
755
        <td>[% todayissue.itemcallnumber %]</td>
756
            <td>[% todayissue.charge %]</td>
757
            <td>[% todayissue.replacementprice %]</td>
758
      [% IF ( todayissue.renew_failed ) %]
759
            <td class="problem">Renewal failed</td>
760
      [% ELSE %]
761
        <td><span style="padding: 0 1em;">[% IF ( todayissue.renewals ) %][% todayissue.renewals %][% ELSE %]0[% END %]</span>
762
        [% IF ( todayissue.can_renew ) %]
763
        <input type="checkbox" name="all_items[]" value="[% todayissue.itemnumber %]" checked="checked" style="display: none;" />
764
        [% IF ( todayissue.od ) %]
765
            <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" checked="checked" />
766
        [% ELSE %]
767
            <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" />
768
        [% END %]
769
            [% IF todayissue.renewsallowed && todayissue.renewsleft %]
770
                <span class="renewals">([% todayissue.renewsleft %] of [% todayissue.renewsallowed %] renewals remaining)</span>
771
            [% END %]
772
        [% ELSE %]
773
            [% IF ( todayissue.can_confirm ) %]<span class="renewals-allowed" style="display: none">
774
                <input type="checkbox" name="all_items[]" value="[% todayissue.itemnumber %]" checked="checked" style="display: none;" />
775
                [% IF ( todayissue.od ) %]
776
                    <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" checked="checked" />
777
                [% ELSE %]
778
                    <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" />
779
                [% END %]
780
                </span>
781
                [% IF todayissue.renewsallowed && todayissue.renewsleft %]
782
                    <span class="renewals">([% todayissue.renewsleft %] of [% todayissue.renewsallowed %] renewals remaining)</span>
783
                [% END %]
784
                <span class="renewals-disabled">
785
            [% END %]
786
		[% IF ( todayissue.renew_error_on_reserve ) %]
787
            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
788
		[% END %]
789
                [% IF ( todayissue.renew_error_too_many ) %]
790
            Not renewable
791
                [% END %]
699
                [% END %]
792
            [% IF ( todayissue.can_confirm ) %]
700
                <button class="btn" id="RenewCheckinChecked"><i class="icon-check"></i> Renew or return checked items</button>
793
                </span>
701
                <button class="btn" id="RenewAll"><i class="icon-book"></i> Renew all</button>
794
            [% END %]
702
            </fieldset>
795
        [% END %]
796
        </td>
797
        [% END %]
798
        [% IF ( todayissue.return_failed ) %]
799
            <td class="problem">Checkin failed</td>
800
        [% ELSE %]
801
            [% IF ( todayissue.renew_error_on_reserve ) %]
802
               <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
803
                <input type="checkbox" name="all_barcodes[]" value="[% todayissue.barcode %]" checked="checked" style="display: none;" />
804
                </td>
805
            [% ELSE %]
806
            <td><input type="checkbox" class="radio" name="barcodes[]"  value="[% todayissue.barcode %]" />
807
                <input type="checkbox" name="all_barcodes[]" value="[% todayissue.barcode %]" checked="checked" style="display: none;" />
808
            </td>
809
            [% END %]
810
        [% END %]
811
        [% IF ( exports_enabled ) %]
812
          <td style="text-align:center;">
813
            <input type="checkbox" id="export_[% todayissue.biblionumber %]" name="biblionumbers" value="[% todayissue.biblionumber %]" />
814
            <input type="checkbox" name="itemnumbers" value="[% todayissue.itemnumber %]" style="visibility:hidden;" />
815
          </td>
816
        [% END %]
817
    </tr>
818
    [% END %] <!-- /loop todayissues -->
819
    <!-- /if todayissues -->[% END %]
820
821
[% IF ( previssues ) %]
822
    [% UNLESS ( todayissues ) %]
823
    [% INCLUDE 'checkouts-table-footer.inc' %]
824
        <tbody>
825
    [% END %]
826
    [% IF ( UseTablesortForCirc ) %]<tr id="previous"><th><span title="">Previous checkouts</span></th><th></th><th></th><th><span title=""></span></th><th></th><th></th><th></th><th></th><th></th><th></th>[% IF ( exports_enabled ) %]<th></th>[% END %]</tr>[% ELSE %]<tr id="previous">[% IF ( exports_enabled ) %]<th colspan="11">[% ELSE %]<th colspan="10">[% END %]Previous checkouts</th></tr>[% END %]
827
    [% FOREACH previssue IN previssues %]
828
    [% IF ( loop.odd ) %]
829
        <tr>
830
    [% ELSE %]
831
        <tr class="highlight">
832
    [% END %]
833
        [% IF ( previssue.od ) %]<td class="od">[% ELSE %]<td>[% END %]
834
        <span title="[% previssue.dd_sort %]">[% previssue.dd %]</span>
835
703
836
            [% IF ( previssue.itemlost ) %]
704
            [% IF ( exports_enabled ) %]
837
                <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', previssue.itemlost ) %]</span>
705
                <fieldset>
838
            [% END %]
706
                    <label for="export_formats"><b>Export checkouts using format:</b></label>
839
            [% IF ( previssue.damaged ) %]
707
                    <select name="export_formats" id="export_formats">
840
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', previssue.damaged ) %]</span>
708
                        <option value="iso2709_995">ISO2709 with items</option>
841
            [% END %]
709
                        <option value="iso2709">ISO2709 without items</option>
842
        </td>
710
                        [% IF ( export_with_csv_profile ) %]
843
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% previssue.biblionumber %]&amp;type=intra"><strong>[% previssue.title |html %][% FOREACH subtitl IN previssue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% previssue.biblionumber %]&amp;itemnumber=[% previssue.itemnumber %]#item[% previssue.itemnumber %]">[% previssue.barcode %]</a></td>
711
                            <option value="csv">CSV</option>
844
        <td>
712
                        [% END %]
845
            [% previssue.itemtype %]
713
                    </select>
846
        </td>
714
847
        <td><span title="[% previssue.displaydate_sort %]">[% previssue.displaydate %]</span></td>
715
                   <label for="export_remove_fields">Don't export fields:</label> <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% export_remove_fields %]" title="Use for iso2709 exports" />
848
        [% IF ( previssue.multiple_borrowers ) %]<td>[% previssue.firstname %] [% previssue.surname %]</td>[% END %]
716
                    <input type="hidden" name="op" value="export" />
849
        <td>[% previssue.issuingbranchname %]</td>
717
                    <input type="hidden" id="export_format" name="format" value="iso2709" />
850
        <td>[% previssue.itemcallnumber %]</td>
718
                    <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" />
851
        <td>[% previssue.charge %]</td>
719
                    <input type="hidden" id="record_type" name="record_type" value="bibs" />
852
        <td>[% previssue.replacementprice %]</td>
720
                    <button class="btn btn-small" id="export_submit"><i class="icon-download-alt"></i> Export</button>
853
      [% IF ( previssue.renew_failed ) %]
721
                </fieldset>
854
            <td class="problem">Renewal failed</td>
855
      [% ELSE %]
856
        <td><span style="padding: 0 1em;">[% IF ( previssue.renewals ) %][% previssue.renewals %][% ELSE %]0[% END %]</span>
857
        [% IF ( previssue.can_renew ) %]
858
        <input type="checkbox" name="all_items[]" value="[% previssue.itemnumber %]" checked="checked" style="display: none;" />
859
        [% IF ( previssue.od ) %]
860
            <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" checked="checked" />
861
        [% ELSE %]
862
            <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" />
863
        [% END %]
864
            [% IF previssue.renewsallowed && previssue.renewsleft %]
865
                <span class="renewals">([% previssue.renewsleft %] of [% previssue.renewsallowed %] renewals remaining)</span>
866
            [% END %]
867
        [% ELSE %]
868
            [% IF ( previssue.can_confirm ) %]<span class="renewals-allowed" style="display: none">
869
                <input type="checkbox" name="all_items[]" value="[% previssue.itemnumber %]" checked="checked" style="display: none;" />
870
                [% IF ( previssue.od ) %]
871
                    <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" checked="checked" />
872
                [% ELSE %]
873
                    <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" />
874
                [% END %]
875
                </span>
876
                [% IF previssue.renewsallowed && previssue.renewsleft %]
877
                    <span class="renewals">([% previssue.renewsleft %] of [% previssue.renewsallowed %] renewals remaining)</span>
878
                [% END %]
879
                <span class="renewals-disabled">
880
            [% END %]
881
		[% IF ( previssue.renew_error_on_reserve ) %]
882
            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On hold</a>
883
		[% END %]
884
                [% IF ( previssue.renew_error_too_many ) %]
885
            Not renewable
886
                [% END %]
887
            [% IF ( previssue.can_confirm ) %]
888
                </span>
889
            [% END %]
890
        [% END %]
891
        </td>
892
        [% END %]
893
		  [% IF ( previssue.return_failed ) %]
894
            <td class="problem">Check-in failed</td>
895
        [% ELSE %]
896
            [% IF ( previssue.renew_error_on_reserve ) %]
897
               <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On hold</a>
898
                <input type="checkbox" name="all_barcodes[]" value="[% previssue.barcode %]" checked="checked" style="display: none;" />
899
                </td>
900
            [% ELSE %]
901
            <td><input type="checkbox" class="radio" name="barcodes[]"  value="[% previssue.barcode %]" />
902
                <input type="checkbox" name="all_barcodes[]" value="[% previssue.barcode %]" checked="checked" style="display: none;" />
903
            </td>
904
            [% END %]
722
            [% END %]
905
        [% END %]
723
        [% END %]
906
        [% IF ( exports_enabled ) %]
907
          <td style="text-align:center;">
908
            <input type="checkbox" id="export_[% previssue.biblionumber %]" name="biblionumbers" value="[% previssue.biblionumber %]" />
909
            <input type="checkbox" name="itemnumbers" value="[% previssue.itemnumber %]" style="visibility:hidden;" />
910
          </td>
911
        [% END %]
912
    </tr>
913
    <!-- /loop previssues -->[% END %]
914
<!--/if previssues -->[% END %]
915
      </tbody>
916
    </table>
917
    [% IF ( issuecount ) %]
918
    <fieldset class="action">
919
        [% IF ( CAN_user_circulate_override_renewals ) %]
920
        [% IF ( AllowRenewalLimitOverride ) %]
921
        <label for="override_limit">Override renewal limit:</label>
922
        <input type="checkbox" name="override_limit" id="override_limit" value="1" />
923
        [% END %]
924
        [% END %]
925
        <input type="submit" name="renew_checked" value="Renew or Return checked items" />
926
        <input type="submit" id="renew_all" name="renew_all" value="Renew all" />
927
    </fieldset>
928
        [% IF ( exports_enabled ) %]
929
            <fieldset>
930
            <label for="export_formats"><b>Export checkouts using format:</b></label>
931
            <select name="export_formats" id="export_formats">
932
                <option value="iso2709_995">ISO2709 with items</option>
933
                <option value="iso2709">ISO2709 without items</option>
934
                [% IF ( export_with_csv_profile ) %]
935
                    <option value="csv">CSV</option>
936
                [% END %]
937
938
            </select>
939
           <label for="export_remove_fields">Don't export fields:</label> <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% export_remove_fields %]" title="Use for iso2709 exports" />
940
            <input type="hidden" name="op" value="export" />
941
            <input type="hidden" id="export_format" name="format" value="iso2709" />
942
            <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" />
943
            <input type="hidden" id="record_type" name="record_type" value="bibs" />
944
            <input type="button" id="export_submit" value="Export" />
945
            </fieldset>
946
        [% END %]
947
    [% END %]
948
    </form>
724
    </form>
949
[% ELSE %]
725
[% ELSE %]
950
<p>Patron has nothing checked out.</p>
726
    <p>Patron has nothing checked out.</p>
951
[% END %]
727
[% END %]
952
728
953
</div>
729
</div>
954
730
955
731
956
[% IF ( displayrelissues ) %]
732
[% IF ( relatives_issues_count ) %]
957
<div id="relissues">
733
<div id="relatives-issues">
958
    <table id="relissuest">
734
    <table id="relatives-issues-table">
959
    <thead>
735
        <thead>
960
    <tr>
736
            <tr>
961
        <th scope="col">Due date</th>
737
                <th scope="col">Due date</th>
962
        <th scope="col">Title</th>
738
                <th scope="col">Title</th>
963
        <th scope="col">Item type</th>
739
                <th scope="col">Item type</th>
964
        <th scope="col">Checked out on</th>
740
                <th scope="col">Checked out on</th>
965
        <th scope="col">Checked out from</th>
741
                <th scope="col">Checked out from</th>
966
        <th scope="col">Call no</th>
742
                <th scope="col">Call no</th>
967
        <th scope="col">Charge</th>
743
                <th scope="col">Charge</th>
968
        <th scope="col">Price</th>
744
                <th scope="col">Price</th>
969
        <th scope="col">Patron</th>
745
                <th scope="col">Patron</th>
970
    </tr>
746
            </tr>
971
    </thead>
747
        </thead>
972
[% IF ( relissues ) %]	<tbody>
973
974
    [% FOREACH relissue IN relissues %]
975
    [% IF ( loop.odd ) %]
976
    <tr>
977
    [% ELSE %]
978
    <tr class="highlight">
979
    [% END %]
980
        [% IF ( relissue.overdue ) %]<td class="od">[% ELSE %]<td>[% END %]
981
            <span title="[% relissue.dd_sort %]">[% relissue.dd %]</span></td>
982
983
            [% IF ( relissue.itemlost ) %]
984
                <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', relissue.itemlost ) %]</span>
985
            [% END %]
986
            [% IF ( relissue.damaged ) %]
987
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', relissue.damaged ) %]</span>
988
            [% END %]
989
        </td>
990
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relissue.biblionumber %]&amp;type=intra"><strong>[% relissue.title |html %][% FOREACH subtitl IN relissue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- <span class="circ-hlt">[% relissue.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relissue.biblionumber %]&amp;itemnumber=[% relissue.itemnumber %]#item[% relissue.itemnumber %]">[% relissue.barcode %]</a></td>
991
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td>
992
        <td><span title="[% relissue.displaydate_sort %]">[% relissue.displaydate %]</span></td>
993
        <td>[% relissue.issuingbranchname %]</td>
994
        <td>[% relissue.itemcallnumber %]</td>
995
        <td>[% relissue.charge %]</td>
996
        <td>[% relissue.replacementprice %]</td><td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relissue.borrowernumber %]">[% relissue.firstname %] [% relissue.surname %] ([% relissue.cardnumber %])</a></td>
997
     </tr>
998
    [% END %] <!-- /loop relissues -->
999
    <!-- /if relissues -->[% END %]
1000
[% IF ( relprevissues ) %]
1001
    [% IF ( UseTablesortForCirc ) %]<tr id="relprevious"><th><span title="">Previous checkouts</span></th><th></th><th></th><th><span title=""></span></th><th></th><th></th><th></th><th></th><th></th></tr>[% ELSE %]<tr id="relprevious"><th colspan="9">Previous checkouts</th></tr>[% END %]
1002
    [% FOREACH relprevissue IN relprevissues %]
1003
    [% IF ( loop.odd ) %]
1004
        <tr>
1005
    [% ELSE %]
1006
        <tr class="highlight">
1007
    [% END %]
1008
        [% IF ( relprevissue.overdue ) %]<td class="od">[% ELSE %]<td>[% END %]
1009
        <span title="[% relprevissue.dd_sort %]">[% relprevissue.dd %]</span>
1010
        </td>
1011
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relprevissue.biblionumber %]&amp;type=intra"><strong>[% relprevissue.title |html %][% FOREACH subtitl IN relprevissue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relprevissue.biblionumber %]&amp;itemnumber=[% relprevissue.itemnumber %]#item[% relprevissue.itemnumber %]">[% relprevissue.barcode %]</a></td>
1012
        <td>[% UNLESS noItemTypeImages %][% IF relprevissue.itemtype_image %]<img src="[% relprevissue.itemtype_image %]" alt="" />[% END %][% END %][% relprevissue.itemtype %]</td>
1013
        <td><span title="[% relprevissue.displaydate_sort %]">[% relprevissue.displaydate %]</span></td>
1014
        <td>[% relprevissue.issuingbranchname %]</td>
1015
        <td>[% relprevissue.itemcallnumber %]</td>
1016
	[% IF ( relprevissue.multiple_borrowers ) %]<td>[% relprevissue.firstname %] [% relprevissue.surname %]</td>[% END %]
1017
        <td>[% relprevissue.charge %]</td>
1018
        <td>[% relprevissue.replacementprice %]</td>
1019
        <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relprevissue.borrowernumber %]">[% relprevissue.firstname %] [% relprevissue.surname %] ([% relprevissue.cardnumber %])</a></td>
1020
1021
    </tr>
1022
    <!-- /loop relprevissue -->[% END %]
1023
<!--/if relprevissues -->[% END %]
1024
      </tbody>
1025
    </table>
748
    </table>
1026
1027
</div>
749
</div>
1028
[% END %]<!-- end displayrelissues -->
750
[% END %]
1029
751
1030
[% INCLUDE borrower_debarments.inc %]
752
[% INCLUDE borrower_debarments.inc %]
1031
753
1032
- 

Return to bug 11703