@@ -, +, @@ a "category" per se.) --- .../prog/en/modules/tools/upload.tt | 26 +++++++++++++++++++ tools/upload.pl | 17 ++++++++++++ 2 files changed, 43 insertions(+) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt @@ -102,6 +102,31 @@ [% END %] +[% BLOCK form_browse %] + [% IF uploadcategories %] +
+ [% PROCESS plugin_pars %] + +
+ Search uploads by category +
    +
  1. + + +
  2. +
+
+ +
+
+
+ [% END %] +[% END %] + [% BLOCK form_search %]
[% PROCESS plugin_pars %] @@ -229,6 +254,7 @@ [% PROCESS submitter %] [% IF mode == 'new' || mode == 'deleted' %] [% PROCESS form_new %] + [% PROCESS form_browse %] [% PROCESS form_search %] [% PROCESS closer %] [% ELSIF mode == 'report' %] --- a/tools/upload.pl +++ a/tools/upload.pl @@ -36,6 +36,7 @@ my $index = $input->param('index'); # MARC editor input field id 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", @@ -58,6 +59,22 @@ if ( $op eq 'new' ) { ); 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 --