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 53-58 Link Here
53
                <li class="email"> <a href="mailto:[% patron.emailpro | url %]" title="[% patron.emailpro | html %]">[% patron.emailpro | html %]</a></li>
53
                <li class="email"> <a href="mailto:[% patron.emailpro | url %]" title="[% patron.emailpro | html %]">[% patron.emailpro | html %]</a></li>
54
            [% END %]
54
            [% END %]
55
        [% END %]
55
        [% END %]
56
        [% IF ( patron.dateofbirth ) %]
57
            <li>
58
                <span class="label">Date of birth:</span>
59
                [% INCLUDE 'patron-age.inc' %]
60
            </li>
61
        [% END %]
56
62
57
        [% UNLESS ( patron.address or patron.address2 ) %]
63
        [% UNLESS ( patron.address or patron.address2 ) %]
58
            <li><span class="empty" id="noaddressstored">No address stored.</span></li>
64
            <li><span class="empty" id="noaddressstored">No address stored.</span></li>
Lines 66-71 Link Here
66
        [% UNLESS ( patron.email or patron.emailpro) %]
72
        [% UNLESS ( patron.email or patron.emailpro) %]
67
            <li> <span class="empty">No email stored.</span></li>
73
            <li> <span class="empty">No email stored.</span></li>
68
        [% END %]
74
        [% END %]
75
        [% UNLESS ( patron.dateofbirth ) %]
76
            <li> <span class="empty">No date of birth stored.</span></li>
77
        [% END %]
78
69
    [% END %]
79
    [% END %]
70
80
71
    [% IF Koha.Preference('ExtendedPatronAttributes') %]
81
    [% 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 233-239 Link Here
233
                                            [% IF ( patron.dateofbirth ) %]
233
                                            [% IF ( patron.dateofbirth ) %]
234
                                                <li>
234
                                                <li>
235
                                                    <span class="label">Date of birth:</span>
235
                                                    <span class="label">Date of birth:</span>
236
                                                    [% patron.dateofbirth | $KohaDates %] ([% age | html %] years)
236
                                                    [% INCLUDE 'patron-age.inc' %]
237
                                                </li>
237
                                                </li>
238
                                            [% END %]
238
                                            [% END %]
239
                                            [% IF ( patron.sex ) %]
239
                                            [% 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 = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) invert_name = 1 %]</a><br />[% INCLUDE escape_address data = data %][% IF data.email %]<br/>Email: <a href='mailto:[% data.email | html %]'>[% data.email | html %]</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 = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) invert_name = 1 %]</a><br />[% INCLUDE escape_address data = data %][% IF data.email %]<br/>Email: <a href='mailto:[% data.email | html %]'>[% data.email | html %]</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 %] ([% data.category_type | html %])",
24
                    "[% data.category_description | html %] ([% data.category_type | html %])",
25
                "dt_branch":
25
                "dt_branch":
(-)a/members/moremember.pl (-6 lines)
Lines 223-233 $today->truncate(to => 'day'); Link Here
223
my $overdues_exist = 0;
223
my $overdues_exist = 0;
224
my $totalprice = 0;
224
my $totalprice = 0;
225
225
226
# Calculate and display patron's age
227
if ( $data->{dateofbirth} ) {
228
    $template->param( age => Koha::Patron->new({ dateofbirth => $data->{dateofbirth} })->get_age );
229
}
230
231
### ###############################################################################
226
### ###############################################################################
232
# BUILD HTML
227
# BUILD HTML
233
# show all reserves of this borrower, and the position of the reservation ....
228
# show all reserves of this borrower, and the position of the reservation ....
234
- 

Return to bug 15400