Browse Source

Bug 22505: Add column configuration to patron list table

Test plan:
1. Create a list of patrons
2. Add some patrons to this list
3. Go to this patron list
   (/cgi-bin/koha/patron_lists/list.pl?patron_list_id=XXX)
4. Verify that you can show/hide all columns except the one containing
   the checkbox
5. Verify that you can export the table data using the Export menu
6. Go to admin/columns_settings.pl, and verify that the configuration
   works for table 'patron-list-table'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Julian Maurice 4 years ago
committed by Nick Clemens
parent
commit
5d4f637a52
  1. 22
      admin/columns_settings.yml
  2. 7
      koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt

22
admin/columns_settings.yml

@ -590,6 +590,28 @@ modules:
columnname: itemtype
-
columnname: status
patron-lists:
patron-list-table:
-
columnname: checkbox
cannot_be_toggled: 1
cannot_be_modified: 1
-
columnname: card
-
columnname: firstname
-
columnname: surname
-
columnname: address
-
columnname: category
-
columnname: library
-
columnname: expires_on
-
columnname: circ_notes
reports:
lostitems:

7
koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt

@ -1,8 +1,10 @@
[% USE raw %]
[% USE Asset %]
[% USE KohaDates %]
[% USE ColumnsSettings %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
[% INCLUDE 'columns_settings.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo; [% list.name | html %] &rsaquo; Add patrons</title>
[% INCLUDE 'doc-head-close.inc' %]
@ -184,7 +186,8 @@
$(document).ready(function() {
$('#patrons_to_add_fieldset').hide();
$('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults, {
var columns_settings_table = [% ColumnsSettings.GetColumns('members', 'patron-lists', 'patron-list-table', 'json') | $raw %]
KohaTable('patron-list-table', {
"order": [[ 3, "asc" ]],
"aoColumns": [
null,null,null,null,null,null,null,{ "sType": "title-string" },null
@ -193,7 +196,7 @@
{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
],
"sPaginationType": "four_button"
} ));
}, columns_settings_table);
patron_autocomplete({
patron_container: $("#patrons_to_add"),

Loading…
Cancel
Save