|
Lines 26-31
use C4::Output;
Link Here
|
| 26 |
use C4::Items; |
26 |
use C4::Items; |
| 27 |
use C4::Biblio; |
27 |
use C4::Biblio; |
| 28 |
use C4::Koha; |
28 |
use C4::Koha; |
|
|
29 |
use Carp::Always; |
| 29 |
|
30 |
|
| 30 |
use Koha::AuthorisedValues; |
31 |
use Koha::AuthorisedValues; |
| 31 |
use Koha::Biblios; |
32 |
use Koha::Biblios; |
|
Lines 89-94
if (defined $format and $format eq 'json') {
Link Here
|
| 89 |
die "Unsupported format $format"; |
90 |
die "Unsupported format $format"; |
| 90 |
} |
91 |
} |
| 91 |
|
92 |
|
|
|
93 |
warn "Template is $template_name"; |
| 94 |
|
| 92 |
my ($template, $borrowernumber, $cookie) = get_template_and_user({ |
95 |
my ($template, $borrowernumber, $cookie) = get_template_and_user({ |
| 93 |
template_name => $template_name, |
96 |
template_name => $template_name, |
| 94 |
query => $cgi, |
97 |
query => $cgi, |
|
Lines 96-101
my ($template, $borrowernumber, $cookie) = get_template_and_user({
Link Here
|
| 96 |
flagsrequired => { catalogue => 1 }, |
99 |
flagsrequired => { catalogue => 1 }, |
| 97 |
}); |
100 |
}); |
| 98 |
|
101 |
|
|
|
102 |
warn Data::Dumper::Dumper($template->unblessed); |
| 99 |
my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => '', kohafield => 'items.itemlost', authorised_value => [ -and => {'!=' => undef }, {'!=' => ''}] }); |
103 |
my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => '', kohafield => 'items.itemlost', authorised_value => [ -and => {'!=' => undef }, {'!=' => ''}] }); |
| 100 |
my $itemlost_values = $mss->count ? GetAuthorisedValues($mss->next->authorised_value) : []; |
104 |
my $itemlost_values = $mss->count ? GetAuthorisedValues($mss->next->authorised_value) : []; |
| 101 |
|
105 |
|
|
Lines 254-263
if (scalar keys %params > 0) {
Link Here
|
| 254 |
$template->param(sEcho => scalar $cgi->param('sEcho')); |
258 |
$template->param(sEcho => scalar $cgi->param('sEcho')); |
| 255 |
output_with_http_headers $cgi, $cookie, $template->output, 'json'; |
259 |
output_with_http_headers $cgi, $cookie, $template->output, 'json'; |
| 256 |
} |
260 |
} |
| 257 |
|
261 |
warn "exiting"; |
| 258 |
exit; |
262 |
exit; |
| 259 |
} |
263 |
} |
| 260 |
|
264 |
warn "exited"; |
| 261 |
# Display the search form |
265 |
# Display the search form |
| 262 |
|
266 |
|
| 263 |
my @branches = map { value => $_->branchcode, label => $_->branchname }, Koha::Libraries->search( {}, { order_by => 'branchname' } ); |
267 |
my @branches = map { value => $_->branchcode, label => $_->branchname }, Koha::Libraries->search( {}, { order_by => 'branchname' } ); |
|
Lines 309-313
$template->param(
Link Here
|
| 309 |
items_search_fields => \@items_search_fields, |
313 |
items_search_fields => \@items_search_fields, |
| 310 |
authorised_values_json => to_json($authorised_values), |
314 |
authorised_values_json => to_json($authorised_values), |
| 311 |
); |
315 |
); |
| 312 |
|
316 |
warn "the end"; |
| 313 |
output_html_with_http_headers $cgi, $cookie, $template->output; |
317 |
output_html_with_http_headers $cgi, $cookie, $template->output; |