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 (+137 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') ] || 'issuedate';
54
my $sorting_direction = $input->param('sSortDir_0') || 'desc';
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 = $schema->resultset('Issue')->search(
62
    { borrowernumber => \@borrowernumber },
63
    {
64
        prefetch => { 'item'                => 'biblio' },
65
        order_by => { "-$sorting_direction" => $sorting_column }
66
    }
67
);
68
69
my $borrower;
70
my @checkouts;
71
while ( my $c = $checkouts_rs->next() ) {
72
73
    # No point in fetching this every time if only one borrower
74
    $borrower = $c->borrower()
75
      if ( !$borrower || @borrowernumber > 1 );
76
77
    my $borrowernumber = $borrower->borrowernumber();
78
    my $itemnumber     = $c->item()->itemnumber();
79
    my $biblionumber   = $c->item()->biblionumber();
80
81
    my ($charge) =
82
      GetIssuingCharges( $c->itemnumber()->itemnumber(), $borrowernumber );
83
84
    my ( $can_renew, $can_renew_error ) =
85
      CanBookBeRenewed( $borrowernumber, $itemnumber );
86
87
    my ( $renewals_count, $renewals_allowed, $renewals_remaining ) =
88
      GetRenewCount( $borrowernumber, $itemnumber );
89
90
    push(
91
        @checkouts,
92
        {
93
            DT_RowId           => "$itemnumber-$borrowernumber",
94
            title              => $c->item()->biblio()->title(),
95
            author             => $c->item()->biblio()->author(),
96
            barcode            => $c->item()->barcode(),
97
            itemtype           => $c->item()->effective_itemtype(),
98
            itemnotes          => $c->item()->itemnotes(),
99
            branchcode         => $c->branchcode(),
100
            branchname         => $c->branch->branchname(),
101
            itemcallnumber     => $c->item()->itemcallnumber() || q{},
102
            charge             => $charge,
103
            price              => $c->item->replacementprice() || q{},
104
            can_renew          => $can_renew,
105
            can_renew_error    => $can_renew_error,
106
            itemnumber         => $itemnumber,
107
            borrowernumber     => $borrowernumber,
108
            biblionumber       => $biblionumber,
109
            issuedate          => $c->issuedate(),
110
            date_due           => $c->date_due(),
111
            renewals_count     => $renewals_count,
112
            renewals_allowed   => $renewals_allowed,
113
            renewals_remaining => $renewals_remaining,
114
            issuedate_formatted =>
115
              output_pref( dt_from_string( $c->issuedate() ) ),
116
            date_due_formatted =>
117
              output_pref_due( dt_from_string( $c->date_due() ) ),
118
            subtitle => GetRecordValue(
119
                'subtitle', GetMarcBiblio($biblionumber),
120
                GetFrameworkCode($biblionumber)
121
            ),
122
            borrower => {
123
                surname    => $borrower->surname(),
124
                firstname  => $borrower->firstname(),
125
                cardnumber => $borrower->cardnumber(),
126
            }
127
        }
128
    );
129
}
130
131
my $data;
132
$data->{'iTotalRecords'}        = scalar @checkouts;                 #FIXME
133
$data->{'iTotalDisplayRecords'} = scalar @checkouts;
134
$data->{'sEcho'}                = $input->param('sEcho') || undef;
135
$data->{'aaData'}               = \@checkouts;
136
137
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 (+267 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
                "bSortable": false,
64
                "mDataProp": function ( oObj ) {
65
                    return parseFloat(oObj.charge).toFixed(2);
66
                }
67
            },
68
            {
69
                "bSortable": false,
70
                "mDataProp": "price" },
71
            {
72
                "bSortable": false,
73
                "mDataProp": function ( oObj ) {
74
                    var content = "";
75
                    var span_style = "";
76
                    var span_class = "";
77
78
                    content += "<span style='padding: 0 1em;'>" + oObj.renewals_count + "</span>";
79
80
                    if ( oObj.can_renew ) {
81
                        // Do nothing
82
                    } else if ( oObj.can_renew_error == "on_reserve" ) {
83
                        content += "<span class='renewals-disabled'>"
84
                                + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + _("On hold") + "</a>"
85
                                + "</span>";
86
87
                        span_style = "display: none";
88
                        span_class = "renewals-allowed";
89
                    } else if ( oObj.can_renew_error == "too_many" ) {
90
                        content += "<span class='renewals-disabled'>"
91
                                + _("Not renewable")
92
                                + "</span>";
93
94
                        span_style = "display: none";
95
                        span_class = "renewals-allowed";
96
                    } else {
97
                        content += "<span class='renewals-disabled'>"
98
                                + oObj.can_renew_error
99
                                + "</span>";
100
101
                        span_style = "display: none";
102
                        span_class = "renewals-allowed";
103
                    }
104
105
                    content += "<span class='" + span_class + "' style='" + span_style + "'>"
106
                            +  "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
107
                            +  "</span>";
108
109
                    if ( oObj.renewals_remaining ) {
110
                        content += "<span class='renewals'>("
111
                                + oObj.renewals_remaining
112
                                + " " + _("of") + " "
113
                                + oObj.renewals_allowed + " "
114
                                + _("renewals remaining") + ")</span>"
115
                    }
116
117
118
                    return content;
119
                }
120
            },
121
            {
122
                "bSortable": false,
123
                "mDataProp": function ( oObj ) {
124
                    if ( oObj.can_renew_error == "on_reserve" ) {
125
                        return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + _("On hold") + "</a>";
126
                    } else {
127
                        return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>";
128
                    }
129
                }
130
            },
131
            {
132
                "bVisible": exports_enabled ? true : false,
133
                "bSortable": false,
134
                "mDataProp": function ( oObj ) {
135
                    return "<input type='checkbox' class='export' id='export_" + oObj.biblionumber + "' name='biblionumbers' value='" + oObj.biblionumber + "' />";
136
                }
137
            }
138
        ],
