Bugzilla – Attachment 119419 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
Bug-28014-Add-table-settings-to-batch-patron-modif.patch (text/plain), 7.58 KB, created by
Owen Leonard
on 2021-04-09 16:20:37 UTC
(
hide
)
Description:
Bug 28014: Add table settings to batch patron modification
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-04-09 16:20:37 UTC
Size:
7.58 KB
patch
obsolete
>From fd1bd61fd0a980e2e656f2447c9b113c212e2926 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> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > admin/columns_settings.yml | 50 ++++++++++++++++++++++ > .../prog/en/modules/tools/modborrowers.tt | 38 +++++++++++----- > 2 files changed, 77 insertions(+), 11 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index df9290d727..60107a6e70 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -1434,6 +1434,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 30943e522c..9cd7eca31f 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> >@@ -142,7 +143,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> >@@ -174,8 +177,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> >@@ -344,21 +351,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', >- [% UNLESS ( op == 'show_results' ) %] >- "aoColumnDefs": [ >- { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }, >- ], >- [% 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.11.0
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