Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
507f48a438
commit
30e5985aa1
|
|
@ -85,7 +85,7 @@ while ( my $b = $borrowers_rs->next ) {
|
|||
firstname => $b->firstname // '',
|
||||
cardnumber => $b->cardnumber // '',
|
||||
dateofbirth => format_sqldatetime($b->dateofbirth, undef, undef, 1) // '',
|
||||
age => $b->get_age // 'Age unknown',
|
||||
age => $b->get_age // '',
|
||||
address => $b->address // '',
|
||||
city => $b->city // '',
|
||||
zipcode => $b->zipcode // '',
|
||||
|
|
|
|||
|
|
@ -106,9 +106,14 @@
|
|||
// Display card number in parentheses if it exists
|
||||
cardnumber = " (" + item.cardnumber + ") ";
|
||||
}
|
||||
var itemString = "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>";
|
||||
if( item.dateofbirth ) {
|
||||
itemString += item.dateofbirth + " (" + item.age + " " + _("years") + "), ";
|
||||
}
|
||||
itemString += item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>";
|
||||
return $( "<li></li>" )
|
||||
.data( "ui-autocomplete-item", item )
|
||||
.append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " (" + item.age + ") " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
|
||||
.append( itemString )
|
||||
.appendTo( ul );
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
[%- USE KohaDates -%]
|
||||
[%- USE I18N -%]
|
||||
[%- IF ( patron ) -%]
|
||||
[%- IF ( patron.dateofbirth ) -%]
|
||||
[% patron.dateofbirth | $KohaDates -%]
|
||||
[%- IF ( patron.get_age ) %] ([% patron.get_age | html %])
|
||||
[%- ELSIF ( patron.age ) %] ([% patron.age | html %])[% END -%]
|
||||
[%- patron.dateofbirth | $KohaDates %]
|
||||
[%- SET age = (patron.get_age != undef) ? patron.get_age : patron.age -%]
|
||||
[% I18N.tnx('({age} year)', '({age} years)', age, { age => age }) | html %]
|
||||
[%- END -%]
|
||||
[%- END -%]
|
||||
|
|
|
|||
Loading…
Reference in New Issue