e5001c5a37
I believe I suggested a typo - trying to fix it here. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
36 lines
1.9 KiB
Text
36 lines
1.9 KiB
Text
[% USE raw %]
|
|
[% USE To %]
|
|
[% USE Branches %]
|
|
[% USE KohaDates %]
|
|
{
|
|
"sEcho": [% sEcho | html %],
|
|
"iTotalRecords": [% iTotalRecords | html %],
|
|
"iTotalDisplayRecords": [% iTotalDisplayRecords | html %],
|
|
"aaData": [
|
|
[% FOREACH data IN aaData %]
|
|
{
|
|
"dt_cardnumber":
|
|
"[% data.cardnumber | html %]",
|
|
"dt_name":
|
|
"[% 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%]",
|
|
"dt_dateofbirth":
|
|
"[% data.dateofbirth | $KohaDates %]",
|
|
"dt_address":
|
|
"[% INCLUDE escape_address data=data %]",
|
|
"dt_action":
|
|
"<a href=\"#\" class=\"btn btn-default btn-xs select_user\" data-borrowernumber=\"[% data.borrowernumber | html %]\">Select</a><input type=\"hidden\" id=\"borrower_data[% data.borrowernumber | html %]\" name=\"borrower_data[% data.borrowernumber | html %]\" value=\"[% To.json(data) | html %]\" />"
|
|
}[% UNLESS loop.last %],[% END %]
|
|
[% END %]
|
|
]
|
|
}
|
|
[% BLOCK escape_address %]
|
|
[%~ SET address = data.streetnumber _ ' ' %]
|
|
[%~ IF data.address %][% SET address = address _ data.address _ ' ' %][% END %]
|
|
[%~ IF data.address2 %][% SET address = address _ data.address2 _ ' ' %][% END %]
|
|
[%~ IF data.city %][% SET address = address _ data.city _ ' ' %][% END %]
|
|
[%~ IF data.state %][% SET address = address _ data.state _ ' ' %][% END %]
|
|
[%~ IF data.zipcode %][% SET address = address _ data.zipcode _ ' ' %][% END %]
|
|
[%~ IF data.country %][% SET address = address _ data.country _ ' ' %][% END %]
|
|
[%~ SET address = address _ Branches.GetName( data.branchcode ) %]
|
|
[%~ To.json( address ) | $raw ~%]
|
|
[% END %]
|