Bug 10904: Limit patron update request management by branch
[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": [ "title-string" ], "sType": "title-string" }
15             ],
16             bInfo: false,
17             bPaginate: false,
18             bFilter: false,
19             sDom: "t"
20         }));
21         $("a.delete_file").click(function(){
22             return ( confirm( _("Are you sure you want to delete this file ?") ) );
23         });
24     });
25 //]]>
26 </script>
27 </head>
28 <body id="acq_invoice_files" class="acq">
29 [% INCLUDE 'header.inc' %]
30 [% INCLUDE 'acquisitions-search.inc' %]
31
32 <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>
33
34 <div id="doc3" class="yui-t2">
35
36 <div id="bd">
37   <div id="yui-main">
38     <div class="yui-b">
39       <h2>Files for invoice: [% invoicenumber | html %]</h2>
40       <p><b>Vendor: </b><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% suppliername %]</a></p>
41       <br />
42       [% IF errors %]
43         <div class="dialog alert">
44           [% IF errors.empty_upload %]The file you are attempting to upload has no contents.[% END %]
45           [% IF errors.no_file %]You did not select a file to upload.[% END %]
46           [% IF errors.invalid_parameter %]Invalid or missing script parameter.[% END %]
47         </div>
48       [% END %]
49       [% IF files %]
50           <table id="invoice_files_details_table">
51               <thead>
52                   <tr>
53                       <th>Name</th>
54                       <th>Type</th>
55                       <th>Description</th>
56                       <th>Uploaded</th>
57                       <th>Bytes</th>
58                       <th>&nbsp;</th>
59                       <th>&nbsp;</th>
60                   </tr>
61               </thead>
62               <tbody>
63                 [% FOREACH f IN files %]
64                   <tr>
65                       <td><a href="?invoiceid=[% invoiceid %]&amp;op=download&amp;view=1&amp;file_id=[% f.file_id %]">[% f.file_name | html %]</a></td>
66                       <td>[% f.file_type | html %]</td>
67                       <td>[% f.file_description | html %]</td>
68                       <td class="title-string">
69                         <span title="[% f.date_uploaded %]">[% f.date_uploaded | $KohaDates %]</span>
70                       </td>
71                       <td>[% f.file_size %]</td>
72                       <td><a class="delete_file" href="?invoiceid=[% invoiceid %]&amp;op=delete&amp;file_id=[% f.file_id %]">Delete</a></td>
73                       <td><a href="?invoiceid=[% invoiceid %]&amp;op=download&amp;file_id=[% f.file_id %]">Download</a></td>
74                   </tr>
75                 [% END %]
76               </tbody>
77           </table>
78       [% ELSE %]
79           <div class="dialog message">
80               <p>This invoice has no files attached.</p>
81           </div>
82       [% END %]
83       [% IF invoiceid %]
84           <br />
85           <form method="post" action="/cgi-bin/koha/acqui/invoice-files.pl" enctype="multipart/form-data">
86               <fieldset class="rows">
87                   <legend>Upload New File</legend>
88                   <ol>
89                       <li><input type="hidden" name="op" value="upload" />
90                       <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
91                       <label for="description">Description:</label>
92                       <input name="description" id="description" type="text" /></li>
93                       <li><label for="uploadfile">File:</label><input name="uploadfile" type="file" id="uploadfile" /></li>
94                   </ol>
95                   <fieldset class="action"><input name="upload" type="submit" id="upload" value="Upload File" /></fieldset>
96               </fieldset>
97           </form>
98       [% END %]
99     </div>
100   </div>
101   <div class="yui-b">
102     [% INCLUDE 'acquisitions-menu.inc' %]
103   </div>
104 </div>
105 [% INCLUDE 'intranet-bottom.inc' %]