Bugzilla – Attachment 26379 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]
[PASSED QA] Bug 11738 [Revised] Use new DataTables include in batch patron modification template
PASSED-QA-Bug-11738-Revised-Use-new-DataTables-inc.patch (text/plain), 6.62 KB, created by
Katrin Fischer
on 2014-03-16 14:23:56 UTC
(
hide
)
Description:
[PASSED QA] Bug 11738 [Revised] Use new DataTables include in batch patron modification template
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-03-16 14:23:56 UTC
Size:
6.62 KB
patch
obsolete
>From deaaf06ac182184929323fec800c3196c3bc1d3d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 10 Feb 2014 14:51:27 -0500 >Subject: [PATCH] [PASSED QA] Bug 11738 [Revised] Use new DataTables include in > batch patron modification template > >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. > >Test with extended patron attributes enabled. Test adding and removing >varying numbers of attributes to patrons in your batch. > >Submit a change to multiple borrowers. The results page should also be >sorted correctly. > >Revision: Corrected error caused by the variable number of columns in >the table corresponding to varying numbers of patron attributes. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes all tests and QA script, works as described. >--- > .../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..1271224 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" }[% FOREACH attrh IN attributes_header %],null[% END %] >+ ], >+ [% ELSE %] >+ "aoColumnDefs": [ >+ { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "aoColumns": [ >+ null,null,null,null,null,null,{ "sType": "title-string" },{ "sType": "title-string" }[% FOREACH attrh IN attributes_header %],null[% END %] >+ ], >+ [% 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.8.3.2
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