139
        "fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
140
            var total_charge = 0;
141
            var total_price = 0;
142
            for ( var i=0; i < aaData.length; i++ ) {
143
                total_charge += aaData[i]['charge'] * 1;
144
                total_price  += aaData[i]['price'] * 1;
145
            }
146
            var nCells = nRow.getElementsByTagName('td');
147
            nCells[1].innerHTML = total_charge.toFixed(2);
148
            nCells[2].innerHTML = total_price.toFixed(2);
149
        },
150
        "bPaginate": false,
151
        "bProcessing": true,
152
        "bServerSide": true,
153
        "sAjaxSource": '/cgi-bin/koha/api/checkouts.pl',
154
        "fnServerData": function ( sSource, aoData, fnCallback ) {
155
            aoData.push( { "name": "borrowernumber", "value": borrowernumber } );
156
157
            $.getJSON( sSource, aoData, function (json) {
158
                fnCallback(json)
159
            } );
160
        },
161
    });
162
163
    // Don't load relatives' issues table unless it is clicked on
164
    var relativesIssuesTable;
165
    $("#relatives-issues-tab").click( function() {
166
        if ( ! relativesIssuesTable ) {
167
            relativesIssuesTable = $("#relatives-issues-table").dataTable({
168
                "sDom": "<'row-fluid'<'span6'><'span6'>r>t<'row-fluid'>t",
169
                "aaSorting": [],
170
                "aoColumns": [
171
                    {
172
                        "mDataProp": function( oObj ) {
173
                            var today = new Date();
174
                            var due = new Date( oObj.date_due );
175
                            if ( today > due ) {
176
                                return "<span class='overdue'>" + oObj.date_due_formatted + "</span>";
177
                            } else {
178
                                return oObj.date_due_formatted;
179
                            }
180
                        }
181
                    },
182
                    {
183
                        "mDataProp": function ( oObj ) {
184
                            title = "<a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber="
185
                                  + oObj.biblionumber
186
                                  + "'>"
187
                                  + oObj.title;
188
189
                            $.each(oObj.subtitle, function( index, value ) {
190
                                      title += " " + value.subfield;
191
                            });
192
193
                            title += "</a>";
194
195
                            if ( oObj.author ) {
196
                                title += " " + _("by") + " " + oObj.author;
197
                            }
198
199
                            if ( oObj.itemnotes ) {
200
                                var span_class = "";
201
                                if ( $.datepicker.formatDate('yy-mm-dd', new Date(oObj.issuedate) ) == ymd ) {
202
                                    span_class = "circ-hlt";
203
                                }
204
                                title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
205
                            }
206
207
                            title += " "
208
                                  + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber="
209
                                  + oObj.biblionumber
210
                                  + "&itemnumber="
211
                                  + oObj.itemnumber
212
                                  + "#"
213
                                  + oObj.itemnumber
214
                                  + "'>"
215
                                  + oObj.barcode
216
                                  + "</a>";
217
218
                            return title;
219
                        }
220
                    },
221
                    { "mDataProp": "itemtype" },
222
                    { "mDataProp": "issuedate" },
223
                    { "mDataProp": "branchname" },
224
                    { "mDataProp": "itemcallnumber" },
225
                    { "mDataProp": "charge" },
226
                    { "mDataProp": "price" },
227
                    {
228
                        "mDataProp": function( oObj ) {
229
                            return "<a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=" + oObj.borrowernumber + "'>"
230
                                 + oObj.borrower.firstname + " " + oObj.borrower.surname + " (" + oObj.borrower.cardnumber + ")</a>"
231
                        }
232
                    },
233
                ],
234
                "bPaginate": false,
235
                "bProcessing": true,
236
                "bServerSide": true,
237
                "sAjaxSource": '/cgi-bin/koha/api/checkouts.pl',
238
                "fnServerData": function ( sSource, aoData, fnCallback ) {
239
                    $.each(relatives_borrowernumbers, function( index, value ) {
240
                        aoData.push( { "name": "borrowernumber", "value": value } );
241
                    });
242
243
                    $.getJSON( sSource, aoData, function (json) {
244
                        fnCallback(json)
245
                    } );
246
                },
247
            });
248
        }
249
    });
