@@ -, +, @@ is not displayed --- C4/Utils/DataTables/Members.pm | 4 ++++ admin/columns_settings.yml | 3 +++ .../intranet-tmpl/prog/en/modules/members/member.tt | 10 ++++++++++ .../prog/en/modules/members/tables/members_results.tt | 4 ++++ 4 files changed, 21 insertions(+) --- a/C4/Utils/DataTables/Members.pm +++ a/C4/Utils/DataTables/Members.pm @@ -4,6 +4,7 @@ use Modern::Perl; use C4::Context; use C4::Utils::DataTables; use Koha::DateUtils; +use Koha::Patron::Attributes; sub search { my ( $params ) = @_; @@ -213,6 +214,9 @@ sub search { my $balance = $patron_object->account->balance; # FIXME Should be formatted from the template $patron->{fines} = sprintf("%.2f", $balance); + if (C4::Context->preference('ExtendedPatronAttributes')) { + $patron->{attributes} = Koha::Patron::Attributes->search({ borrowernumber => $patron_object->borrowernumber }); + } if( $patron->{dateexpiry} ) { # FIXME We should not format the date here, do it in template-side instead --- a/admin/columns_settings.yml +++ a/admin/columns_settings.yml @@ -705,6 +705,9 @@ modules: columnname: od_checkouts - columnname: fines + - + columnname: extended_attributes + is_hidden: 1 - columnname: circ_notes - --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -103,6 +103,9 @@ Expires on OD/Checkouts Fines + [% IF Koha.Preference('ExtendedPatronAttributes') %] + Extended attributes + [% END %] Circ note   @@ -369,6 +372,10 @@ [%# Remove the first column if we do not display the checkbox %] columns_settings.splice(0, 1); [% END %] + [% UNLESS Koha.Preference('ExtendedPatronAttributes') %] + const extendedAttributesColumnIndex = columns_settings.findIndex(column => column.columnname === 'extended_attributes'); + columns_settings.splice(extendedAttributesColumnIndex, 1); + [% END %] dtMemberResults = KohaTable("memberresultst", { 'bServerSide': true, 'sAjaxSource': "/cgi-bin/koha/svc/members/search", @@ -438,6 +445,9 @@ { 'mDataProp': 'dt_dateexpiry' }, { 'mDataProp': 'dt_od_checkouts', 'bSortable': false }, { 'mDataProp': 'dt_fines', 'bSortable': false }, + [% IF Koha.Preference('ExtendedPatronAttributes') %] + { 'mDataProp': 'dt_extended_attributes', 'bSortable': false }, + [% END %] { 'mDataProp': 'dt_borrowernotes' }, { 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' } ], --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt @@ -3,6 +3,7 @@ [% USE AuthorisedValues %] [% USE KohaDates %] [% USE Price %] +[% USE Koha %] { "sEcho": [% sEcho | html %], "iTotalRecords": [% iTotalRecords | html %], @@ -30,6 +31,9 @@ "[% IF data.overdues %][% data.overdues | html %][% ELSE %][% data.overdues | html %][% END %] / [% data.issues | html %]", "dt_fines": "[% IF data.fines < 0 %][% data.fines | $Price %][% ELSIF data.fines > 0 %][% data.fines | $Price %][% ELSE %][% data.fines | $Price %][% END %]", + [% IF Koha.Preference('ExtendedPatronAttributes') %] + "dt_extended_attributes": "", + [% END %] "dt_borrowernotes": "[% data.borrowernotes | html_line_break | collapse | $To %]", "dt_action": --