|
Lines 30-38
use C4::Auth qw(:DEFAULT check_cookie_auth);
Link Here
|
| 30 |
use C4::Context; |
30 |
use C4::Context; |
| 31 |
use Koha::DateUtils; |
31 |
use Koha::DateUtils; |
| 32 |
# use C4::Koha; |
32 |
# use C4::Koha; |
| 33 |
use C4::Output qw(:html :ajax pagination_bar); |
33 |
use C4::Output qw(:html :ajax); |
| 34 |
use C4::Debug; |
34 |
use C4::Debug; |
| 35 |
use C4::Tags qw(get_tags get_approval_rows approval_counts whitelist blacklist is_approved); |
35 |
use C4::Tags qw(get_tags get_approval_rows approval_counts whitelist blacklist is_approved); |
|
|
36 |
use C4::Koha; |
| 36 |
|
37 |
|
| 37 |
my $script_name = "/cgi-bin/koha/tags/review.pl"; |
38 |
my $script_name = "/cgi-bin/koha/tags/review.pl"; |
| 38 |
my $needed_flags = { tools => 'moderate_tags' }; # FIXME: replace when more specific permission is created. |
39 |
my $needed_flags = { tools => 'moderate_tags' }; # FIXME: replace when more specific permission is created. |
|
Lines 211-216
$qstring =~ s/^;+//; # remove leading delims
Link Here
|
| 211 |
$qstring = "limit=$pagesize" . ($qstring ? '&' . $qstring : ''); |
212 |
$qstring = "limit=$pagesize" . ($qstring ? '&' . $qstring : ''); |
| 212 |
$debug and print STDERR "number of approval_rows: " . scalar(@$tagloop) . "rows\n"; |
213 |
$debug and print STDERR "number of approval_rows: " . scalar(@$tagloop) . "rows\n"; |
| 213 |
(scalar @errors) and $template->param(message_loop=>\@errors); |
214 |
(scalar @errors) and $template->param(message_loop=>\@errors); |
|
|
215 |
|
| 216 |
my $pagination = { |
| 217 |
base_url => "$script_name?$qstring&page=", |
| 218 |
pages => getnbpages( $counts->{approved_total}, $pagesize), |
| 219 |
current_page => $page, |
| 220 |
}; |
| 221 |
|
| 214 |
$template->param( |
222 |
$template->param( |
| 215 |
offset => $offset, # req'd for EXPR |
223 |
offset => $offset, # req'd for EXPR |
| 216 |
op => $op, |
224 |
op => $op, |
|
Lines 218-227
$template->param(
Link Here
|
| 218 |
script_name => $script_name, |
226 |
script_name => $script_name, |
| 219 |
approved => 0, # dummy value (also EXPR) |
227 |
approved => 0, # dummy value (also EXPR) |
| 220 |
tagloop => $tagloop, |
228 |
tagloop => $tagloop, |
| 221 |
pagination_bar => pagination_bar( |
229 |
pagination => $pagination, |
| 222 |
"$script_name?$qstring\&", |
|
|
| 223 |
ceil($counts->{approved_total}/$pagesize), # $page, 'page' |
| 224 |
) |
| 225 |
); |
230 |
); |
| 226 |
|
231 |
|
| 227 |
output_html_with_http_headers $input, $cookie, $template->output; |
232 |
output_html_with_http_headers $input, $cookie, $template->output; |