250
251
    $("#issues-table").on("sort",function() {
252
        $("#previous").hide();  // Don't want to see "previous checkouts" header sorted with other rows
253
    });
254
    $("#relatives-issues-table").on("sort",function() {
255
        $("#relprevious").hide();  // Don't want to see "previous checkouts" header sorted with other rows
256
    });
257
258
    if ( AllowRenewalLimitOverride ) {
259
        $( '#override_limit' ).click( function () {
260
            if ( this.checked ) {
261
                $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
262
            } else {
263
                $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
264
            }
265
        } ).attr( 'checked', false );
266
    }
267
 });
(-)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-100 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="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
21
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
22
[% INCLUDE 'timepicker.inc' %]
22
[% INCLUDE 'timepicker.inc' %]
23
<script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script>
23
<script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script>
24
<script type="text/javascript" src="[% themelang %]/js/checkouts.js"></script>
24
<script type="text/javascript">
25
<script type="text/javascript">
25
//<![CDATA[
26
//<![CDATA[
27
/* Set some variable needed in circulation.js */
28
var interface = "[% interface %]";
29
var theme = "[% theme %]";
30
var borrowernumber = "[% borrowernumber %]";
31
var branchcode = "[% branch %]";
32
var exports_enabled = "[% exports_enabled %]";
33
var AllowRenewalLimitOverride = [% CAN_user_circulate_override_renewals && AllowRenewalLimitOverride %];
34
var relatives_borrowernumbers = new Array();
35
[% FOREACH b IN relatives_borrowernumbers %]
36
    relatives_borrowernumbers.push("[% b %]");
