Bug 3050 - Add an option to upload scanned invoices #1/3
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / invoice-files.tt
1 [% USE KohaDates %]
2
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Acquisitions &rsaquo; Invoice &rsaquo; Files</title>
5 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% INCLUDE 'datatables.inc' %]
8 <script type="text/javascript">
9 //<![CDATA[
10     $(document).ready(function() {
11         $("#invoice_files_details_table").dataTable($.extend(true, {}, dataTablesDefaults, {
12             "aoColumnDefs": [
13                 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
14                 { "aTargets": [ 3 ], "sType": "natural" }
15             ],
16             bInfo: false,
17             bPaginate: false,
18             bFilter: false,
19             sDom: "t"
20         }));
21     });
22 //]]>
23 </script>
24 </head>
25 <body>
26 [% INCLUDE 'header.inc' %]
27 [% INCLUDE 'acquisitions-search.inc' %]
28
29 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/invoices.pl">Invoices</a> &rsaquo; <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">[% invoicenumber %]</a> &rsaquo; Files</div>
30
31 <div id="doc3" class="yui-t2">
32
33 <div id="bd">
34   <div id="yui-main">
35     <div class="yui-b">
36       <h2>Files for invoice: [% invoicenumber | html %]</h2>
37       <p><b>Vendor: </b><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% suppliername %]</a></p>
38       <br />
39       [% IF errors %]
40         <div class="dialog alert">
41           [% IF errors.empty_upload %]The file you are attempting to upload has no contents.[% END %]
42           [% IF errors.no_file %]You did not select a file to upload.[% END %]
43           [% IF errors.invalid_parameter %]Invalid or missing script parameter.[% END %]
44         </div>
45       [% END %]
46       [% IF files %]
47           <table id="invoice_files_details_table">
48               <thead>
49                   <tr>
50                       <th>Name</th>
51                       <th>Type</th>
52                       <th>Description</th>
53                       <th>Uploaded</th>
54                       <th>Bytes</th>
55                       <th>&nbsp;</th>
56                       <th>&nbsp;</th>
57                   </tr>
58               </thead>
59               <tbody>
60                 [% FOREACH f IN files %]
61                   <tr>
62                       <td><a href="?invoiceid=[% invoiceid %]&amp;op=download&amp;view=1&amp;file_id=[% f.file_id %]">[% f.file_name | html %]</a></td>
63                       <td>[% f.file_type | html %]</td>
64                       <td>[% f.file_description | html %]</td>
65                       <td><!-- [% f.date_uploaded %] -->[% f.date_uploaded | $KohaDates %]</td>
66                       <td>[% f.file_size %]</td>
67                       <td><a href="?invoiceid=[% invoiceid %]&amp;op=delete&amp;file_id=[% f.file_id %]">Delete</a></td>
68                       <td><a href="?invoiceid=[% invoiceid %]&amp;op=download&amp;file_id=[% f.file_id %]">Download</a></td>
69                   </tr>
70                 [% END %]
71               </tbody>
72           </table>
73       [% ELSE %]
74           <div class="dialog message">
75               <p>This invoice has no files attached.</p>
76           </div>
77       [% END %]
78       [% IF invoiceid %]
79           <br />
80           <form method="post" action="/cgi-bin/koha/acqui/invoice-files.pl" enctype="multipart/form-data">
81               <fieldset class="rows">
82                   <legend>Upload New File</legend>
83                   <ol>
84                       <li><input type="hidden" name="op" value="upload" />
85                       <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
86                       <label for="description">Description:</label>
87                       <input name="description" id="description" type="text" /></li>
88                       <li><label for="uploadfile">File:</label><input name="uploadfile" type="file" id="uploadfile" /></li>
89                   </ol>
90                   <fieldset class="action"><input name="upload" type="submit" id="upload" value="Upload File" /></fieldset>
91               </fieldset>
92           </form>
93       [% END %]
94     </div>
95   </div>
96   <div class="yui-b">
97     [% INCLUDE 'acquisitions-menu.inc' %]
98   </div>
99 </div>
100 [% INCLUDE 'intranet-bottom.inc' %]