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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt (-41 / +65 lines)
Lines 33-39 Link Here
33
[% END %]
33
[% END %]
34
34
35
[% BLOCK form_new %]
35
[% BLOCK form_new %]
36
    <form method="post" action="[% SCRIPT_NAME %]" id="uploadfile" enctype="multipart/form-data">
36
    <form method="post" action="/cgi-bin/koha/tools/upload.pl" id="uploadfile" enctype="multipart/form-data">
37
        [% PROCESS plugin_pars %]
37
        [% PROCESS plugin_pars %]
38
        <fieldset class="rows" id="uploadform">
38
        <fieldset class="rows" id="uploadform">
39
        <legend>Upload new files</legend>
39
        <legend>Upload new files</legend>
Lines 49-55 Link Here
49
                <label for="uploadcategory">Category: </label>
49
                <label for="uploadcategory">Category: </label>
50
                <select id="uploadcategory" name="uploadcategory">
50
                <select id="uploadcategory" name="uploadcategory">
51
                [% IF !plugin %]
51
                [% IF !plugin %]
52
                    <option value="" disabled hidden selected></option>
52
                    <option value=""></option>
53
                [% END %]
53
                [% END %]
54
                [% FOREACH cat IN uploadcategories %]
54
                [% FOREACH cat IN uploadcategories %]
55
                    <option value="[% cat.code %]">[% cat.name %]</option>
55
                    <option value="[% cat.code %]">[% cat.name %]</option>
Lines 71-89 Link Here
71
                <input type="hidden" id="public" name="public" value="1"/>
71
                <input type="hidden" id="public" name="public" value="1"/>
72
            [% ELSE %]
72
            [% ELSE %]
73
                <label id="public_cb">Allow public downloads:</label>
73
                <label id="public_cb">Allow public downloads:</label>
74
                <input type="checkbox" id="public" name="public">
74
                <input type="checkbox" id="public" name="public" />
75
                </input>
76
            [% END %]
75
            [% END %]
77
        </li>
76
        </li>
78
        </ol>
77
        </ol>
79
        <fieldset class="action">
78
        <fieldset class="action">
80
            <button id="fileuploadbutton" onclick="StartUpload(); return false;">Upload</button>
79
            <button id="fileuploadbutton">Upload</button>
81
            <button id="fileuploadcancel" onclick="CancelUpload(); return false;">Cancel</button>
80
            <button id="fileuploadcancel">Cancel</button>
82
        </fieldset>
81
        </fieldset>
83
        </fieldset>
82
        </fieldset>
84
        <div id="fileuploadpanel">
83
        <div id="fileuploadpanel">
85
            <div id="fileuploadstatus">Upload progress:
84
            <div id="fileuploadstatus">Upload progress:
86
            <progress id="fileuploadprogress" min="0" max="100" value="0">
85
            <progress id="fileuploadprogress" max="100" value="0">
87
            </progress>
86
            </progress>
88
            <span class="fileuploadpercent">0</span>%
87
            <span class="fileuploadpercent">0</span>%
89
            </div>
88
            </div>
Lines 93-114 Link Here
93
[% END %]
92
[% END %]
94
93
95
[% BLOCK form_search %]
94
[% BLOCK form_search %]
96
    <form method="post" id="searchfile" action="[% SCRIPT_NAME %]" enctype="multipart/form-data">
95
    <form method="post" id="searchfile" action="/cgi-bin/koha/tools/upload.pl" enctype="multipart/form-data">
97
        [% PROCESS plugin_pars %]
96
        [% PROCESS plugin_pars %]
98
        <input type="hidden" name="op" value="search"/>
97
        <input type="hidden" name="op" value="search"/>
99
        <fieldset class="rows">
98
        <fieldset class="rows">
100
        <legend>Search uploads by name or hashvalue</legend>
99
        <legend>Search uploads by name or hashvalue</legend>
101
        <ol>
100
        <ol>
102
        <li>
101
        <li>
103
            <label for="searchupload">Search term: </label>
102
            <label for="term">Search term: </label>
104
            <input type="text" id="term" name="term" value=""/>
103
            <input type="text" id="term" name="term" value=""/>
105
        </li>
104
        </li>
106
        <li>
107
            <fieldset class="action">
108
                <button id="searchbutton" onclick="return CheckSearch();" class="submit">Search</button>
109
            </fieldset>
110
        </li>
111
        </ol>
105
        </ol>
106
        <fieldset class="action">
107
            <button id="searchbutton" class="submit">Search</button>
108
        </fieldset>
112
        </fieldset>
109
        </fieldset>
113
    </form>
110
    </form>
114
[% END %]
111
[% END %]
Lines 124-134 Link Here
124
121
125
[% BLOCK closer %]
122
[% BLOCK closer %]
126
    [% IF plugin %]
123
    [% IF plugin %]
127
        <form id="closer">
124
        <div id="closewindow"><a class="btn btn-default close" href="#">Close</a></div>
128
            <fieldset class="action">
129
                <button onclick="window.close();return false;">Close</button>
130
            </fieldset>
131
        </form>
132
    [% END %]
125
    [% END %]
133
[% END %]
126
[% END %]
134
127
Lines 146-169 Link Here
146
    <form id="newsearch">
139
    <form id="newsearch">
147
        <fieldset class="action">
140
        <fieldset class="action">
148
            <button onclick="SubmitMe('new'); return false;">New search</button>
141
            <button onclick="SubmitMe('new'); return false;">New search</button>
149
            [% IF plugin %]
150
                <button onclick="window.close();return false;">Close</button>
151
            [% END %]
152
        </fieldset>
142
        </fieldset>
153
    </form>
143
    </form>
144
    [% IF plugin %]
