Bug 33908: Improve translation of title tags: Acquisitions
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / invoice-files.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% SET footerjs = 1 %]
5 [% PROCESS 'i18n.inc' %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>[% FILTER collapse %]
8     [% t("Files") | html %] &rsaquo;
9     [% t("Invoice") | html %] &rsaquo;
10     [% t("Acquisitions") | html %] &rsaquo;
11     [% t("Koha") | html %]
12 [% END %]</title>
13 [% INCLUDE 'doc-head-close.inc' %]
14 </head>
15
16 <body id="acq_invoice_files" class="acq">
17 [% WRAPPER 'header.inc' %]
18     [% INCLUDE 'acquisitions-search.inc' %]
19 [% END %]
20
21 [% WRAPPER 'sub-header.inc' %]
22     [% WRAPPER breadcrumbs %]
23         [% WRAPPER breadcrumb_item %]
24             <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
25         [% END %]
26         [% WRAPPER breadcrumb_item %]
27             <a href="/cgi-bin/koha/acqui/invoices.pl">Invoices</a>
28         [% END %]
29         [% WRAPPER breadcrumb_item %]
30             <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid | uri %]">[% invoicenumber | html %]</a>
31         [% END %]
32         [% WRAPPER breadcrumb_item bc_active= 1 %]
33             <span>Files</span>
34         [% END %]
35     [% END #/ WRAPPER breadcrumbs %]
36 [% END #/ WRAPPER sub-header.inc %]
37
38 <div class="main container-fluid">
39     <div class="row">
40         <div class="col-sm-10 col-sm-push-2">
41             <main>
42
43       <h1>Files for invoice: [% invoicenumber | html %]</h1>
44       <p><strong>Vendor: </strong><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% suppliername | html %]</a></p>
45       <br />
46       [% IF errors %]
47         <div class="dialog alert">
48           [% IF errors.empty_upload %]The file you are attempting to upload has no contents.[% END %]
49           [% IF errors.no_file %]You did not select a file to upload.[% END %]
50           [% IF errors.invalid_parameter %]Invalid or missing script parameter.[% END %]
51         </div>
52       [% END %]
53       [% IF files %]
54           <table id="invoice_files_details_table">
55               <thead>
56                   <tr>
57                       <th>Name</th>
58                       <th>Type</th>
59                       <th>Description</th>
60                       <th>Uploaded</th>
61                       <th>Bytes</th>
62                       <th>&nbsp;</th>
63                       <th>&nbsp;</th>
64                   </tr>
65               </thead>
66               <tbody>
67                 [% FOREACH f IN files %]
68                   <tr>
69                       <td><a href="?invoiceid=[% invoiceid | uri %]&amp;op=download&amp;view=1&amp;file_id=[% f.file_id | uri %]">[% f.file_name | html %]</a></td>
70                       <td>[% f.file_type | html %]</td>
71                       <td>[% f.file_description | html %]</td>
72                       <td data-order="[% f.date_uploaded | html %]">
73                         [% f.date_uploaded | $KohaDates %]
74                       </td>
75                       <td>[% f.file_size | html %]</td>
76                       <td><a class="delete_file" href="?invoiceid=[% invoiceid | html %]&amp;op=delete&amp;file_id=[% f.file_id | html %]">Delete</a></td>
77                       <td><a href="?invoiceid=[% invoiceid | uri %]&amp;op=download&amp;file_id=[% f.file_id | uri %]">Download</a></td>
78                   </tr>
79                 [% END %]
80               </tbody>
81           </table>
82       [% ELSE %]
83           <div class="dialog message">
84               <p>This invoice has no files attached.</p>
85           </div>
86       [% END %]
87       [% IF invoiceid %]
88           <br />
89           <form method="post" action="/cgi-bin/koha/acqui/invoice-files.pl" enctype="multipart/form-data">
90               <fieldset class="rows">
91                   <legend>Upload new file</legend>
92                   <ol>
93                       <li><input type="hidden" name="op" value="upload" />
94                       <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
95                       <label for="description">Description:</label>
96                       <input name="description" id="description" type="text" /></li>
97                       <li><label for="uploadfile">File:</label><input name="uploadfile" type="file" id="uploadfile" /></li>
98                   </ol>
99               </fieldset>
100                 <fieldset class="action"><input name="upload" type="submit" id="upload" class="btn btn-primary" value="Upload file" /></fieldset>
101           </form>
102       [% END %]
103     </main>
104   </div> <!-- /.col-sm-10.col-sm-push-2 -->
105
106 <div class="col-sm-2 col-sm-pull-10">
107     <aside>
108         [% INCLUDE 'acquisitions-menu.inc' %]
109     </aside>
110 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
111 </div> <!-- /.row -->
112
113 [% MACRO jsinclude BLOCK %]
114     [% Asset.js("js/acquisitions-menu.js") | $raw %]
115     [% INCLUDE 'datatables.inc' %]
116     <script>
117         $(document).ready(function() {
118             $("#invoice_files_details_table").dataTable($.extend(true, {}, dataTablesDefaults, {
119                 "aoColumnDefs": [
120                     { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }
121                 ],
122                 bInfo: false,
123                 bPaginate: false,
124                 bFilter: false,
125                 sDom: "t"
126             }));
127             $("a.delete_file").click(function(){
128                 return ( confirm( _("Are you sure you want to delete this file ?") ) );
129             });
130         });
131     </script>
132 [% END %]
133
134 [% INCLUDE 'intranet-bottom.inc' %]