Owen Leonard
18c0eb1301
This patch modifies several acquisitions templates to use the Bootstrap grid instead of YUI. This patch also removes obsolete "text/javascript" attributes from <script> tags in the modified templates. Staff client CSS is modified in this patch so that elements which were styled based on the sidebar's "yui-b" class will work with <aside>. To test, apply the patch and view the following pages, confirming that they look correct at various browser widths: - I don't have EDI set up, so to test acqui/edi_ean.tt I navigate directly to /cgi-bin/koha/acqui/edi_ean.pl. It's only the page structure we're worried about. - Acquisitions -> Orders search - Acquisitions -> Vendor -> Invoices -> Invoice search - View an invoice - Manage invoice files (Preference AcqEnableFiles must be enabled). - Acquisitions -> Late orders Patch applies and operates as described. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
113 lines
4.8 KiB
Text
113 lines
4.8 KiB
Text
[% USE Asset %]
|
|
[% USE KohaDates %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Acquisitions › Invoice › Files</title>
|
|
[% Asset.css("css/datatables.css") %]
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="acq_invoice_files" class="acq">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'acquisitions-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/invoices.pl">Invoices</a> › <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">[% invoicenumber %]</a> › Files</div>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-10 col-sm-push-2">
|
|
<main>
|
|
|
|
<h2>Files for invoice: [% invoicenumber | html %]</h2>
|
|
<p><b>Vendor: </b><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% suppliername %]</a></p>
|
|
<br />
|
|
[% IF errors %]
|
|
<div class="dialog alert">
|
|
[% IF errors.empty_upload %]The file you are attempting to upload has no contents.[% END %]
|
|
[% IF errors.no_file %]You did not select a file to upload.[% END %]
|
|
[% IF errors.invalid_parameter %]Invalid or missing script parameter.[% END %]
|
|
</div>
|
|
[% END %]
|
|
[% IF files %]
|
|
<table id="invoice_files_details_table">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
<th>Uploaded</th>
|
|
<th>Bytes</th>
|
|
<th> </th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH f IN files %]
|
|
<tr>
|
|
<td><a href="?invoiceid=[% invoiceid %]&op=download&view=1&file_id=[% f.file_id %]">[% f.file_name | html %]</a></td>
|
|
<td>[% f.file_type | html %]</td>
|
|
<td>[% f.file_description | html %]</td>
|
|
<td class="title-string">
|
|
<span title="[% f.date_uploaded %]">[% f.date_uploaded | $KohaDates %]</span>
|
|
</td>
|
|
<td>[% f.file_size %]</td>
|
|
<td><a class="delete_file" href="?invoiceid=[% invoiceid %]&op=delete&file_id=[% f.file_id %]">Delete</a></td>
|
|
<td><a href="?invoiceid=[% invoiceid %]&op=download&file_id=[% f.file_id %]">Download</a></td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% ELSE %]
|
|
<div class="dialog message">
|
|
<p>This invoice has no files attached.</p>
|
|
</div>
|
|
[% END %]
|
|
[% IF invoiceid %]
|
|
<br />
|
|
<form method="post" action="/cgi-bin/koha/acqui/invoice-files.pl" enctype="multipart/form-data">
|
|
<fieldset class="rows">
|
|
<legend>Upload New File</legend>
|
|
<ol>
|
|
<li><input type="hidden" name="op" value="upload" />
|
|
<input type="hidden" name="invoiceid" value="[% invoiceid %]" />
|
|
<label for="description">Description:</label>
|
|
<input name="description" id="description" type="text" /></li>
|
|
<li><label for="uploadfile">File:</label><input name="uploadfile" type="file" id="uploadfile" /></li>
|
|
</ol>
|
|
<fieldset class="action"><input name="upload" type="submit" id="upload" value="Upload File" /></fieldset>
|
|
</fieldset>
|
|
</form>
|
|
[% END %]
|
|
</main>
|
|
</div> <!-- /.col-sm-10.col-sm-push-2 -->
|
|
|
|
<div class="col-sm-2 col-sm-pull-10">
|
|
<aside>
|
|
[% INCLUDE 'acquisitions-menu.inc' %]
|
|
</aside>
|
|
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
|
|
</div> <!-- /.row -->
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% Asset.js("js/acquisitions-menu.js") %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script>
|
|
$(document).ready(function() {
|
|
$("#invoice_files_details_table").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
|
|
{ "aTargets": [ "title-string" ], "sType": "title-string" }
|
|
],
|
|
bInfo: false,
|
|
bPaginate: false,
|
|
bFilter: false,
|
|
sDom: "t"
|
|
}));
|
|
$("a.delete_file").click(function(){
|
|
return ( confirm( _("Are you sure you want to delete this file ?") ) );
|
|
});
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|