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:
Josef Moravec 2019-03-11 14:25:46 +00:00 committed by Jonathan Druart
parent 507f48a438
commit 30e5985aa1
3 changed files with 11 additions and 5 deletions

View File

@ -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 // '',

View File

@ -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 );
};
}

View File

@ -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 -%]