View | Details | Raw Unified | Return to bug 19909
Collapse All | Expand All

(-)a/C4/Utils/DataTables/Members.pm (+4 lines)
Lines 4-9 use Modern::Perl; Link Here
4
use C4::Context;
4
use C4::Context;
5
use C4::Utils::DataTables;
5
use C4::Utils::DataTables;
6
use Koha::DateUtils;
6
use Koha::DateUtils;
7
use Koha::Patron::Attributes;
7
8
8
sub search {
9
sub search {
9
    my ( $params ) = @_;
10
    my ( $params ) = @_;
Lines 213-218 sub search { Link Here
213
        my $balance = $patron_object->account->balance;
214
        my $balance = $patron_object->account->balance;
214
        # FIXME Should be formatted from the template
215
        # FIXME Should be formatted from the template
215
        $patron->{fines} = sprintf("%.2f", $balance);
216
        $patron->{fines} = sprintf("%.2f", $balance);
217
        if (C4::Context->preference('ExtendedPatronAttributes')) {
218
            $patron->{attributes} = Koha::Patron::Attributes->search({ borrowernumber => $patron_object->borrowernumber });
219
        }
216
220
217
        if( $patron->{dateexpiry} ) {
221
        if( $patron->{dateexpiry} ) {
218
            # FIXME We should not format the date here, do it in template-side instead
222
            # FIXME We should not format the date here, do it in template-side instead
(-)a/admin/columns_settings.yml (+3 lines)
Lines 706-711 modules: Link Here
706
        -
706
        -
707
          columnname: fines
707
          columnname: fines
708
        -
708
        -
709
          columnname: extended_attributes
710
          is_hidden: 1
711
        -
709
          columnname: circ_notes
712
          columnname: circ_notes
710
        -
713
        -
711
          columnname: actions
714
          columnname: actions
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt (+10 lines)
Lines 103-108 Link Here
103
                  <th>Expires on</th>
103
                  <th>Expires on</th>
104
                  <th>OD/Checkouts</th>
104
                  <th>OD/Checkouts</th>
105
                  <th>Fines</th>
105
                  <th>Fines</th>
106
                  [% IF Koha.Preference('ExtendedPatronAttributes') %]
107
                      <th>Extended attributes</th>
108
                  [% END %]
106
                  <th>Circ note</th>
109
                  <th>Circ note</th>
107
                  <th>&nbsp;</th>
110
                  <th>&nbsp;</th>
108
                </tr>
111
                </tr>
Lines 369-374 Link Here
369
                [%# Remove the first column if we do not display the checkbox %]
372
                [%# Remove the first column if we do not display the checkbox %]
370
                columns_settings.splice(0, 1);
373
                columns_settings.splice(0, 1);
371
            [% END %]
374
            [% END %]
375
            [% UNLESS Koha.Preference('ExtendedPatronAttributes') %]
376
                const extendedAttributesColumnIndex = columns_settings.findIndex(column => column.columnname === 'extended_attributes');
377
                columns_settings.splice(extendedAttributesColumnIndex, 1);
378
            [% END %]
372
            dtMemberResults = KohaTable("memberresultst", {
379
            dtMemberResults = KohaTable("memberresultst", {
373
                'bServerSide': true,
380
                'bServerSide': true,
374
                'sAjaxSource': "/cgi-bin/koha/svc/members/search",
381
                'sAjaxSource': "/cgi-bin/koha/svc/members/search",
Lines 438-443 Link Here
438
                    { 'mDataProp': 'dt_dateexpiry' },
445
                    { 'mDataProp': 'dt_dateexpiry' },
439
                    { 'mDataProp': 'dt_od_checkouts', 'bSortable': false },
446
                    { 'mDataProp': 'dt_od_checkouts', 'bSortable': false },
440
                    { 'mDataProp': 'dt_fines', 'bSortable': false },
447
                    { 'mDataProp': 'dt_fines', 'bSortable': false },
448
                    [% IF Koha.Preference('ExtendedPatronAttributes') %]
449
                        { 'mDataProp': 'dt_extended_attributes', 'bSortable': false },
450
                    [% END %]
441
                    { 'mDataProp': 'dt_borrowernotes' },
451
                    { 'mDataProp': 'dt_borrowernotes' },
442
                    { 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' }
452
                    { 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' }
443
                ],
453
                ],
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt (-1 / +4 lines)
Lines 3-8 Link Here
3
[% USE AuthorisedValues %]
3
[% USE AuthorisedValues %]
4
[% USE KohaDates %]
4
[% USE KohaDates %]
5
[% USE Price %]
5
[% USE Price %]
6
[% USE Koha %]
6
{
7
{
7
    "sEcho": [% sEcho | html %],
8
    "sEcho": [% sEcho | html %],
8
    "iTotalRecords": [% iTotalRecords | html %],
9
    "iTotalRecords": [% iTotalRecords | html %],
Lines 30-35 Link Here
30
                    "[% IF data.overdues %]<span class='overdue'><strong>[% data.overdues | html %]</strong></span>[% ELSE %][% data.overdues | html %][% END %] / [% data.issues | html %]",
31
                    "[% IF data.overdues %]<span class='overdue'><strong>[% data.overdues | html %]</strong></span>[% ELSE %][% data.overdues | html %][% END %] / [% data.issues | html %]",
31
                "dt_fines":
32
                "dt_fines":
32
                    "<span style='text-align: right; display: block;'><a href=\"/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% data.borrowernumber | html %]\">[% IF data.fines < 0 %]<span class='credit'>[% data.fines | $Price %]</span>[% ELSIF data.fines > 0 %]<span class='debit'><strong>[% data.fines | $Price %]</strong></span>[% ELSE %][% data.fines | $Price %][% END %]</a></span>",
33
                    "<span style='text-align: right; display: block;'><a href=\"/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% data.borrowernumber | html %]\">[% IF data.fines < 0 %]<span class='credit'>[% data.fines | $Price %]</span>[% ELSIF data.fines > 0 %]<span class='debit'><strong>[% data.fines | $Price %]</strong></span>[% ELSE %][% data.fines | $Price %][% END %]</a></span>",
34
                [% IF Koha.Preference('ExtendedPatronAttributes') %]
35
                    "dt_extended_attributes": "<ul>[% FOREACH attribute IN data.attributes %]<li>[% attribute.type.description | html %]: [% attribute.description | html | html_line_break | collapse %]</li>[% END %]</ul>",
36
                [% END %]
33
                "dt_borrowernotes":
37
                "dt_borrowernotes":
34
                    "[% data.borrowernotes | html_line_break | collapse | $To %]",
38
                    "[% data.borrowernotes | html_line_break | collapse | $To %]",
35
                "dt_action":
39
                "dt_action":
36
- 

Return to bug 19909