37
[% END %]
38
26
var MSG_ADD_MESSAGE = _("Add a new message");
39
var MSG_ADD_MESSAGE = _("Add a new message");
27
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
40
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
28
[% IF ( UseTablesortForCirc && dateformat == 'metric' ) %]dt_add_type_uk_date();[% END %]
41
[% IF ( UseTablesortForCirc && dateformat == 'metric' ) %]dt_add_type_uk_date();[% END %]
29
[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
42
[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
30
[% UNLESS ( borrowernumber ) %][% UNLESS ( CGIselectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
43
[% UNLESS ( borrowernumber ) %][% UNLESS ( CGIselectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
31
	 $(document).ready(function() {
44
32
        $('#patronlists').tabs([% IF ( UseTablesortForCirc ) %]{
45
$(document).ready(function() {
33
            // Correct table sizing for tables hidden in tabs
46
    [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
34
            // http://www.datatables.net/examples/api/tabs_and_scrolling.html
35
            "show": function(event, ui) {
36
                var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable();
37
                if ( oTable.length > 0 ) {
38
                    oTable.fnAdjustColumnSizing();
39
                }
40
            }
41
        }[% END %]);
42
        [% IF ( UseTablesortForCirc ) %]
43
        $("#issuest").dataTable($.extend(true, {}, dataTablesDefaults, {
44
            "sDom": 't',
45
            "aaSorting": [],
46
            "aoColumnDefs": [
47
                { "aTargets": [ -1, -2[% IF ( exports_enabled ) %], -3[% END %] ], "bSortable": false, "bSearchable": false }
48
            ],
49
            "aoColumns": [
50
                { "sType": "title-string" },{ "sType": "html" },null,{ "sType": "title-string" },null,null,null,null,null,null[% IF ( exports_enabled ) %],null[% END %]
51
            ],
52
            "bPaginate": false
53
        }));
54
55
        $("#relissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
56
            "sDom": 't',
57
            "aaSorting": [],
58
            "aoColumns": [
59
                { "sType": "title-string" },{ "sType": "html" },null,{ "sType": "title-string" },null,null,null,null,{ "sType": "html" }
60
            ],
61
            "bPaginate": false
62
        }));
63
64
        $("#issuest").on("sort",function() {
65
            $("#previous").hide();  // Don't want to see "previous checkouts" header sorted with other rows
66
        });
67
        $("#relissuest").on("sort",function() {
68
            $("#relprevious").hide();  // Don't want to see "previous checkouts" header sorted with other rows
69
        });
70
        [% END %]
71
        [% IF ( AllowRenewalLimitOverride ) %]
72
        $( '#override_limit' ).click( function () {
73
            if ( this.checked ) {
74
                $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
75
            } else {
76
                $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
77
            }
78
        } ).attr( 'checked', false );
79
        [% END %][% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
80
        // listen submit to trigger qslip on empty checkout
47
        // listen submit to trigger qslip on empty checkout
81
        $('#mainform').bind('submit',function() {
48
        $('#mainform').bind('submit',function() {
82
          if ($('#barcode').val() == '') {
49
            if ($('#barcode').val() == '') {
83
            return printx_window( '[% CircAutoPrintQuickSlip %]' ); }
50
                return printx_window( '[% CircAutoPrintQuickSlip %]' );
84
        });[% END %]
51
            }
85
52
        });
86
    [% IF ( CAN_user_circulate_override_renewals ) %]
87
    [% IF ( AllowRenewalLimitOverride ) %]
88
    $( '#override_limit' ).click( function () {
89
        if ( this.checked ) {
90
           $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
91
        } else {
92
           $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
93
        }
94
    } ).attr( 'checked', false );
95
    [% END %]
96
    [% END %]
53
    [% END %]
97
 });
54
});
98
//]]>
55
//]]>
99
</script>
56
</script>
100
</head>
57
</head>
Lines 516-522 No patron matched <span class="ex">[% message %]</span> Link Here
516
    [% ELSE %]
473
    [% ELSE %]
517
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
474
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
518
    [% END %]
475
    [% END %]
519
    <input type="submit" value="Check Out" />
476
    <button type="submit" class="btn"><i class="icon-barcode"></i> Check out</button>
520
477
521
    [% IF ( SpecifyDueDate ) %]<div class="date-select">
478
    [% IF ( SpecifyDueDate ) %]<div class="date-select">
522
        <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
479
        <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
Lines 528-534 No patron matched <span class="ex">[% message %]</span> Link Here
528
[% ELSE %]
485
[% ELSE %]
529
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
486
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
530
[% END %]
487
[% END %]
531
          <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;" />
488
          <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>
532
</div>[% END %]
489
</div>[% END %]
533
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
490
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
534
          <input type="hidden" name="branch" value="[% branch %]" />
491
          <input type="hidden" name="branch" value="[% branch %]" />
Lines 687-1032 No patron matched <span class="ex">[% message %]</span> Link Here
687
<div class="yui-g"><div id="patronlists" class="toptabs">
644
<div class="yui-g"><div id="patronlists" class="toptabs">
688
645
689
<ul>
646
<ul>
690
<li>    [% IF ( issuecount ) %]
647
    <li>
648
        [% IF ( issuecount ) %]
691
            <a href="#checkouts">[% issuecount %] Checkout(s)</a>
649
            <a href="#checkouts">[% issuecount %] Checkout(s)</a>
692
    [% ELSE %]
650
        [% ELSE %]
693
            <a href="#checkouts">0 Checkouts</a>
651
            <a href="#checkouts">0 Checkouts</a>
694
    [% END %]</li>
652
        [% END %]
695
[% IF ( displayrelissues ) %]
653
    </li>
696
<li><a href="#relissues">Relatives' checkouts</a></li>
654
697
[% END %]
655
    [% IF relatives_issues_count %]
698
<li>[% IF ( countreserv ) %]
656
        <li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
657
    [% END %]
658
659
    <li>
660
        [% IF ( countreserv ) %]
699
            <a href="#reserves">[% countreserv %] Hold(s)</a>
661
            <a href="#reserves">[% countreserv %] Hold(s)</a>
700
    [% ELSE %]
662
        [% ELSE %]
701
            <a href="#reserves">0 Holds</a>
663
            <a href="#reserves">0 Holds</a>
702
    [% END %]</li>
664
        [% END %]
703
    <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
665
    </li>
704
666
667
    <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
705
</ul>
668
</ul>
706
669
707
<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
670
<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
708
<div id="checkouts">
671
<div id="checkouts">
709
[% IF ( issuecount ) %]
672
[% IF ( issuecount ) %]
710
    <form name="issues" action="/cgi-bin/koha/reserve/renewscript.pl" method="post" class="checkboxed">
673
    <form name="issues" action="/cgi-bin/koha/tools/export.pl" method="post" class="checkboxed">
711
    <input type="hidden" value="circ" name="destination" />
674
        <table id="issues-table">
712
    <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
675
            <thead>
713
    <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
676
                <tr>
714
    <input type="hidden" name="branch" value="[% branch %]" />
677
                    <th scope="col">Due date</th>
715
        <table id="issuest">
678
                    <th scope="col">Title</th>
716
    <thead><tr>
679
                    <th scope="col">Item type</th>
717
        <th scope="col">Due date</th>
680
                    <th scope="col">Checked out on</th>
718
        <th scope="col">Title</th>
681
                    <th scope="col">Checked out from</th>
719
        <th scope="col">Item type</th>
682
                    <th scope="col">Call no</th>
720
        <th scope="col">Checked out on</th>
683
                    <th scope="col">Charge</th>
721
        <th scope="col">Checked out from</th>
684
                    <th scope="col">Price</th>
722
        <th scope="col">Call no</th>
685
                    <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th>
723
        <th scope="col">Charge</th>
686
                    <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th>
724
        <th scope="col">Price</th>
687
                    <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllExports">select all</a> | <a href="#" id="UncheckAllExports">none</a></p></th>
725
        <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllitems">select all</a> | <a href="#" id="CheckNoitems">none</a></p></th>
688
                </tr>
726
        <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th>
689
            </thead>
727
        [% IF ( exports_enabled ) %]
690
            [% INCLUDE 'checkouts-table-footer.inc' %]
728
          <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllexports">select all</a> | <a href="#" id="CheckNoexports">none</a></p></th>
691
        </table>
729
        [% END %]
692
730
    </tr></thead>
693
        [% IF ( issuecount ) %]
731
[% IF ( todayissues ) %]
694
            <fieldset class="action">
732
[% INCLUDE 'checkouts-table-footer.inc' %]
695
                [% IF ( CAN_user_circulate_override_renewals ) %]
733
	<tbody>
696
                    [% IF ( AllowRenewalLimitOverride ) %]
734
697
                        <label for="override_limit">Override renewal limit:</label>
735
    [% FOREACH todayissue IN todayissues %]
698
                        <input type="checkbox" name="override_limit" id="override_limit" value="1" />
736
    [% IF ( loop.odd ) %]
699
                    [% END %]
737
    <tr>
738
    [% ELSE %]
739
    <tr class="highlight">
740
    [% END %]
741
        [% IF ( todayissue.od ) %]<td class="od">[% ELSE %]<td>[% END %]
742
        <span title="[% todayissue.dd_sort %]">[% todayissue.dd %]</span>
743
744
            [% IF ( todayissue.itemlost ) %]
745
                <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', todayissue.itemlost ) %]</span>
746
            [% END %]
747
            [% IF ( todayissue.damaged ) %]
748
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', todayissue.damaged ) %]</span>
749
            [% END %]
750
        </td>
751
        <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>
752
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td>
753
        <td><span title="[% todayissue.displaydate_sort %]">[% todayissue.checkoutdate %]</span></td>
754
        [% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %]
755
        <td>[% todayissue.issuingbranchname %]</td>
756
        <td>[% todayissue.itemcallnumber %]</td>
757
            <td>[% todayissue.charge %]</td>
758
            <td>[% todayissue.replacementprice %]</td>
759
      [% IF ( todayissue.renew_failed ) %]
760
            <td class="problem">Renewal failed</td>
761
      [% ELSE %]
762
        <td><span style="padding: 0 1em;">[% IF ( todayissue.renewals ) %][% todayissue.renewals %][% ELSE %]0[% END %]</span>
763
        [% IF ( todayissue.can_renew ) %]
764
        <input type="checkbox" name="all_items[]" value="[% todayissue.itemnumber %]" checked="checked" style="display: none;" />
765
        [% IF ( todayissue.od ) %]
766
            <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" checked="checked" />
767
        [% ELSE %]
768
            <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" />
769
        [% END %]
770
            [% IF todayissue.renewsallowed && todayissue.renewsleft %]
771
                <span class="renewals">([% todayissue.renewsleft %] of [% todayissue.renewsallowed %] renewals remaining)</span>
772
            [% END %]
773
        [% ELSE %]
774
            [% IF ( todayissue.can_confirm ) %]<span class="renewals-allowed" style="display: none">
775
                <input type="checkbox" name="all_items[]" value="[% todayissue.itemnumber %]" checked="checked" style="display: none;" />
776
                [% IF ( todayissue.od ) %]
777
                    <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" checked="checked" />
778
                [% ELSE %]
779
                    <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" />
780
                [% END %]
781
                </span>
782
                [% IF todayissue.renewsallowed && todayissue.renewsleft %]
783
                    <span class="renewals">([% todayissue.renewsleft %] of [% todayissue.renewsallowed %] renewals remaining)</span>
784
                [% END %]
785
                <span class="renewals-disabled">
786
            [% END %]
787
		[% IF ( todayissue.renew_error_on_reserve ) %]
788
            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
789
		[% END %]
790
                [% IF ( todayissue.renew_error_too_many ) %]
791
            Not renewable
792
                [% END %]
700
                [% END %]
793
            [% IF ( todayissue.can_confirm ) %]
701
                <button class="btn" id="RenewCheckinChecked"><i class="icon-check"></i> Renew or return checked items</button>
794
                </span>
702
                <button class="btn" id="RenewAll"><i class="icon-book"></i> Renew all</button>
795
            [% END %]
703
            </fieldset>
796
        [% END %]
797
        </td>
798
        [% END %]
799
        [% IF ( todayissue.return_failed ) %]
800
            <td class="problem">Checkin failed</td>
801
        [% ELSE %]
802
            [% IF ( todayissue.renew_error_on_reserve ) %]
803
               <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
804
                <input type="checkbox" name="all_barcodes[]" value="[% todayissue.barcode %]" checked="checked" style="display: none;" />
805
                </td>
806
            [% ELSE %]
807
            <td><input type="checkbox" class="radio" name="barcodes[]"  value="[% todayissue.barcode %]" />
808
                <input type="checkbox" name="all_barcodes[]" value="[% todayissue.barcode %]" checked="checked" style="display: none;" />
809
            </td>
810
            [% END %]
811
        [% END %]
812
        [% IF ( exports_enabled ) %]
813
          <td style="text-align:center;">
814
            <input type="checkbox" id="export_[% todayissue.biblionumber %]" name="biblionumbers" value="[% todayissue.biblionumber %]" />
815
            <input type="checkbox" name="itemnumbers" value="[% todayissue.itemnumber %]" style="visibility:hidden;" />
816
          </td>
817
        [% END %]
818
    </tr>
819
    [% END %] <!-- /loop todayissues -->
820
    <!-- /if todayissues -->[% END %]
821
822
[% IF ( previssues ) %]
823
    [% UNLESS ( todayissues ) %]
824
    [% INCLUDE 'checkouts-table-footer.inc' %]
825
        <tbody>
826
    [% END %]
827
    [% 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 %]
828
    [% FOREACH previssue IN previssues %]
829
    [% IF ( loop.odd ) %]
830
        <tr>
831
    [% ELSE %]
832
        <tr class="highlight">
833
    [% END %]
834
        [% IF ( previssue.od ) %]<td class="od">[% ELSE %]<td>[% END %]
835
        <span title="[% previssue.dd_sort %]">[% previssue.dd %]</span>
836
704
837
            [% IF ( previssue.itemlost ) %]
705
            [% IF ( exports_enabled ) %]
838
                <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', previssue.itemlost ) %]</span>
706
                <fieldset>
839
            [% END %]
707
                    <label for="export_formats"><b>Export checkouts using format:</b></label>
840
            [% IF ( previssue.damaged ) %]
708
                    <select name="export_formats" id="export_formats">
841
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', previssue.damaged ) %]</span>
709
                        <option value="iso2709_995">ISO2709 with items</option>
842
            [% END %]
710
                        <option value="iso2709">ISO2709 without items</option>
843
        </td>
711
                        [% IF ( export_with_csv_profile ) %]
844
        <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>
712
                            <option value="csv">CSV</option>
845
        <td>
713
                        [% END %]
846
            [% previssue.itemtype %]
714
                    </select>
847
        </td>
715
848
        <td><span title="[% previssue.displaydate_sort %]">[% previssue.displaydate %]</span></td>
716
                   <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" />
849
        [% IF ( previssue.multiple_borrowers ) %]<td>[% previssue.firstname %] [% previssue.surname %]</td>[% END %]
717
                    <input type="hidden" name="op" value="export" />
850
        <td>[% previssue.issuingbranchname %]</td>
718
                    <input type="hidden" id="export_format" name="format" value="iso2709" />
851
        <td>[% previssue.itemcallnumber %]</td>
719
                    <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" />
852
        <td>[% previssue.charge %]</td>
720
                    <input type="hidden" id="record_type" name="record_type" value="bibs" />
853
        <td>[% previssue.replacementprice %]</td>
721
                    <button class="btn btn-small" id="export_submit"><i class="icon-download-alt"></i> Export</button>
854
      [% IF ( previssue.renew_failed ) %]
722
                </fieldset>
855
            <td class="problem">Renewal failed</td>
856
      [% ELSE %]
857
        <td><span style="padding: 0 1em;">[% IF ( previssue.renewals ) %][% previssue.renewals %][% ELSE %]0[% END %]</span>
858
        [% IF ( previssue.can_renew ) %]
859
        <input type="checkbox" name="all_items[]" value="[% previssue.itemnumber %]" checked="checked" style="display: none;" />
860
        [% IF ( previssue.od ) %]
861
            <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" checked="checked" />
862
        [% ELSE %]
863
            <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" />
864
        [% END %]
865
            [% IF previssue.renewsallowed && previssue.renewsleft %]
866
                <span class="renewals">([% previssue.renewsleft %] of [% previssue.renewsallowed %] renewals remaining)</span>
867
            [% END %]
868
        [% ELSE %]
869
            [% IF ( previssue.can_confirm ) %]<span class="renewals-allowed" style="display: none">
870
                <input type="checkbox" name="all_items[]" value="[% previssue.itemnumber %]" checked="checked" style="display: none;" />
871
                [% IF ( previssue.od ) %]
872
                    <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" checked="checked" />
873
                [% ELSE %]
874
                    <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" />
875
                [% END %]
876
                </span>
877
                [% IF previssue.renewsallowed && previssue.renewsleft %]
878
                    <span class="renewals">([% previssue.renewsleft %] of [% previssue.renewsallowed %] renewals remaining)</span>
879
                [% END %]
880
                <span class="renewals-disabled">
881
            [% END %]
882
		[% IF ( previssue.renew_error_on_reserve ) %]
883
            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On hold</a>
884
		[% END %]
885
                [% IF ( previssue.renew_error_too_many ) %]
886
            Not renewable
887
                [% END %]
888
            [% IF ( previssue.can_confirm ) %]
889
                </span>
890
            [% END %]
891
        [% END %]
892
        </td>
893
        [% END %]
894
		  [% IF ( previssue.return_failed ) %]
895
            <td class="problem">Check-in failed</td>
896
        [% ELSE %]
897
            [% IF ( previssue.renew_error_on_reserve ) %]
898
               <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On hold</a>
899
                <input type="checkbox" name="all_barcodes[]" value="[% previssue.barcode %]" checked="checked" style="display: none;" />
900
                </td>
901
            [% ELSE %]
902
            <td><input type="checkbox" class="radio" name="barcodes[]"  value="[% previssue.barcode %]" />
903
                <input type="checkbox" name="all_barcodes[]" value="[% previssue.barcode %]" checked="checked" style="display: none;" />
904
            </td>
905
            [% END %]
723
            [% END %]
906
        [% END %]
724
        [% END %]
907
        [% IF ( exports_enabled ) %]
908
          <td style="text-align:center;">
909
            <input type="checkbox" id="export_[% previssue.biblionumber %]" name="biblionumbers" value="[% previssue.biblionumber %]" />
910
            <input type="checkbox" name="itemnumbers" value="[% previssue.itemnumber %]" style="visibility:hidden;" />
911
          </td>
912
        [% END %]
913
    </tr>
914
    <!-- /loop previssues -->[% END %]
915
<!--/if previssues -->[% END %]
916
      </tbody>
917
    </table>
918
    [% IF ( issuecount ) %]
919
    <fieldset class="action">
920
        [% IF ( CAN_user_circulate_override_renewals ) %]
921
        [% IF ( AllowRenewalLimitOverride ) %]
922
        <label for="override_limit">Override renewal limit:</label>
923
        <input type="checkbox" name="override_limit" id="override_limit" value="1" />
924
        [% END %]
925
        [% END %]
926
        <input type="submit" name="renew_checked" value="Renew or Return checked items" />
927
        <input type="submit" id="renew_all" name="renew_all" value="Renew all" />
928
    </fieldset>
929
        [% IF ( exports_enabled ) %]
930
            <fieldset>
931
            <label for="export_formats"><b>Export checkouts using format:</b></label>
932
            <select name="export_formats" id="export_formats">
933
                <option value="iso2709_995">ISO2709 with items</option>
934
                <option value="iso2709">ISO2709 without items</option>
935
                [% IF ( export_with_csv_profile ) %]
936
                    <option value="csv">CSV</option>
937
                [% END %]
938
939
            </select>
940
           <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" />
941
            <input type="hidden" name="op" value="export" />
942
            <input type="hidden" id="export_format" name="format" value="iso2709" />
943
            <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" />
944
            <input type="hidden" id="record_type" name="record_type" value="bibs" />
945
            <input type="button" id="export_submit" value="Export" />
946
            </fieldset>
947
        [% END %]
948
    [% END %]
949
    </form>
725
    </form>
950
[% ELSE %]
726
[% ELSE %]
951
<p>Patron has nothing checked out.</p>
727
    <p>Patron has nothing checked out.</p>
952
[% END %]
728
[% END %]
953
729
954
</div>
730
</div>
955
731
956
732
957
[% IF ( displayrelissues ) %]
733
[% IF ( relatives_issues_count ) %]
958
<div id="relissues">
734
<div id="relatives-issues">
959
    <table id="relissuest">
735
    <table id="relatives-issues-table">
960
    <thead>
736
        <thead>
961
    <tr>
737
            <tr>
962
        <th scope="col">Due date</th>
738
                <th scope="col">Due date</th>
963
        <th scope="col">Title</th>
739
                <th scope="col">Title</th>
964
        <th scope="col">Item type</th>
740
                <th scope="col">Item type</th>
965
        <th scope="col">Checked out on</th>
741
                <th scope="col">Checked out on</th>
966
        <th scope="col">Checked out from</th>
742
                <th scope="col">Checked out from</th>
967
        <th scope="col">Call no</th>
743
                <th scope="col">Call no</th>
968
        <th scope="col">Charge</th>
744
                <th scope="col">Charge</th>
969
        <th scope="col">Price</th>
745
                <th scope="col">Price</th>
970
        <th scope="col">Patron</th>
746
                <th scope="col">Patron</th>
971
    </tr>
747
            </tr>
972
    </thead>
748
        </thead>
973
[% IF ( relissues ) %]	<tbody>
974
975
    [% FOREACH relissue IN relissues %]
976
    [% IF ( loop.odd ) %]
977
    <tr>
978
    [% ELSE %]
979
    <tr class="highlight">
980
    [% END %]
981
        [% IF ( relissue.overdue ) %]<td class="od">[% ELSE %]<td>[% END %]
982
            <span title="[% relissue.dd_sort %]">[% relissue.dd %]</span></td>
983
984
            [% IF ( relissue.itemlost ) %]
985
                <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', relissue.itemlost ) %]</span>
986
            [% END %]
987
            [% IF ( relissue.damaged ) %]
988
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', relissue.damaged ) %]</span>
989
            [% END %]
990
        </td>
991
        <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>
992
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td>
993
        <td><span title="[% relissue.displaydate_sort %]">[% relissue.displaydate %]</span></td>
994
        <td>[% relissue.issuingbranchname %]</td>
995
        <td>[% relissue.itemcallnumber %]</td>
996
        <td>[% relissue.charge %]</td>
997
        <td>[% relissue.replacementprice %]</td><td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relissue.borrowernumber %]">[% relissue.firstname %] [% relissue.surname %] ([% relissue.cardnumber %])</a></td>
998
     </tr>
999
    [% END %] <!-- /loop relissues -->
1000
    <!-- /if relissues -->[% END %]
1001
[% IF ( relprevissues ) %]
1002
    [% 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 %]
1003
    [% FOREACH relprevissue IN relprevissues %]
1004
    [% IF ( loop.odd ) %]
1005
        <tr>
1006
    [% ELSE %]
1007
        <tr class="highlight">
1008
    [% END %]
1009
        [% IF ( relprevissue.overdue ) %]<td class="od">[% ELSE %]<td>[% END %]
1010
        <span title="[% relprevissue.dd_sort %]">[% relprevissue.dd %]</span>
1011
        </td>
1012
        <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>
1013
        <td>[% UNLESS noItemTypeImages %][% IF relprevissue.itemtype_image %]<img src="[% relprevissue.itemtype_image %]" alt="" />[% END %][% END %][% relprevissue.itemtype %]</td>
1014
        <td><span title="[% relprevissue.displaydate_sort %]">[% relprevissue.displaydate %]</span></td>
1015
        <td>[% relprevissue.issuingbranchname %]</td>
1016
        <td>[% relprevissue.itemcallnumber %]</td>
1017
	[% IF ( relprevissue.multiple_borrowers ) %]<td>[% relprevissue.firstname %] [% relprevissue.surname %]</td>[% END %]
1018
        <td>[% relprevissue.charge %]</td>
1019
        <td>[% relprevissue.replacementprice %]</td>
1020
        <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relprevissue.borrowernumber %]">[% relprevissue.firstname %] [% relprevissue.surname %] ([% relprevissue.cardnumber %])</a></td>
1021
1022
    </tr>
1023
    <!-- /loop relprevissue -->[% END %]
1024
<!--/if relprevissues -->[% END %]
1025
      </tbody>
1026
    </table>
749
    </table>
1027
1028
</div>
750
</div>
1029
[% END %]<!-- end displayrelissues -->
751
[% END %]
1030
752
1031
[% INCLUDE borrower_debarments.inc %]
753
[% INCLUDE borrower_debarments.inc %]
1032
754
1033
- 

Return to bug 11703