[% USE AuthorisedValues %] { "sEcho": [% sEcho %], "iTotalRecords": [% iTotalRecords %], "iTotalDisplayRecords": [% iTotalDisplayRecords %], "aaData": [ [% FOREACH data IN aaData %] { [% IF CAN_user_tools_manage_patron_lists %] "dt_borrowernumber": "", [% END %] "dt_cardnumber": "[% data.cardnumber %]", "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%]
[% IF ( data.streetnumber ) %][% data.streetnumber %] [% END %][% IF ( data.streettype ) %][% AuthorisedValues.GetByCode( 'ROADTYPE', data.streettype ) %] [% END %][% data.address %][% IF ( data.address2 ) %]
[% data.address2 %][% END %][% IF ( data.city || data.state || data.zipcode || data.country) %]
[% END %][% IF ( data.city ) %][% data.city %][% IF ( data.state ) %],[% END %][% END %][% IF ( data.state ) %] [% data.state %][% END %] [% IF ( data.zipcode ) %] [% data.zipcode %][% END %][% IF ( data.country ) %], [% data.country %][% END %][% IF data.email %]
Email: [% data.email %][% END %]
", "dt_category": "[% data.category_description |html %] ([% data.category_type |html %])", "dt_branch": "[% data.branchname |html %]", "dt_dateexpiry": "[% data.dateexpiry %]", "dt_od_checkouts": "[% IF data.overdues %][% data.overdues %][% ELSE %][% data.overdues %][% END %] / [% data.issues %]", "dt_fines": "[% IF data.fines < 0 %][% data.fines |html %] [% ELSIF data.fines > 0 %] [% data.fines |html %] [% ELSE %] [% data.fines |html%] [% END %]", "dt_borrowernotes": "[% data.borrowernotes.replace('\\\\' , '\\\\') |html |html_line_break |collapse %]", "dt_action": "[% IF data.category_type %]Edit[% ELSE %][% IF data.categorycode %]Edit[% ELSE %]Edit[% END %][% END %]", "borrowernumber": "[% data.borrowernumber %]" }[% UNLESS loop.last %],[% END %] [% END %] ] }