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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc (-3 / +5 lines)
Lines 1-9 Link Here
1
[%# The variable patron must be passed, with either a Koha::Patron, or a HASHREF with the 'age' key -%]
1
[%- USE KohaDates -%]
2
[%- USE KohaDates -%]
2
[%- USE I18N -%]
3
[%- USE I18N -%]
3
[%- IF ( patron ) -%]
4
[%- IF ( patron ) -%]
4
    [%- IF ( patron.dateofbirth ) -%]
5
    [%- IF ( patron.dateofbirth ) -%]
5
        [%- patron.dateofbirth | $KohaDates %]
6
        [%- SET age = (patron.get_age != undef) ? patron.get_age : patron.age -%]
6
        [%- SET age = (patron.get_age != undef) ? patron.get_age : patron.age -%]
7
        <span class='age_years'>[% I18N.tnx('({age} year)', '({age} years)', age, { age => age }) | html %]</span>
7
        [%- IF age %]
8
            [%- patron.dateofbirth | $KohaDates %]
9
            <span class='age_years'>[% I18N.tnx('({age} year)', '({age} years)', age, { age => age }) | html %]</span>
10
        [%- END -%]
8
   [%- END -%]
11
   [%- END -%]
9
[%- END -%]
12
[%- END -%]
10
- 

Return to bug 15400