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