Lines 46-52
function Click$function_name(i) {
Link Here
|
46 |
my $launcher = sub { |
46 |
my $launcher = sub { |
47 |
my ( $params ) = @_; |
47 |
my ( $params ) = @_; |
48 |
my $cgi = $params->{cgi}; |
48 |
my $cgi = $params->{cgi}; |
49 |
my $results_per_page = 30; |
|
|
50 |
my $current_page = $cgi->param('page') || 1; |
49 |
my $current_page = $cgi->param('page') || 1; |
51 |
|
50 |
|
52 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
51 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
Lines 61-67
my $launcher = sub {
Link Here
|
61 |
my $sth; |
60 |
my $sth; |
62 |
my @cn; |
61 |
my @cn; |
63 |
my $query; |
62 |
my $query; |
64 |
my $real_limit = $results_per_page / 2; |
|
|
65 |
my $rows_lt = 999; |
63 |
my $rows_lt = 999; |
66 |
my $rows_gt = 999; |
64 |
my $rows_gt = 999; |
67 |
my $search; |
65 |
my $search; |
Lines 86-92
my $launcher = sub {
Link Here
|
86 |
my @class_sources = Koha::ClassSources->search({ used => 1})->as_list; |
84 |
my @class_sources = Koha::ClassSources->search({ used => 1})->as_list; |
87 |
|
85 |
|
88 |
#Don't show half the results of show lt or gt |
86 |
#Don't show half the results of show lt or gt |
89 |
$real_limit = $results_per_page if $search ne $q; |
|
|
90 |
my $cn_sort = GetClassSort( $cn_source, undef, $search ); |
87 |
my $cn_sort = GetClassSort( $cn_source, undef, $search ); |
91 |
|
88 |
|
92 |
my $red = 0; |
89 |
my $red = 0; |
Lines 100-107
my $launcher = sub {
Link Here
|
100 |
LEFT OUTER JOIN branches ON (branches.branchcode = homebranch) |
97 |
LEFT OUTER JOIN branches ON (branches.branchcode = homebranch) |
101 |
WHERE cn_sort < ? |
98 |
WHERE cn_sort < ? |
102 |
AND itemcallnumber != '' |
99 |
AND itemcallnumber != '' |
103 |
ORDER BY cn_sort DESC, itemnumber |
100 |
ORDER BY cn_sort DESC, itemnumber"; |
104 |
LIMIT $real_limit;"; |
|
|
105 |
$sth = $dbh->prepare($query); |
101 |
$sth = $dbh->prepare($query); |
106 |
$sth->execute($cn_sort); |
102 |
$sth->execute($cn_sort); |
107 |
while ( my $data = $sth->fetchrow_hashref ) { |
103 |
while ( my $data = $sth->fetchrow_hashref ) { |
Lines 130-137
my $launcher = sub {
Link Here
|
130 |
LEFT OUTER JOIN branches ON (branches.branchcode = homebranch) |
126 |
LEFT OUTER JOIN branches ON (branches.branchcode = homebranch) |
131 |
WHERE i.cn_sort >= '$cn_sort' |
127 |
WHERE i.cn_sort >= '$cn_sort' |
132 |
AND itemcallnumber != '' |
128 |
AND itemcallnumber != '' |
133 |
ORDER BY cn_sort, itemnumber |
129 |
ORDER BY cn_sort, itemnumber"; |
134 |
LIMIT $real_limit"; |
|
|
135 |
$sth = $dbh->prepare($query); |
130 |
$sth = $dbh->prepare($query); |
136 |
$sth->execute(); |
131 |
$sth->execute(); |
137 |
|
132 |
|