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 44-49 Link Here
44
                <li class="email"> <a href="mailto:[% patron.emailpro | url %]" title="[% patron.emailpro | html %]">[% patron.emailpro | html %]</a></li>
44
                <li class="email"> <a href="mailto:[% patron.emailpro | url %]" title="[% patron.emailpro | html %]">[% patron.emailpro | html %]</a></li>
45
            [% END %]
45
            [% END %]
46
        [% END %]
46
        [% END %]
47
        [% IF ( patron.dateofbirth ) %]
48
            <li>
49
                <span class="label">Date of birth:</span>
50
                [% INCLUDE 'patron-age.inc' %]
51
            </li>
52
        [% END %]
47
53
48
        [% UNLESS ( patron.address or patron.address2 ) %]
54
        [% UNLESS ( patron.address or patron.address2 ) %]
49
            <li><span class="empty" id="noaddressstored">No address stored.</span></li>
55
            <li><span class="empty" id="noaddressstored">No address stored.</span></li>
Lines 57-62 Link Here
57
        [% UNLESS ( patron.email or patron.emailpro) %]
63
        [% UNLESS ( patron.email or patron.emailpro) %]
58
            <li> <span class="empty">No email stored.</span></li>
64
            <li> <span class="empty">No email stored.</span></li>
59
        [% END %]
65
        [% END %]
66
        [% UNLESS ( patron.dateofbirth ) %]
67
            <li> <span class="empty">No date of birth stored.</span></li>
68
        [% END %]
69
60
    [% END %]
70
    [% END %]
61
71
62
    [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN extendedattributes %]
72
    [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN extendedattributes %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc (-1 / +1 lines)
Lines 26-32 Link Here
26
                    <td><a href="[% data_url | url %]">[% borrower.surname | html %], [% borrower.firstname | html %]</a></td>
26
                    <td><a href="[% data_url | url %]">[% borrower.surname | html %], [% borrower.firstname | html %]</a></td>
27
            [% END %]
27
            [% END %]
28
                <td>[% borrower.cardnumber | html %]</td>
28
                <td>[% borrower.cardnumber | html %]</td>
29
                <td>[% borrower.dateofbirth | $KohaDates %]</td>
29
                <td>[% INCLUDE 'patron-age.inc' patron = borrower %]</td>
30
                <td>[% Categories.GetName( borrower.categorycode ) | html %]</td>
30
                <td>[% Categories.GetName( borrower.categorycode ) | html %]</td>
31
                <td>[% Branches.GetName( borrower.branchcode ) | html %]</td>
31
                <td>[% Branches.GetName( borrower.branchcode ) | html %]</td>
32
                <td>[% borrower.address | html %]</td>
32
                <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 216-222 Link Here
216
                                            [% IF ( patron.dateofbirth ) %]
216
                                            [% IF ( patron.dateofbirth ) %]
217
                                                <li>
217
                                                <li>
218
                                                    <span class="label">Date of birth:</span>
218
                                                    <span class="label">Date of birth:</span>
219
                                                    [% patron.dateofbirth | $KohaDates %] ([% age | html %] years)
219
                                                    [% INCLUDE 'patron-age.inc' %]
220
                                                </li>
220
                                                </li>
221
                                            [% END %]
221
                                            [% END %]
222
                                            [% IF ( patron.sex ) %]
222
                                            [% 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