Bugzilla – Attachment 81334 Details for
Bug 21695
Clean up access files template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21695: Clean up access files template
Bug-21695-Clean-up-access-files-template.patch (text/plain), 4.50 KB, created by
Owen Leonard
on 2018-10-26 18:59:00 UTC
(
hide
)
Description:
Bug 21695: Clean up access files template
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-10-26 18:59:00 UTC
Size:
4.50 KB
patch
obsolete
>From e85ab76ce944f7aca89e3f165eddd6c05f488dba Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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: > ><access_dirs> > <access_dir>/tmp/koha-public</access_dir> ></access_dirs> > >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. >--- > .../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 214ba23..19a0743 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' %] > <title>Access files</title> >@@ -12,10 +13,10 @@ > > <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Access files</div> > >-<div id="doc3" class="yui-t2"> >- <div id="bd"> >- <div id="yui-main"> >- <div class="yui-b"> >+<div class="main container-fluid"> >+ <div class="row"> >+ <div class="col-sm-10 col-sm-push-2"> >+ <main> > > <h1>Access files</h1> > >@@ -28,7 +29,7 @@ > <tr> > <th>Name</th> > <th>Size (bytes)</th> >- <th>Date last modified</th> >+ <th class="title-string">Date last modified</th> > </tr> > </thead> > <tbody> >@@ -36,38 +37,41 @@ > <tr> > <td><a href="/cgi-bin/koha/tools/access_files.pl?id=[% file.id |url %]">[% file.name | html %]</a></td> > <td align="right">[% file.size | html %]</td> >- <td>[% file.date | html %]</td> >+ <td><span title="[% file.date | html %]">[% file.date | $KohaDates %]</span></td> > </tr> > [% END %] > </tbody> > </table> > [% ELSE %] >- No file found. >+ <div class="dialog message">No files found.</div> > [% END %] > [% END %] > >-</div> >-</div> >-<div class="yui-b"> >-[% INCLUDE 'tools-menu.inc' %] >-</div> >-</div> >+ </main> >+ </div> <!-- /.col-sm-10.col-sm-push-2 --> >+ >+ <div class="col-sm-2 col-sm-pull-10"> >+ <aside> >+ [% INCLUDE 'tools-menu.inc' %] >+ </aside> >+ </div> <!-- /.col-sm-2.col-sm-pull-10 --> >+ </div> <!-- /.row --> >+ > > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/tools-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >- <script type="text/javascript"> >- //<![CDATA[ >+ <script> > $(document).ready(function() { > $("#files").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sDom": 't', > "aoColumnDefs": [ >- { "aTargets": [ -1 ], "asSorting" : [ "desc", "asc" ], "bSearchable": false } >+ { "aTargets": [ -1 ], "asSorting" : [ "desc", "asc" ], "bSearchable": false }, >+ { "sType": "title-string", "aTargets" : [ "title-string" ] } > ], > "bPaginate": false > })); > }); >- //]]> > </script> > [% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/tools/access_files.pl b/tools/access_files.pl >index 4175017..668ede8 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.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21695
:
81334
|
81536
|
82176