145
        <div id="closewindow"><a class="btn btn-default close" href="#">Close</a></div>
146
    [% END %]
154
[% END %]
147
[% END %]
155
148
156
[% BLOCK table_results %]
149
[% BLOCK table_results %]
157
    <table>
150
    <table>
158
    <thead>
151
    <thead>
159
    <tr>
152
    <tr>
160
        <th>Filename</td>
153
        <th>Filename</th>
161
        <th>Size</td>
154
        <th>Size</th>
162
        <th>Hashvalue</td>
155
        <th>Hashvalue</th>
163
        <th>Category</td>
156
        <th>Category</th>
164
        [% IF !plugin %]<th>Public</td>[% END %]
157
        [% IF !plugin %]<th>Public</th>[% END %]
165
        [% IF !plugin %]<th>Temporary</td>[% END %]
158
        [% IF !plugin %]<th>Temporary</th>[% END %]
166
        <th>Actions</td>
159
        <th>Actions</th>
167
    </tr>
160
    </tr>
168
    </thead>
161
    </thead>
169
    <tbody>
162
    <tbody>
Lines 177-189 Link Here
177
            <td>[% IF record.public %]Yes[% ELSE %]No[% END %]</td>
170
            <td>[% IF record.public %]Yes[% ELSE %]No[% END %]</td>
178
            <td>[% IF record.permanent %]No[% ELSE %]Yes[% END %]</td>
171
            <td>[% IF record.permanent %]No[% ELSE %]Yes[% END %]</td>
179
        [% END %]
172
        [% END %]
180
        <td>
173
        <td class="actions">
181
            [% IF plugin %]
174
            [% IF plugin %]
182
                <a href="" onclick="Choose('[% record.hashvalue %]'); return false;">Choose</a>&nbsp;
175
                <button class="btn btn-mini choose_entry" data-record-hashvalue="[% record.hashvalue %]"><i class="fa fa-plus"></i> Choose</button>
183
            [% END %]
176
            [% END %]
184
            <a href="" onclick="SubmitMe( 'download', [% record.id %] ); return false;">Download</a>&nbsp;
177
            <button class="btn btn-mini download_entry" data-record-id="[% record.id %]"><i class="fa fa-download"></i> Download</button>
185
            [% IF record.owner == owner || CAN_user_tools_upload_manage %]
178
            [% IF record.owner == owner || CAN_user_tools_upload_manage %]
186
                <a href="" onclick="DeleteEntry( [% record.id %] ); return false;">Delete</a>
179
                <button class="btn btn-mini delete_entry" data-record-id="[% record.id %]"><i class="fa fa-trash"></i> Delete</button>
187
            [% END %]
180
            [% END %]
188
        </td>
181
        </td>
189
   </tr>
182
   </tr>
Lines 318-339 $(document).ready(function() { Link Here
318
    $("#public_cb").click(function() {
311
    $("#public_cb").click(function() {
319
        $("#public").click();
312
        $("#public").click();
320
    });
313
    });
314
    $("#fileuploadbutton").on("click",function(e){
315
        e.preventDefault();
316
        StartUpload();
317
    });
318
    $("#fileuploadcancel").on("click",function(e){
319
        e.preventDefault();
320
        CancelUpload();
321
    });
322
    $("#searchbutton").on("click",function(){
323
        return CheckSearch();
324
    });
325
    $(".choose_entry").on("click",function(e){
326
        e.preventDefault();
327
        var record_hashvalue = $(this).data("record-hashvalue");
328
        Choose( record_hashvalue );
329
    });
330
    $(".download_entry").on("click",function(e){
331
        e.preventDefault();
332
        var record_id = $(this).data("record-id");
333
        SubmitMe( 'download', record_id );
334
    });
335
    $(".delete_entry").on("click",function(e){
336
        e.preventDefault();
337
        var record_id = $(this).data("record-id");
338
        DeleteEntry( record_id );
339
    });
321
});
340
});
322
//]]>
341
//]]>
323
</script>
342
</script>
324
</head>
343
</head>
325
344
326
<body id="tools_upload" class="tools">
345
[% IF ( plugin ) %]
327
[% IF !plugin %]
346
    <body id="tools_upload" class="tools">
347
        <div class="yui-t7">
348
            <div id="bd">
349
                <div class="yui-g">
350
[% ELSE %]
351
    <body id="tools_upload" class="tools">
328
    [% INCLUDE 'header.inc' %]
352
    [% INCLUDE 'header.inc' %]
329
    [% INCLUDE 'cat-search.inc' %]
353
    [% INCLUDE 'cat-search.inc' %]
330
    [% PROCESS breadcrumbs %]
354
    [% PROCESS breadcrumbs %]
355
    <div id="doc3" class="yui-t2">
356
        <div id="bd">
357
            <div id="yui-main">
358
                <div class="yui-b">
331
[% END %]
359
[% END %]
332
360
333
<div id="doc3" class="yui-t2">
361
334
   <div id="bd">
335
    <div id="yui-main">
336
    <div class="yui-b">
337
362
338
<h1>Upload</h1>
363
<h1>Upload</h1>
339
<div class="dialog alert" id="myalerts" style="display:none;"></div>
364
<div class="dialog alert" id="myalerts" style="display:none;"></div>
Lines 356-364 $(document).ready(function() { Link Here
356
[% END %]
381
[% END %]
357
382
358
</div>
383
</div>
359
</div>
360
384
361
[% IF !plugin %]
385
[% IF !plugin %]
386
</div>
362
    <div class="yui-b noprint">
387
    <div class="yui-b noprint">
363
        [% INCLUDE 'tools-menu.inc' %]
388
        [% INCLUDE 'tools-menu.inc' %]
364
    </div>
389
    </div>
365
- 

Return to bug 16529