Bugzilla – Attachment 25183 Details for
Bug 11738
Use new DataTables include in batch patron modification template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11738 - Use new DataTables include in batch patron modification template
Bug-11738---Use-new-DataTables-include-in-batch-pa.patch (text/plain), 6.12 KB, created by
Owen Leonard
on 2014-02-10 20:00:56 UTC
(
hide
)
Description:
Bug 11738 - Use new DataTables include in batch patron modification template
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-02-10 20:00:56 UTC
Size:
6.12 KB
patch
obsolete
>From 8478d2f5cf1ee9152ad85561732e4e46f858205e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 10 Feb 2014 14:51:27 -0500 >Subject: [PATCH] Bug 11738 - Use new DataTables include in batch patron > modification template >Content-Type: text/plain; charset="utf-8" > >Bug 10649 introduced a new include file for adding DataTables-related >JavaScript assets. This patch adds use of this include file to the >batch patron modification template. > >This patch modifies the template so that date columns are sorted using >the "title-string" filter, based on the unformatted date. The DataTables >configuration has also been modified to account for varying structure >based on the page state. > >Other minor edits: Corrected capitalization. > >To test, go Tools -> Batch patron modification and submit a list of >patrons for modification. The resulting page should be correctly sorted. >Date columns should sort correctly for all dateformat system pref >settings. > >Submit a change to multiple borrowers. The results page should also be >sorted correctly. >--- > .../prog/en/modules/tools/modborrowers.tt | 32 ++++++++++++-------- > 1 file changed, 19 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >index a55dbd4..2e3701f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -3,22 +3,28 @@ > <title>Koha › Tools › Batch patron modification</title> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] >-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/en/css/datatables.css" /> >-<script type="text/javascript" src="[% interface %]/[% theme %]/en/lib/jquery/plugins/jquery.dataTables.min.js"></script> >-[% INCLUDE 'datatables-strings.inc' %] >-<script type="text/javascript" src="[% interface %]/[% theme %]/en/js/datatables.js"></script> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+[% INCLUDE 'datatables.inc' %] > <script type="text/javascript"> > //<![CDATA[ >- [% IF (dateformat == 'metric') %]dt_add_type_uk_date();[% END %] > var patron_attributes_lib = new Array(); > var patron_attributes_values = new Array(); > $(document).ready(function() { > [% IF borrowers %] > $("#borrowerst").dataTable($.extend(true, {}, dataTablesDefaults, { > "sDom": 't', >- "aoColumnDefs": [ >- { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false } >- ], >+ [% IF ( op == 'show_results' ) %] >+ "aoColumns": [ >+ null,null,null,null,null,{ "sType": "title-string" },{ "sType": "title-string" },null >+ ], >+ [% ELSE %] >+ "aoColumnDefs": [ >+ { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "aoColumns": [ >+ null,null,null,null,null,null,{ "sType": "title-string" },{ "sType": "title-string" },null >+ ], >+ [% END %] > "bPaginate": false > })); > $("#selectallbutton").click(function() { >@@ -209,7 +215,7 @@ > <form name="f" action="modborrowers.pl" method="post"> > <input type="hidden" name="op" value="do" /> > [% IF ( borrowers ) %] >- <div id="toolbar"><a id="selectallbutton" href="#">Select All</a> | <a id="clearallbutton" href="#">Clear All</a></div> >+ <div id="toolbar"><a id="selectallbutton" href="#">Select all</a> | <a id="clearallbutton" href="#">Clear all</a></div> > [% END %] > [% END %] > [% IF borrowers %] >@@ -223,7 +229,7 @@ > [% END %] > <th>Card number</th> > <th>Surname</th> >- <th>Firstname</th> >+ <th>First name</th> > <th>Library</th> > <th>Category</th> > <th>Registration date</th> >@@ -244,8 +250,8 @@ > <td>[% borrower.firstname %]</td> > <td>[% borrower.branchname %]</td> > <td>[% borrower.categorycode %]</td> >- <td>[% borrower.dateenrolled | $KohaDates %]</td> >- <td>[% borrower.dateexpiry | $KohaDates %]</td> >+ <td><span title="[% borrower.dateenrolled %]">[% borrower.dateenrolled | $KohaDates %]</span></td> >+ <td><span title="[% borrower.dateexpiry %]">[% borrower.dateexpiry | $KohaDates %]</span></td> > [% FOREACH pa IN borrower.patron_attributes %] > [% IF ( pa.code ) %] > <td>[% pa.code %]=[% pa.value %]</td> >@@ -262,7 +268,7 @@ > > [% IF ( op == 'show' ) %] > <div id="cataloguing_additem_newitem"> >- <h2>Edit Patrons</h2> >+ <h2>Edit patrons</h2> > <div class="hint">Checking the box right next the label will disable the entry and delete the values of that field on all selected patrons</div> > <fieldset class="rows" id="fields_list"> > <ol> >-- >1.7.9.5
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 11738
:
25183
|
25186
|
25196
|
25197
|
25198
|
25200
|
25733
|
26379