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 102-107 Link Here
102
    </form>
102
    </form>
103
[% END %]
103
[% END %]
104
104
105
[% BLOCK form_browse %]
106
    [% IF uploadcategories %]
107
    <form method="post" id="browsefile" action="/cgi-bin/koha/tools/upload.pl" enctype="multipart/form-data">
108
        [% PROCESS plugin_pars %]
109
        <input type="hidden" name="op" value="browse"/>
110
        <fieldset class="rows">
111
        <legend>Search uploads by category</legend>
112
        <ol>
113
            <li>
114
                <label for="browsecategory">Category: </label>
115
                <select id="browsecategory" name="browsecategory">
116
                [% FOREACH cat IN uploadcategories %]
117
                    <option value="[% cat.code | html %]">[% cat.name | html %]</option>
118
                [% END %]
119
                </select>
120
            </li>
121
        </ol>
122
        <fieldset class="action">
123
            <button id="browsebutton" class="submit">Search</button>
124
        </fieldset>
125
        </fieldset>
126
    </form>
127
    [% END %]
128
[% END %]
129
105
[% BLOCK form_search %]
130
[% BLOCK form_search %]
106
    <form method="post" id="searchfile" action="/cgi-bin/koha/tools/upload.pl" enctype="multipart/form-data">
131
    <form method="post" id="searchfile" action="/cgi-bin/koha/tools/upload.pl" enctype="multipart/form-data">
107
        [% PROCESS plugin_pars %]
132
        [% PROCESS plugin_pars %]
Lines 229-234 Link Here
229
[% PROCESS submitter %]
254
[% PROCESS submitter %]
230
[% IF mode == 'new' || mode == 'deleted' %]
255
[% IF mode == 'new' || mode == 'deleted' %]
231
    [% PROCESS form_new %]
256
    [% PROCESS form_new %]
257
    [% PROCESS form_browse %]
232
    [% PROCESS form_search %]
258
    [% PROCESS form_search %]
233
    [% PROCESS closer %]
259
    [% PROCESS closer %]
234
[% ELSIF mode == 'report' %]
260
[% 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