Bugzilla – Attachment 118669 Details for
Bug 28014
Add table settings to batch patron modification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28014: Add table settings to batch patron modification
0001-Bug-28014-Add-table-settings-to-batch-patron-modific.patch (text/plain), 7.79 KB, created by
Amit Gupta
on 2021-03-23 15:25:04 UTC
(
hide
)
Description:
Bug 28014: Add table settings to batch patron modification
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2021-03-23 15:25:04 UTC
Size:
7.79 KB
patch
obsolete
>From e4e5e304abb85f0bb9c72798ec5b992f7bfaaf48 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 22 Mar 2021 14:16:49 +0000 >Subject: [PATCH] Bug 28014: Add table settings to batch patron modification > >This patch adds table settings to the tables shown before and after >a batch of patrons has been submitted for batch patron modification. > >To test you must have ExtendedPatronAttributes enabled and at least one >configured. > >- Go to Tools -> Batch patron modification >- Submit a set of patrons for modification >- In the table showing patron records which will be modified, confirm > that all DataTables controls work correctly. > - Confirm that the column visibility settings work correctly, > including the controls for extended patron attribute columns. >- Submit a change to your patron batch. >- On the page showing the results, confirm that the DataTables controls > continue to work as expected. >- Go to Administraion -> Table settings and confirm that making changes > to the default configuration for this table (Tools -> > batch_patron_modification -> borrowerst) results in the correct > default columns being shown on the batch patron modification pages. > >Signed-off-by: Amit Gupta <amitddng135@gmail.com> >--- > admin/columns_settings.yml | 50 ++++++++++++++++++++++ > .../prog/en/modules/tools/modborrowers.tt | 43 ++++++++++++------- > 2 files changed, 77 insertions(+), 16 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 0a14a84..9822e73 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -1432,6 +1432,56 @@ modules: > columnname: spent > > tools: >+ batch_patron_modification: >+ borrowerst: >+ columns: >+ - >+ columnname: batch_patron_edit_selections >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: batch_patron_edit_cardnumber >+ - >+ columnname: batch_patron_edit_surname >+ - >+ columnname: batch_patron_edit_firstname >+ - >+ columnname: batch_patron_edit_branchcode >+ - >+ columnname: batch_patron_edit_categorycode >+ - >+ columnname: batch_patron_edit_streetnumber >+ - >+ columnname: batch_patron_edit_address >+ - >+ columnname: batch_patron_edit_address2 >+ - >+ columnname: batch_patron_edit_city >+ - >+ columnname: batch_patron_edit_state >+ - >+ columnname: batch_patron_edit_zipcode >+ - >+ columnname: batch_patron_edit_country >+ - >+ columnname: batch_patron_edit_email >+ - >+ columnname: batch_patron_edit_phone >+ - >+ columnname: batch_patron_edit_mobile >+ - >+ columnname: batch_patron_edit_dateenrolled >+ - >+ columnname: batch_patron_edit_dateexpiry >+ - >+ columnname: batch_patron_edit_borrowernotes >+ - >+ columnname: batch_patron_edit_opacnote >+ - >+ columnname: batch_patron_edit_debarred >+ - >+ columnname: batch_patron_edit_debarredcomment >+ > logviewer: > logst: > columns: >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 9147d52..94c87df 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -4,6 +4,7 @@ > [% USE KohaDates %] > [% USE Branches %] > [% USE Categories %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Batch patron modification</title> >@@ -134,7 +135,9 @@ > <thead> > <tr> > [% IF ( op == 'show' ) %] >- <th> </th> >+ <th class="NoSort"> </th> >+ [% ELSE %] >+ <th class="hidden"> </th> > [% END %] > <th>Card number</th> > <th>Surname</th> >@@ -166,8 +169,12 @@ > [% FOREACH borrower IN borrowers %] > <tr> > [% IF ( op == 'show' ) %] >- <td><input type="checkbox" name="borrowernumber" value="[% borrower.borrowernumber | html %]" checked="checked" /></td> >+ <td> >+ [% ELSE %] >+ <td class="hidden"> > [% END %] >+ <input type="checkbox" name="borrowernumber" value="[% borrower.borrowernumber | html %]" checked="checked" /> >+ </td> > <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]">[% borrower.cardnumber | html %]</a></td> > <td>[% borrower.surname | html %]</td> > <td>[% borrower.firstname | html %]</td> >@@ -336,26 +343,30 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] > [% Asset.js("js/tools-menu.js") | $raw %] > <script> > var patron_attributes_lib = new Array(); > var patron_attributes_values = new Array(); >+ var table_settings = [% TablesSettings.GetColumns( 'tools', 'batch_patron_modification', 'borrowerst', 'json' ) | $raw %]; >+ [% FOREACH attrh IN attributes_header %] >+ table_settings.push({ >+ columname: "[% attrh.attribute | html %]", >+ cannot_be_modified: 0, >+ cannot_be_toggled: 0, >+ is_hidden: 0 >+ }); >+ [% END %] > $(document).ready(function() { > [% IF borrowers %] >- $("#borrowerst").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sDom": 't', >- [% IF ( op == 'show_results' ) %] >- "aoColumnDefs": [ >- { 'sType': "title-string", 'aTargets' : [ 'title-string'] } >- ], >- [% ELSE %] >- "aoColumnDefs": [ >- { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }, >- { 'sType': "title-string", 'aTargets' : [ 'title-string'] } >- ], >- [% END %] >- "bPaginate": false >- })); >+ KohaTable("borrowerst", { >+ "order": [[ 1, "asc" ]], >+ "autoWidth": false, >+ "columnDefs": [ >+ { "visible": false, "targets" : [ "hidden" ] } >+ ] >+ }, table_settings); >+ > $("#selectallbutton").click(function() { > $("#borrowerst").find("input:checkbox").each(function() { > $(this).prop("checked", true); >-- >2.7.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 28014
:
118610
|
118669
|
118912
|
119419