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

(-)a/C4/Utils/DataTables/Members.pm (+1 lines)
Lines 180-185 sub search { Link Here
180
        my $patron_object = Koha::Patrons->find( $patron->{borrowernumber} );
180
        my $patron_object = Koha::Patrons->find( $patron->{borrowernumber} );
181
        $patron->{overdues} = $patron_object->get_overdues->count;
181
        $patron->{overdues} = $patron_object->get_overdues->count;
182
        $patron->{issues} = $patron_object->checkouts->count;
182
        $patron->{issues} = $patron_object->checkouts->count;
183
        $patron->{age} = $patron_object->get_age;
183
        my $balance = $patron_object->account->balance;
184
        my $balance = $patron_object->account->balance;
184
        # FIXME Should be formatted from the template
185
        # FIXME Should be formatted from the template
185
        $patron->{fines} = sprintf("%.2f", $balance);
186
        $patron->{fines} = sprintf("%.2f", $balance);
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (+10 lines)
Lines 55-60 Link Here
55
                <li class="email"> <a href="mailto:[% patron.emailpro | url %]" title="[% patron.emailpro | html %]">[% patron.emailpro | html %]</a></li>
55
                <li class="email"> <a href="mailto:[% patron.emailpro | url %]" title="[% patron.emailpro | html %]">[% patron.emailpro | html %]</a></li>
56
            [% END %]
56
            [% END %]
57
        [% END %]
57
        [% END %]
58
        [% IF ( patron.dateofbirth ) %]
59
            <li>
60
                <span class="label">Date of birth:</span>
61
                [% INCLUDE 'patron-age.inc' %]
62
            </li>
63
        [% END %]
58
64
59
        [% UNLESS ( patron.address or patron.address2 ) %]
65
        [% UNLESS ( patron.address or patron.address2 ) %]
60
            <li><span class="empty" id="noaddressstored">No address stored.</span></li>
66
            <li><span class="empty" id="noaddressstored">No address stored.</span></li>
Lines 68-73 Link Here
68
        [% UNLESS ( patron.email or patron.emailpro) %]
74
        [% UNLESS ( patron.email or patron.emailpro) %]
69
            <li> <span class="empty">No email stored.</span></li>
75
            <li> <span class="empty">No email stored.</span></li>
70
        [% END %]
76
        [% END %]
77
        [% UNLESS ( patron.dateofbirth ) %]
78
            <li> <span class="empty">No date of birth stored.</span></li>
79
        [% END %]
80
71
    [% END %]
81
    [% END %]
72
82
73
    [% IF Koha.Preference('ExtendedPatronAttributes') %]
83
    [% IF Koha.Preference('ExtendedPatronAttributes') %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc (-1 / +1 lines)
Lines 27-33 Link Here
27
                    <td><a href="[% data_url | url %]">[% borrower.surname | html %], [% borrower.firstname | html %]</a></td>
27
                    <td><a href="[% data_url | url %]">[% borrower.surname | html %], [% borrower.firstname | html %]</a></td>
28
            [% END %]
28
            [% END %]
29
                <td>[% borrower.cardnumber | html %]</td>
29
                <td>[% borrower.cardnumber | html %]</td>
30
                <td>[% borrower.dateofbirth | $KohaDates %]</td>
30
                <td>[% INCLUDE 'patron-age.inc' patron = borrower %]</td>
31
                <td>[% Categories.GetName( borrower.categorycode ) | html %]</td>
31
                <td>[% Categories.GetName( borrower.categorycode ) | html %]</td>
32
                <td>[% Branches.GetName( borrower.branchcode ) | html %]</td>
32
                <td>[% Branches.GetName( borrower.branchcode ) | html %]</td>
33
                <td>[% borrower.address | html %]</td>
33
                <td>[% borrower.address | html %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc (+8 lines)
Line 0 Link Here
1
[%- USE KohaDates -%]
2
[%- IF ( patron ) -%]
3
    [%- IF ( patron.dateofbirth ) -%]
4
        [% patron.dateofbirth | $KohaDates -%]
5
        [%- IF ( patron.get_age ) %] ([% patron.get_age | html %] years)
6
        [%- ELSIF ( patron.age ) %] ([% patron.age | html %] years)[% END -%]
7
   [%- END -%]
8
[%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-1 / +1 lines)
Lines 240-246 Link Here
240
                                            [% IF ( patron.dateofbirth ) %]
240
                                            [% IF ( patron.dateofbirth ) %]
241
                                                <li>
241
                                                <li>
242
                                                    <span class="label">Date of birth:</span>
242
                                                    <span class="label">Date of birth:</span>
243
                                                    [% patron.dateofbirth | $KohaDates %] ([% patron.get_age | html %] years)
243
                                                    [% INCLUDE 'patron-age.inc' %]
244
                                                </li>
244
                                                </li>
245
                                            [% END %]
245
                                            [% END %]
246
                                            [% IF ( patron.sex ) %]
246
                                            [% IF ( patron.sex ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/guarantor_search.tt (-1 / +1 lines)
Lines 14-20 Link Here
14
                "dt_name":
14
                "dt_name":
15
                    "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames cardnumber = data.cardnumber invert_name = 1%]",
15
                    "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames cardnumber = data.cardnumber invert_name = 1%]",
16
                "dt_dateofbirth":
16
                "dt_dateofbirth":
17
                    "[% data.dateofbirth | $KohaDates %]",
17
                    "[% INCLUDE 'patron-age.inc' patron = data %]",
18
                "dt_address":
18
                "dt_address":
19
                    "[% INCLUDE escape_address data=data %]",
19
                    "[% INCLUDE escape_address data=data %]",
20
                "dt_action":
20
                "dt_action":
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt (-1 / +1 lines)
Lines 19-25 Link Here
19
                "dt_name":
19
                "dt_name":
20
                    "<a href=\"/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber | html %]\" class=\"patron_preview\" data-borrowernumber=\"[% data.borrowernumber | html %]\" style='white-space:nowrap'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 | $To %]</a><br />[% INCLUDE escape_address data = data %][% IF data.email %]<br/>Email: <a href='mailto:[% data.email | html | $To %]'>[% data.email | html | $To %]</a>[% END %]",
20
                    "<a href=\"/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber | html %]\" class=\"patron_preview\" data-borrowernumber=\"[% data.borrowernumber | html %]\" style='white-space:nowrap'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 | $To %]</a><br />[% INCLUDE escape_address data = data %][% IF data.email %]<br/>Email: <a href='mailto:[% data.email | html | $To %]'>[% data.email | html | $To %]</a>[% END %]",
21
    "dt_dateofbirth":
21
    "dt_dateofbirth":
22
        "[% data.dateofbirth | $KohaDates %]",
22
        "[% INCLUDE 'patron-age.inc' patron = data %]",
23
                "dt_category":
23
                "dt_category":
24
                    "[% data.category_description | html | $To %] ([% data.category_type | html | $To %])",
24
                    "[% data.category_description | html | $To %] ([% data.category_type | html | $To %])",
25
                "dt_branch":
25
                "dt_branch":
(-)a/members/moremember.pl (-2 lines)
Lines 123-129 if ( !$patron->is_valid_age ) { Link Here
123
    $template->param( age_low => $patron->category->dateofbirthrequired );
123
    $template->param( age_low => $patron->category->dateofbirthrequired );
124
    $template->param( age_high => $patron->category->upperagelimit );
124
    $template->param( age_high => $patron->category->upperagelimit );
125
}
125
}
126
$template->param( age => $patron->get_age );
127
126
128
# Generate CSRF token for upload and delete image buttons
127
# Generate CSRF token for upload and delete image buttons
129
$template->param(
128
$template->param(
130
- 

Return to bug 15400