View | Details | Raw Unified | Return to bug 25476
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt (+26 lines)
Lines 109-114 Link Here
109
    </form>
109
    </form>
110
[% END %]
110
[% END %]
111
111
112
[% BLOCK form_browse %]
113
    [% IF uploadcategories %]
114
    <form method="post" id="browsefile" action="/cgi-bin/koha/tools/upload.pl" enctype="multipart/form-data">
115
        [% PROCESS plugin_pars %]
116
        <input type="hidden" name="op" value="browse"/>
117
        <fieldset class="rows">
118
        <legend>Search uploads by category</legend>
119
        <ol>
120
            <li>
121
                <label for="browsecategory">Category: </label>
122
                <select id="browsecategory" name="browsecategory">
123
                [% FOREACH cat IN uploadcategories %]
124
                    <option value="[% cat.code | html %]">[% cat.name | html %]</option>
125
                [% END %]
126
                </select>
127
            </li>
128
        </ol>
129
        <fieldset class="action">
130
            <button id="browsebutton" class="submit">Search</button>
131
        </fieldset>
132
        </fieldset>
133
    </form>
134
    [% END %]
135
[% END %]
136
112
[% BLOCK form_search %]
137
[% BLOCK form_search %]
113
    <form method="post" id="searchfile" action="/cgi-bin/koha/tools/upload.pl" enctype="multipart/form-data">
138
    <form method="post" id="searchfile" action="/cgi-bin/koha/tools/upload.pl" enctype="multipart/form-data">
114
        [% PROCESS plugin_pars %]
139
        [% PROCESS plugin_pars %]
Lines 236-241 Link Here
236
[% PROCESS submitter %]
261
[% PROCESS submitter %]
237
[% IF mode == 'new' || mode == 'deleted' %]
262
[% IF mode == 'new' || mode == 'deleted' %]
238
    [% PROCESS form_new %]
263
    [% PROCESS form_new %]
264
    [% PROCESS form_browse %]
239
    [% PROCESS form_search %]
265
    [% PROCESS form_search %]
240
    [% PROCESS closer %]
266
    [% PROCESS closer %]
241
[% ELSIF mode == 'report' %]
267
[% ELSIF mode == 'report' %]
(-)a/tools/upload.pl (-1 / +17 lines)
Lines 36-41 my $index = $input->param('index'); # MARC editor input field id Link Here
36
my $term   = $input->param('term');
36
my $term   = $input->param('term');
37
my $id     = $input->param('id');
37
my $id     = $input->param('id');
38
my $msg    = $input->param('msg');
38
my $msg    = $input->param('msg');
39
my $browsecategory = $input->param('browsecategory');
39
40
40
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
41
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
41
    {   template_name   => "tools/upload.tt",
42
    {   template_name   => "tools/upload.tt",
Lines 58-63 if ( $op eq 'new' ) { Link Here
58
    );
59
    );
59
    output_html_with_http_headers $input, $cookie, $template->output;
60
    output_html_with_http_headers $input, $cookie, $template->output;
60
61
62
} elsif ( $op eq 'browse' ) {
63
    my $uploads;
64
    if ($browsecategory){
65
        $uploads = Koha::UploadedFiles->search({
66
            uploadcategorycode => $browsecategory,
67
            $plugin? ( public => 1 ): (),
68
        })->unblessed;
69
    }
70
71
    $template->param(
72
        mode    => 'report',
73
        msg     => $msg,
74
        uploads => $uploads,
75
    );
76
    output_html_with_http_headers $input, $cookie, $template->output;
77
61
} elsif ( $op eq 'search' ) {
78
} elsif ( $op eq 'search' ) {
62
    my $uploads;
79
    my $uploads;
63
    if( $id ) { # might be a comma separated list
80
    if( $id ) { # might be a comma separated list
64
- 

Return to bug 25476