From d9ca9f699bdf1718e3923c0cbc6b11c67512abc1 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 26 Oct 2018 18:36:59 +0000 Subject: [PATCH] Bug 21695: Clean up access files template This patch modifies the access files template to help compliance with several coding guidelines: - Bootstrap grid - Improve DataTables configuration - Move date formatting from the script to the template - Markup corrections To test you must modify koha-conf.xml to contain something like the following: /tmp/koha-public Make sure the directory exists and contains multiple files. - Go to Tools -> Access files - Confirm that the page looks correct and the layout adjusts at various browser widths. - Confirm that DataTables functionality works correctly, including correct sorting by date. Signed-off-by: Katrin Fischer Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- .../prog/en/modules/tools/access_files.tt | 40 ++++++++++--------- tools/access_files.pl | 2 +- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt index 214ba23102..19a07434e5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt @@ -1,5 +1,6 @@ [% USE raw %] [% USE Asset %] +[% USE KohaDates %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Access files @@ -12,10 +13,10 @@ -
-
-
-
+
+
+
+

Access files

@@ -28,7 +29,7 @@ Name Size (bytes) - Date last modified + Date last modified @@ -36,38 +37,41 @@ [% file.name | html %] [% file.size | html %] - [% file.date | html %] + [% file.date | $KohaDates %] [% END %] [% ELSE %] - No file found. +
No files found.
[% END %] [% END %] -
-
-
-[% INCLUDE 'tools-menu.inc' %] -
-
+ +
+ +
+ +
+
+ [% MACRO jsinclude BLOCK %] [% Asset.js("js/tools-menu.js") | $raw %] [% INCLUDE 'datatables.inc' %] - [% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/tools/access_files.pl b/tools/access_files.pl index 417501774b..668ede8649 100755 --- a/tools/access_files.pl +++ b/tools/access_files.pl @@ -82,7 +82,7 @@ else { ); push(@files_list, {name => $decoded_filename, access_dir => $dir, - date =>Koha::DateUtils::output_pref($dt), + date =>$dt, size => $st->size, id => $id}); } -- 2.39.5