my $term = $input->param('term');
my $id = $input->param('id');
my $msg = $input->param('msg');
+my $browsecategory = $input->param('browsecategory');
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{ template_name => "tools/upload.tt",
query => $input,
type => "intranet",
- authnotrequired => 0,
flagsrequired => { tools => 'upload_general_files' },
}
);
);
output_html_with_http_headers $input, $cookie, $template->output;
+} elsif ( $op eq 'browse' ) {
+ my $uploads;
+ if ($browsecategory){
+ $uploads = Koha::UploadedFiles->search({
+ uploadcategorycode => $browsecategory,
+ $plugin? ( public => 1 ): (),
+ })->unblessed;
+ }
+
+ $template->param(
+ mode => 'report',
+ msg => $msg,
+ uploads => $uploads,
+ );
+ output_html_with_http_headers $input, $cookie, $template->output;
+
} elsif ( $op eq 'search' ) {
my $uploads;
if( $id ) { # might be a comma separated list