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

(-)a/C4/HoldsQueue.pm (-8 / +59 lines)
Lines 46-51 BEGIN { Link Here
46
46
47
        &TransportCostMatrix
47
        &TransportCostMatrix
48
        &UpdateTransportCostMatrix
48
        &UpdateTransportCostMatrix
49
50
        &MarkHoldPrinted
51
        &GetItemNumberFromTmpHold
49
     );
52
     );
50
}
53
}
51
54
Lines 116-122 Returns hold queue for a holding branch. If branch is omitted, then whole queue Link Here
116
=cut
119
=cut
117
120
118
sub GetHoldsQueueItems {
121
sub GetHoldsQueueItems {
119
    my ($branchlimit) = @_;
122
    my ($branchlimit, $printstatus) = @_;
120
    my $dbh   = C4::Context->dbh;
123
    my $dbh   = C4::Context->dbh;
121
124
122
    my @bind_params = ();
125
    my @bind_params = ();
Lines 130-135 sub GetHoldsQueueItems { Link Here
130
        $query .=" WHERE tmp_holdsqueue.holdingbranch = ?";
133
        $query .=" WHERE tmp_holdsqueue.holdingbranch = ?";
131
        push @bind_params, $branchlimit;
134
        push @bind_params, $branchlimit;
132
    }
135
    }
136
    if (C4::Context->preference('printSlipFromHoldsQueue')){
137
        $query .= $branchlimit ? " AND" : " WHERE";
138
        $query .= " tmp_holdsqueue.print_status = ?";
139
        push @bind_params, $printstatus;
140
    }
133
    $query .= " ORDER BY ccode, location, cn_sort, author, title, pickbranch, reservedate";
141
    $query .= " ORDER BY ccode, location, cn_sort, author, title, pickbranch, reservedate";
134
    my $sth = $dbh->prepare($query);
142
    my $sth = $dbh->prepare($query);
135
    $sth->execute(@bind_params);
143
    $sth->execute(@bind_params);
Lines 267-274 sub GetPendingHoldRequestsForBib { Link Here
267
275
268
    my $dbh = C4::Context->dbh;
276
    my $dbh = C4::Context->dbh;
269
277
270
    my $request_query = "SELECT biblionumber, borrowernumber, itemnumber, priority, reserves.branchcode,
278
    my $request_query = "SELECT reserve_id, biblionumber, borrowernumber, itemnumber, priority, reserves.branchcode,
271
                                reservedate, reservenotes, borrowers.branchcode AS borrowerbranch
279
                                reservedate, reservenotes, borrowers.branchcode AS borrowerbranch, print_status
272
                         FROM reserves
280
                         FROM reserves
273
                         JOIN borrowers USING (borrowernumber)
281
                         JOIN borrowers USING (borrowernumber)
274
                         WHERE biblionumber = ?
282
                         WHERE biblionumber = ?
Lines 386-391 sub MapItemsToHoldRequests { Link Here
386
            if (exists $items_by_itemnumber{$request->{itemnumber}} and
394
            if (exists $items_by_itemnumber{$request->{itemnumber}} and
387
                not exists $allocated_items{$request->{itemnumber}}) {
395
                not exists $allocated_items{$request->{itemnumber}}) {
388
                $item_map{$request->{itemnumber}} = {
396
                $item_map{$request->{itemnumber}} = {
397
                    reserve_id => $request->{reserve_id},
389
                    borrowernumber => $request->{borrowernumber},
398
                    borrowernumber => $request->{borrowernumber},
390
                    biblionumber => $request->{biblionumber},
399
                    biblionumber => $request->{biblionumber},
391
                    holdingbranch =>  $items_by_itemnumber{$request->{itemnumber}}->{holdingbranch},
400
                    holdingbranch =>  $items_by_itemnumber{$request->{itemnumber}}->{holdingbranch},
Lines 393-398 sub MapItemsToHoldRequests { Link Here
393
                    item_level => 1,
402
                    item_level => 1,
394
                    reservedate => $request->{reservedate},
403
                    reservedate => $request->{reservedate},
395
                    reservenotes => $request->{reservenotes},
404
                    reservenotes => $request->{reservenotes},
405
                    print_status => $request->{print_status},
396
                };
406
                };
397
                $allocated_items{$request->{itemnumber}}++;
407
                $allocated_items{$request->{itemnumber}}++;
398
                $num_items_remaining--;
408
                $num_items_remaining--;
Lines 492-497 sub MapItemsToHoldRequests { Link Here
492
            delete $items_by_branch{$holdingbranch} unless @$holding_branch_items;
502
            delete $items_by_branch{$holdingbranch} unless @$holding_branch_items;
493
503
494
            $item_map{$itemnumber} = {
504
            $item_map{$itemnumber} = {
505
                reserve_id => $request->{reserve_id},
495
                borrowernumber => $request->{borrowernumber},
506
                borrowernumber => $request->{borrowernumber},
496
                biblionumber => $request->{biblionumber},
507
                biblionumber => $request->{biblionumber},
497
                holdingbranch => $holdingbranch,
508
                holdingbranch => $holdingbranch,
Lines 499-504 sub MapItemsToHoldRequests { Link Here
499
                item_level => 0,
510
                item_level => 0,
500
                reservedate => $request->{reservedate},
511
                reservedate => $request->{reservedate},
501
                reservenotes => $request->{reservenotes},
512
                reservenotes => $request->{reservenotes},
513
                print_status => $request->{print_status},
502
            };
514
            };
503
            $num_items_remaining--;
515
            $num_items_remaining--;
504
        }
516
        }
Lines 516-529 sub CreatePicklistFromItemMap { Link Here
516
    my $dbh = C4::Context->dbh;
528
    my $dbh = C4::Context->dbh;
517
529
518
    my $sth_load=$dbh->prepare("
530
    my $sth_load=$dbh->prepare("
519
        INSERT INTO tmp_holdsqueue (biblionumber,itemnumber,barcode,surname,firstname,phone,borrowernumber,
531
        INSERT INTO tmp_holdsqueue (reserve_id,biblionumber,itemnumber,barcode,surname,firstname,phone,borrowernumber,
520
                                    cardnumber,reservedate,title, itemcallnumber,
532
                                    cardnumber,reservedate,title, itemcallnumber,
521
                                    holdingbranch,pickbranch,notes, item_level_request)
533
                                    holdingbranch,pickbranch,notes, item_level_request,print_status)
522
        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
534
        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
523
    ");
535
    ");
524
536
525
    foreach my $itemnumber  (sort keys %$item_map) {
537
    foreach my $itemnumber  (sort keys %$item_map) {
526
        my $mapped_item = $item_map->{$itemnumber};
538
        my $mapped_item = $item_map->{$itemnumber};
539
        my $reserve_id = $mapped_item->{reserve_id};
527
        my $biblionumber = $mapped_item->{biblionumber};
540
        my $biblionumber = $mapped_item->{biblionumber};
528
        my $borrowernumber = $mapped_item->{borrowernumber};
541
        my $borrowernumber = $mapped_item->{borrowernumber};
529
        my $pickbranch = $mapped_item->{pickup_branch};
542
        my $pickbranch = $mapped_item->{pickup_branch};
Lines 531-536 sub CreatePicklistFromItemMap { Link Here
531
        my $reservedate = $mapped_item->{reservedate};
544
        my $reservedate = $mapped_item->{reservedate};
532
        my $reservenotes = $mapped_item->{reservenotes};
545
        my $reservenotes = $mapped_item->{reservenotes};
533
        my $item_level = $mapped_item->{item_level};
546
        my $item_level = $mapped_item->{item_level};
547
        my $print_status = $mapped_item->{print_status};
534
548
535
        my $item = GetItem($itemnumber);
549
        my $item = GetItem($itemnumber);
536
        my $barcode = $item->{barcode};
550
        my $barcode = $item->{barcode};
Lines 545-553 sub CreatePicklistFromItemMap { Link Here
545
        my $bib = GetBiblioData($biblionumber);
559
        my $bib = GetBiblioData($biblionumber);
546
        my $title = $bib->{title};
560
        my $title = $bib->{title};
547
561
548
        $sth_load->execute($biblionumber, $itemnumber, $barcode, $surname, $firstname, $phone, $borrowernumber,
562
        $sth_load->execute($reserve_id,$biblionumber, $itemnumber, $barcode, $surname, $firstname, $phone, $borrowernumber,
549
                           $cardnumber, $reservedate, $title, $itemcallnumber,
563
                           $cardnumber, $reservedate, $title, $itemcallnumber,
550
                           $holdingbranch, $pickbranch, $reservenotes, $item_level);
564
                           $holdingbranch, $pickbranch, $reservenotes, $item_level,$print_status);
551
    }
565
    }
552
}
566
}
553
567
Lines 636-641 sub least_cost_branch { Link Here
636
    # XXX return a random @branch with minimum cost instead of the first one;
650
    # XXX return a random @branch with minimum cost instead of the first one;
637
    # return $branch[0] if @branch == 1;
651
    # return $branch[0] if @branch == 1;
638
}
652
}
653
=head2 MarkHoldPrinted
654
    MarkHoldPrinted($reserve_id)
655
    Change print status as printed.
656
=cut
657
658
sub MarkHoldPrinted {
659
   my ( $reserve_id ) = @_;
660
   my $dbh = C4::Context->dbh;
661
   my $strsth="UPDATE reserves INNER JOIN tmp_holdsqueue USING (reserve_id)
662
                SET reserves.print_status = 1 , tmp_holdsqueue.print_status = 1
663
                WHERE reserve_id = ?
664
		";
665
    my $sth = $dbh->prepare($strsth);
666
	$sth->execute($reserve_id);
667
668
    return 1;
669
}
639
670
671
=head2 GetItemNumberFromTmpHold
672
    $itemnumber = GetItemNumberFromTmpHold($reserve_id)
673
    Returns itemnumber associated with hold.
674
    Item number is taken from tmp_holdsqueue table, which is
675
    populated by bulid_holds_queue.pl script.
676
677
=cut
678
sub	GetItemNumberFromTmpHold{
679
	my ( $reserve_id ) = @_;
680
	my $dbh = C4::Context->dbh;
681
	my $strsth="SELECT itemnumber
682
                  FROM tmp_holdsqueue
683
                WHERE reserve_id = ?
684
		";
685
	my $sth = $dbh->prepare($strsth);
686
	$sth->execute($reserve_id);
687
688
	my $data = $sth->fetchrow;
689
	return $data;
690
}
640
691
641
1;
692
1;
(-)a/C4/Reserves.pm (+26 lines)
Lines 129-134 BEGIN { Link Here
129
        &ToggleLowestPriority
129
        &ToggleLowestPriority
130
130
131
        &ReserveSlip
131
        &ReserveSlip
132
        &HoldSlip
132
        &ToggleSuspend
133
        &ToggleSuspend
133
        &SuspendAll
134
        &SuspendAll
134
135
Lines 2231-2236 sub ReserveSlip { Link Here
2231
    );
2232
    );
2232
}
2233
}
2233
2234
2235
=head2 HoldSlip
2236
    HoldSlip($branch, $reserve_id, $itemnumber)
2237
2238
    Returns letter hash ( see C4::Letters::GetPreparedLetter ) or undef
2239
2240
=cut
2241
2242
sub HoldSlip {
2243
    my ($branch, $reserve_id, $itemnumber) = @_;
2244
2245
    my $reserve = GetReserveInfo($reserve_id) or return;
2246
2247
    return  C4::Letters::GetPreparedLetter (
2248
        module => 'circulation',
2249
        letter_code => 'RESERVESLIP',
2250
        branchcode => $branch,
2251
        tables => {
2252
            'reserves'    => $reserve,
2253
            'branches'    => $reserve->{branchcode},
2254
            'borrowers'   => $reserve->{borrowernumber},
2255
            'biblio'      => $reserve->{biblionumber},
2256
            'items'       => $itemnumber,
2257
        },
2258
    );
2259
}
2234
=head2 GetReservesControlBranch
2260
=head2 GetReservesControlBranch
2235
2261
2236
  my $reserves_control_branch = GetReservesControlBranch($item, $borrower);
2262
  my $reserves_control_branch = GetReservesControlBranch($item, $borrower);
(-)a/circ/hold-pull-print.pl (+75 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it under the
6
# terms of the GNU General Public License as published by the Free Software
7
# Foundation; either version 2 of the License, or (at your option) any later
8
# version.
9
#
10
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License along
15
# with Koha; if not, write to the Free Software Foundation, Inc.,
16
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18
use strict;
19
#use warnings; #FIXME - Bug 2505
20
use C4::Context;
21
use C4::Output;
22
use CGI;
23
use C4::Auth qw/:DEFAULT get_session/;
24
use C4::Reserves qw/HoldSlip/;
25
use C4::HoldsQueue qw/GetItemNumberFromTmpHold MarkHoldPrinted/;
26
27
use vars qw($debug);
28
29
BEGIN {
30
    $debug = $ENV{DEBUG} || 0;
31
}
32
33
my $input = new CGI;
34
my $sessionID = $input->cookie("CGISESSID");
35
my $session = get_session($sessionID);
36
37
my @reservations = $input->param('reserve_id');
38
39
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
40
    {
41
        template_name   => "circ/printslip.tmpl",
42
        query           => $input,
43
        type            => "intranet",
44
        authnotrequired => 0,
45
        flagsrequired   => { circulate => "circulate_remaining_permissions" },
46
        debug           => $debug,
47
    }
48
);
49
50
my $userenv = C4::Context->userenv;
51
my $branch = $session->param('branch') || $userenv->{branch} || '';
52
my ($slip, $is_html);
53
54
foreach my $reserve_id (@reservations){
55
        my $itemnumber = GetItemNumberFromTmpHold($reserve_id);
56
57
        if ( my $letter = HoldSlip ($branch, $reserve_id, $itemnumber) ) {
58
            $slip .= $letter->{content};
59
            $is_html = $letter->{is_html};
60
        }
61
        else {
62
            $slip .= "Reserve not found";
63
        }
64
        MarkHoldPrinted($reserve_id);
65
}
66
67
$template->param(
68
    slip => $slip,
69
    plain => !$is_html,
70
    title => "Koha -- Circulation: Hold print",
71
    stylesheet => C4::Context->preference("SlipCSS"),
72
);
73
74
output_html_with_http_headers $input, $cookie, $template->output;
75
(-)a/circ/view_holdsqueue.pl (-2 / +5 lines)
Lines 49-63 my $params = $query->Vars; Link Here
49
my $run_report     = $params->{'run_report'};
49
my $run_report     = $params->{'run_report'};
50
my $branchlimit    = $params->{'branchlimit'};
50
my $branchlimit    = $params->{'branchlimit'};
51
my $itemtypeslimit = $params->{'itemtypeslimit'};
51
my $itemtypeslimit = $params->{'itemtypeslimit'};
52
my $showprinted    = $params->{'showprinted'} ? 1 : 0;
53
52
54
53
if ( $run_report ) {
55
if ( $run_report ) {
54
    # XXX GetHoldsQueueItems() does not support $itemtypeslimit!
56
    # XXX GetHoldsQueueItems() does not support $itemtypeslimit!
55
    my $items = GetHoldsQueueItems($branchlimit, $itemtypeslimit);
57
    my $items = GetHoldsQueueItems( $branchlimit, $showprinted, $itemtypeslimit);
56
    $template->param(
58
    $template->param(
57
        branchlimit     => $branchlimit,
59
        branchlimit     => $branchlimit,
58
        total      => scalar @$items,
60
        total      => scalar @$items,
59
        itemsloop  => $items,
61
        itemsloop  => $items,
60
        run_report => $run_report,
62
        run_report => $run_report,
63
        showprinted => $showprinted,
61
    );
64
    );
62
}
65
}
63
66
Lines 70-79 foreach my $thisitemtype ( sort keys %$itemtypes ) { Link Here
70
        description => $itemtypes->{$thisitemtype}->{'description'},
73
        description => $itemtypes->{$thisitemtype}->{'description'},
71
    };
74
    };
72
}
75
}
73
74
$template->param(
76
$template->param(
75
     branchloop => GetBranchesLoop(C4::Context->userenv->{'branch'}),
77
     branchloop => GetBranchesLoop(C4::Context->userenv->{'branch'}),
76
   itemtypeloop => \@itemtypesloop,
78
   itemtypeloop => \@itemtypesloop,
79
   printenable => C4::Context->preference('printSlipFromHoldsQueue'),
77
);
80
);
78
81
79
# writing the template
82
# writing the template
(-)a/installer/data/mysql/kohastructure.sql (-1 / +5 lines)
Lines 1622-1627 CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b Link Here
1622
  `lowestPriority` tinyint(1) NOT NULL, -- has this hold been pinned to the lowest priority in the holds queue (1 for yes, 0 for no)
1622
  `lowestPriority` tinyint(1) NOT NULL, -- has this hold been pinned to the lowest priority in the holds queue (1 for yes, 0 for no)
1623
  `suspend` BOOLEAN NOT NULL DEFAULT 0, -- in this hold suspended (1 for yes, 0 for no)
1623
  `suspend` BOOLEAN NOT NULL DEFAULT 0, -- in this hold suspended (1 for yes, 0 for no)
1624
  `suspend_until` DATETIME NULL DEFAULT NULL, -- the date this hold is suspended until (NULL for infinitely)
1624
  `suspend_until` DATETIME NULL DEFAULT NULL, -- the date this hold is suspended until (NULL for infinitely)
1625
  `print_status` BOOLEAN NOT NULL DEFAULT 0, -- is this hold printed (1 - yes, 0 - no)
1625
  PRIMARY KEY (`reserve_id`),
1626
  PRIMARY KEY (`reserve_id`),
1626
  KEY `old_reserves_borrowernumber` (`borrowernumber`),
1627
  KEY `old_reserves_borrowernumber` (`borrowernumber`),
1627
  KEY `old_reserves_biblionumber` (`biblionumber`),
1628
  KEY `old_reserves_biblionumber` (`biblionumber`),
Lines 1821-1826 CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha Link Here
1821
  `lowestPriority` tinyint(1) NOT NULL,
1822
  `lowestPriority` tinyint(1) NOT NULL,
1822
  `suspend` BOOLEAN NOT NULL DEFAULT 0,
1823
  `suspend` BOOLEAN NOT NULL DEFAULT 0,
1823
  `suspend_until` DATETIME NULL DEFAULT NULL,
1824
  `suspend_until` DATETIME NULL DEFAULT NULL,
1825
  `print_status` BOOLEAN NOT NULL DEFAULT 0, -- is this hold printed (1 - yes, 0 - no)
1824
  PRIMARY KEY (`reserve_id`),
1826
  PRIMARY KEY (`reserve_id`),
1825
  KEY priorityfoundidx (priority,found),
1827
  KEY priorityfoundidx (priority,found),
1826
  KEY `borrowernumber` (`borrowernumber`),
1828
  KEY `borrowernumber` (`borrowernumber`),
Lines 2491-2496 CREATE TABLE `user_permissions` ( Link Here
2491
2493
2492
DROP TABLE IF EXISTS `tmp_holdsqueue`;
2494
DROP TABLE IF EXISTS `tmp_holdsqueue`;
2493
CREATE TABLE `tmp_holdsqueue` (
2495
CREATE TABLE `tmp_holdsqueue` (
2496
  `reserve_id` int(11) NOT NULL,
2494
  `biblionumber` int(11) default NULL,
2497
  `biblionumber` int(11) default NULL,
2495
  `itemnumber` int(11) default NULL,
2498
  `itemnumber` int(11) default NULL,
2496
  `barcode` varchar(20) default NULL,
2499
  `barcode` varchar(20) default NULL,
Lines 2505-2511 CREATE TABLE `tmp_holdsqueue` ( Link Here
2505
  `holdingbranch` varchar(10) default NULL,
2508
  `holdingbranch` varchar(10) default NULL,
2506
  `pickbranch` varchar(10) default NULL,
2509
  `pickbranch` varchar(10) default NULL,
2507
  `notes` text,
2510
  `notes` text,
2508
  `item_level_request` tinyint(4) NOT NULL default 0
2511
  `item_level_request` tinyint(4) NOT NULL default 0,
2512
  `print_status` BOOLEAN NOT NULL DEFAULT 0
2509
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2513
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2510
2514
2511
--
2515
--
(-)a/installer/data/mysql/updatedatabase.pl (+10 lines)
Lines 8065-8070 if ( CheckVersion($DBversion) ) { Link Here
8065
    SetVersion($DBversion);
8065
    SetVersion($DBversion);
8066
}
8066
}
8067
8067
8068
$DBversion = "3.15.00.XXX";
8069
if (CheckVersion($DBversion)) {
8070
    $dbh->do("ALTER TABLE reserves ADD print_status BOOLEAN NOT NULL DEFAULT '0'");
8071
    $dbh->do("ALTER TABLE old_reserves ADD print_status BOOLEAN NOT NULL DEFAULT '0'");
8072
    $dbh->do("ALTER TABLE tmp_holdsqueue ADD print_status BOOLEAN NOT NULL DEFAULT '0'");
8073
    $dbh->do("ALTER TABLE tmp_holdsqueue ADD reserve_id INT ( 11 ) FIRST");
8074
    $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('printSlipFromHoldsQueue', '0', 'NULL', 'If enabled reserve slips can be printed from Holds Queue screen,', 'YesNo');");
8075
    print "Upgrade to $DBversion done \n";
8076
}
8077
8068
=head1 FUNCTIONS
8078
=head1 FUNCTIONS
8069
8079
8070
=head2 TableExists($table)
8080
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+6 lines)
Lines 112-117 Circulation: Link Here
112
                  slip: "open a print slip window"
112
                  slip: "open a print slip window"
113
            - .
113
            - .
114
        -
114
        -
115
            - pref: printSlipFromHoldsQueue
116
              choices:
117
                    yes: Enable
118
                    no: "Don't enable"
119
            - print reserve slip from holds queue.
120
        -
115
            - Include the stylesheet at
121
            - Include the stylesheet at
116
            - pref: NoticeCSS
122
            - pref: NoticeCSS
117
              class: url
123
              class: url
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-1 / +49 lines)
Lines 24-29 $(document).ready(function() { Link Here
24
        "bAutoWidth": false
24
        "bAutoWidth": false
25
    });
25
    });
26
});
26
});
27
28
function printReservations() {
29
    document.hold_print.submit();
30
}
31
function selectAll () {
32
    if(document.hold_print.reserve_id.length == undefined ){
33
        document.hold_print.reserve_id.checked=true;
34
    }else if(document.hold_print.reserve_id.length > 0) {
35
        for (var i=0; i < document.hold_print.reserve_id.length; i++) {
36
            document.hold_print.reserve_id[i].checked=true;
37
        }
38
    }
39
}
40
function clearAll () {
41
    if(document.hold_print.reserve_id.length == undefined ){
42
        document.hold_print.reserve_id.checked=false;
43
    }else if(document.hold_print.reserve_id.length > 0) {
44
        for (var i=0; i < document.hold_print.reserve_id.length; i++) {
45
            document.hold_print.reserve_id[i].checked=false;
46
        }
47
    }
48
}
27
//]]>
49
//]]>
28
</script>
50
</script>
29
51
Lines 49-58 $(document).ready(function() { Link Here
49
    [% ELSE %]
71
    [% ELSE %]
50
        <div class="dialog message">No items found.</div>
72
        <div class="dialog message">No items found.</div>
51
    [% END %]
73
    [% END %]
74
    [% IF ( printenable ) %]
75
        <p>
76
        <input id="printhold" type="submit" class="submit" onclick="printReservations()" value="Print checked holds"/>
77
        <a href="#" onclick="selectAll(); return false;">Select all</a> |
78
        <a href="#" onclick="clearAll(); return false;">Clear all</a>
79
        <br/>
80
        </p>
81
        <form id="showprinted" name="showprinted" method="get" action="/cgi-bin/koha/circ/view_holdsqueue.pl">
82
            <input type="hidden" name="run_report" value="1"/>
83
            <input type="hidden" name="branchlimit" value="[% branchlimit %]"/>
84
            [% IF ( showprinted ) %]
85
                <input type="hidden" name="showprinted" value="0"/>
86
                <input id="submit_printed" type="submit" class="submit" value="Hide printed holds"/>
87
            [% ELSE %]
88
                <input type="hidden" name="showprinted" value="1"/>
89
                <input id="submit_printed" type="submit" class="submit" value="Show printed holds"/>
90
            [% END %]
91
        </form>
92
    [% END %]
52
    [% IF ( itemsloop ) %]
93
    [% IF ( itemsloop ) %]
94
        <form id="hold_print" name="hold_print" method="get" action="/cgi-bin/koha/circ/hold-pull-print.pl" target="_blank">
53
<table id="holdst">
95
<table id="holdst">
54
	<thead>
96
	<thead>
55
	<tr>
97
	<tr>
98
       [% IF (printenable) %]<th class="hq-check">Check</th>[% END %]
56
        <th class="hq-title">Title</th>
99
        <th class="hq-title">Title</th>
57
        <th class="hq-collection">Collection</th>
100
        <th class="hq-collection">Collection</th>
58
        <th class="hq-itemtype">Item type</th>
101
        <th class="hq-itemtype">Item type</th>
Lines 68-73 $(document).ready(function() { Link Here
68
	</thead>
111
	</thead>
69
     <tbody>[% FOREACH itemsloo IN itemsloop %]
112
     <tbody>[% FOREACH itemsloo IN itemsloop %]
70
        <tr>
113
        <tr>
114
        [% IF ( printenable ) %]
115
			<td class="hq-print"><input type="checkbox" id="res[% itemsloo.reserve_id %]" name="reserve_id" value="[% itemsloo.reserve_id %]"/></td>
116
        [% END %]
71
            <td class="hq-title"><p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itemsloo.biblionumber %]"><strong>[% itemsloo.title |html %]</strong> [% IF ( itemsloo.subtitle ) %][% itemsloo.subtitle %][% END %]</a></p>
117
            <td class="hq-title"><p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itemsloo.biblionumber %]"><strong>[% itemsloo.title |html %]</strong> [% IF ( itemsloo.subtitle ) %][% itemsloo.subtitle %][% END %]</a></p>
72
                         <p><strong>[% itemsloo.author %]</strong>
118
                         <p><strong>[% itemsloo.author %]</strong>
73
                       <div class="hq-pubdata">  [% IF ( itemsloo.publishercode ) %][% itemsloo.publishercode %][% END %]
119
                       <div class="hq-pubdata">  [% IF ( itemsloo.publishercode ) %][% itemsloo.publishercode %][% END %]
Lines 96-101 $(document).ready(function() { Link Here
96
        </tr>
142
        </tr>
97
    [% END %]</tbody>
143
    [% END %]</tbody>
98
    </table>
144
    </table>
145
        [% IF ( printenable ) %]
146
        </form>
147
        [% END %]
99
	[% END %] 
148
	[% END %] 
100
	[% END %]
149
	[% END %]
101
150
102
- 

Return to bug 11651