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 94-99 Link Here
94
    </form>
94
    </form>
95
[% END %]
95
[% END %]
96
96
97
[% BLOCK form_browse %]
98
    [% IF uploadcategories %]
99
    <form method="post" id="browsefile" action="/cgi-bin/koha/tools/upload.pl" enctype="multipart/form-data">
100
        [% PROCESS plugin_pars %]
101
        <input type="hidden" name="op" value="browse"/>
102
        <fieldset class="rows">
103
        <legend>Search uploads by category</legend>
104
        <ol>
105
            <li>
106
                <label for="browsecategory">Category: </label>
107
                <select id="browsecategory" name="browsecategory">
108
                [% FOREACH cat IN uploadcategories %]
109
                    <option value="[% cat.code | html %]">[% cat.name | html %]</option>
110
                [% END %]
111
                </select>
112
            </li>
113
        </ol>
114
        <fieldset class="action">
115
            <button id="browsebutton" class="submit">Search</button>
116
        </fieldset>
117
        </fieldset>
118
    </form>
119
    [% END %]
120
[% END %]
121
97
[% BLOCK form_search %]
122
[% BLOCK form_search %]
98
    <form method="post" id="searchfile" action="/cgi-bin/koha/tools/upload.pl" enctype="multipart/form-data">
123
    <form method="post" id="searchfile" action="/cgi-bin/koha/tools/upload.pl" enctype="multipart/form-data">
99
        [% PROCESS plugin_pars %]
124
        [% PROCESS plugin_pars %]
Lines 221-226 Link Here
221
[% PROCESS submitter %]
246
[% PROCESS submitter %]
222
[% IF mode == 'new' || mode == 'deleted' %]
247
[% IF mode == 'new' || mode == 'deleted' %]
223
    [% PROCESS form_new %]
248
    [% PROCESS form_new %]
249
    [% PROCESS form_browse %]
224
    [% PROCESS form_search %]
250
    [% PROCESS form_search %]
225
    [% PROCESS closer %]
251
    [% PROCESS closer %]
226
[% ELSIF mode == 'report' %]
252
[% 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