Lines 25-31
This script displays items in the tmp_holdsqueue table
Link Here
|
25 |
use Modern::Perl; |
25 |
use Modern::Perl; |
26 |
use CGI qw ( -utf8 ); |
26 |
use CGI qw ( -utf8 ); |
27 |
use C4::Auth qw( get_template_and_user ); |
27 |
use C4::Auth qw( get_template_and_user ); |
28 |
use C4::Output qw( output_html_with_http_headers ); |
28 |
use C4::Output qw( output_html_with_http_headers pagination_bar ); |
29 |
use C4::HoldsQueue qw( GetHoldsQueueItems ); |
29 |
use C4::HoldsQueue qw( GetHoldsQueueItems ); |
30 |
use Koha::BiblioFrameworks; |
30 |
use Koha::BiblioFrameworks; |
31 |
use Koha::ItemTypes; |
31 |
use Koha::ItemTypes; |
Lines 43-58
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
Link Here
|
43 |
my $params = $query->Vars; |
43 |
my $params = $query->Vars; |
44 |
my $run_report = $params->{'run_report'}; |
44 |
my $run_report = $params->{'run_report'}; |
45 |
my $branchlimit = $params->{'branchlimit'}; |
45 |
my $branchlimit = $params->{'branchlimit'}; |
46 |
my $itemtypeslimit = $params->{'itemtypeslimit'}; |
46 |
my $limit = $params->{'limit'} || 20; |
|
|
47 |
my $page = $params->{'page'} || 1; |
47 |
|
48 |
|
48 |
if ( $run_report ) { |
49 |
if ( $run_report ) { |
49 |
# XXX GetHoldsQueueItems() does not support $itemtypeslimit! |
50 |
my ( $items, $total ) = GetHoldsQueueItems( $branchlimit, $limit, $page ); |
50 |
my $items = GetHoldsQueueItems($branchlimit, $itemtypeslimit); |
51 |
|
|
|
52 |
my $pages = int( $total / $limit ) + ( ( $total % $limit ) > 0 ? 1 : 0 ); |
53 |
warn "LIMIT: $limit"; |
54 |
warn "PAGES: $pages"; |
51 |
$template->param( |
55 |
$template->param( |
52 |
branchlimit => $branchlimit, |
56 |
branchlimit => $branchlimit, |
53 |
total => scalar @$items, |
57 |
total => $total, |
54 |
itemsloop => $items, |
58 |
itemsloop => $items, |
55 |
run_report => $run_report, |
59 |
run_report => $run_report, |
|
|
60 |
page => $page, |
61 |
limit => $limit, |
62 |
pagination_bar => pagination_bar( |
63 |
'view_holdsqueue.pl', |
64 |
$pages, |
65 |
$page, |
66 |
'page', |
67 |
{ |
68 |
branchlimit => $branchlimit, |
69 |
itemtypeslimit => $itemtypeslimit, |
70 |
ccodeslimit => $ccodeslimit, |
71 |
locationslimit => $locationslimit, |
72 |
limit => $limit, |
73 |
run_report => 1, |
74 |
} |
75 |
), |
56 |
); |
76 |
); |
57 |
} |
77 |
} |
58 |
|
78 |
|