Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt
Katrin Fischer 8c4928048e Bug 11317: (QA follow-up) Change tool name to be more general
I think this tool could be used in multiple ways, for all kinds
of files that you want to protect by login in Koha. So a more
general name might work better.

This is a suggestion, not mandatory.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 13:26:50 -03:00

72 lines
2.1 KiB
Text

[% USE Asset %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Access files</title>
[% INCLUDE 'doc-head-close.inc' %]
[% Asset.css("css/datatables.css") %]
</head>
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Access files</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h1>Access files</h1>
[% IF ( error_no_dir ) %]
<div class="dialog alert"><strong>Error: </strong>Files could not be found because the "access_dir" option was not set in "koha-conf.xml". Contact your system administrator to add this option.</div>
[% ELSE %]
[% IF ( files_loop ) %]
<table id="files">
<thead>
<tr>
<th>Name</th>
<th>Size (bytes)</th>
<th>Date last modified</th>
</tr>
</thead>
<tbody>
[% FOREACH file IN files_loop %]
<tr>
<td><a href="/cgi-bin/koha/tools/access_files.pl?id=[% file.id |url %]">[% file.name %]</a></td>
<td align="right">[% file.size %]</td>
<td>[% file.date %]</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
No file found.
[% END %]
[% END %]
</div>
</div>
<div class="yui-b">
[% INCLUDE 'tools-menu.inc' %]
</div>
</div>
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/tools-menu.js") %]
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
"sDom": 't',
"aoColumnDefs": [
{ "aTargets": [ -1 ], "asSorting" : [ "desc", "asc" ], "bSearchable": false }
],
"bPaginate": false
}));
});
//]]>
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]