Lines 1-4
Link Here
|
1 |
[% USE To %] |
1 |
[% USE To %] |
|
|
2 |
[% USE Branches %] |
2 |
[% USE KohaDates %] |
3 |
[% USE KohaDates %] |
3 |
{ |
4 |
{ |
4 |
"sEcho": [% sEcho %], |
5 |
"sEcho": [% sEcho %], |
Lines 8-23
Link Here
|
8 |
[% FOREACH data IN aaData %] |
9 |
[% FOREACH data IN aaData %] |
9 |
{ |
10 |
{ |
10 |
"dt_cardnumber": |
11 |
"dt_cardnumber": |
11 |
"[% data.cardnumber %]", |
12 |
"[% data.cardnumber |html %]", |
12 |
"dt_name": |
13 |
"dt_name": |
13 |
"[% 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%]", |
14 |
"[% 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%]", |
14 |
"dt_dateofbirth": |
15 |
"dt_dateofbirth": |
15 |
"[% data.dateofbirth | $KohaDates %]", |
16 |
"[% data.dateofbirth | $KohaDates %]", |
16 |
"dt_address": |
17 |
"dt_address": |
17 |
"[% data.streetnumber %] [% data.address | html %] [% data.address2 | html %] [% data.city | html %] [% data.state | html %] [% data.zipcode | html %] [% data.country | html %] [% data.branchcode %]", |
18 |
"[% INCLUDE escape_address data=data %]", |
18 |
"dt_action": |
19 |
"dt_action": |
19 |
"<a style='cursor:pointer' onclick='select_user(\"[% data.borrowernumber %]\", [% To.json(data) | html %] );'>Select</a>" |
20 |
"<a style='cursor:pointer' onclick='select_user(\"[% data.borrowernumber %]\", [% To.json(data) | html %] );'>Select</a>" |
20 |
}[% UNLESS loop.last %],[% END %] |
21 |
}[% UNLESS loop.last %],[% END %] |
21 |
[% END %] |
22 |
[% END %] |
22 |
] |
23 |
] |
23 |
} |
24 |
} |
|
|
25 |
[% BLOCK escape_address %] |
26 |
[%~ SET address = data.streetnumber _ ' ' %] |
27 |
[%~ IF data.address %][% SET address = address _ data.address _ ' ' %][% END %] |
28 |
[%~ IF data.address2 %][% SET address = address _ data.address2 _ ' ' %][% END %] |
29 |
[%~ IF data.city %][% SET address = address _ data.city _ ' ' %][% END %] |
30 |
[%~ IF data.state %][% SET address = address _ data.state _ ' ' %][% END %] |
31 |
[%~ IF data.zipcode %][% SET address = address _ data.zipcode _ ' ' %][% END %] |
32 |
[%~ IF data.country %][% SET address = address _ data.country _ ' ' %][% END %] |
33 |
[%~ SET address = address _ Branches.GetName( data.branchcode ) %] |
34 |
[%~ To.json( address ) | html ~%] |
35 |
[% END %] |