Bug 21695: Clean up access files template
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / access_files.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Access files</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% Asset.css("css/datatables.css") | $raw %]
9 </head>
10 <body id="tools_access_files" class="tools">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'cat-search.inc' %]
13
14 <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>
15
16 <div class="main container-fluid">
17     <div class="row">
18         <div class="col-sm-10 col-sm-push-2">
19             <main>
20
21     <h1>Access files</h1>
22
23 [% IF ( error_no_dir ) %]
24     <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>
25 [% ELSE %]
26     [% IF ( files_loop ) %]
27         <table id="files">
28             <thead>
29                 <tr>
30                     <th>Name</th>
31                     <th>Size (bytes)</th>
32                     <th class="title-string">Date last modified</th>
33                 </tr>
34             </thead>
35             <tbody>
36                 [% FOREACH file IN files_loop %]
37                 <tr>
38                     <td><a href="/cgi-bin/koha/tools/access_files.pl?id=[% file.id |url %]">[% file.name | html %]</a></td>
39                     <td align="right">[% file.size | html %]</td>
40                     <td><span title="[% file.date | html %]">[% file.date | $KohaDates %]</span></td>
41                 </tr>
42                 [% END %]
43             </tbody>
44         </table>
45     [% ELSE %]
46         <div class="dialog message">No files found.</div>
47     [% END %]
48 [% END %]
49
50             </main>
51         </div> <!-- /.col-sm-10.col-sm-push-2 -->
52
53         <div class="col-sm-2 col-sm-pull-10">
54             <aside>
55                 [% INCLUDE 'tools-menu.inc' %]
56             </aside>
57         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
58     </div> <!-- /.row -->
59
60
61 [% MACRO jsinclude BLOCK %]
62     [% Asset.js("js/tools-menu.js") | $raw %]
63     [% INCLUDE 'datatables.inc' %]
64     <script>
65         $(document).ready(function() {
66             $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
67                 "aoColumnDefs": [
68                     { "aTargets": [ -1 ], "asSorting" : [ "desc", "asc" ], "bSearchable": false },
69                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
70                 ],
71                 "bPaginate": false
72             }));
73     });
74 </script>
75 [% END %]
76
77 [% INCLUDE 'intranet-bottom.inc' %]