columnname: cardnumber
-
columnname: name
+ -
+ columnname: dateofbirth
-
columnname: category
-
use C4::Context;
use C4::Auth qw/check_cookie_auth/;
use Koha::Borrowers;
+use Koha::DateUtils qw/format_sqldatetime/;
use JSON qw( to_json );
surname => $b->surname // '',
firstname => $b->firstname // '',
cardnumber => $b->cardnumber // '',
+ dateofbirth => format_sqldatetime($b->dateofbirth, undef, undef, 1) // '',
address => $b->address // '',
city => $b->city // '',
zipcode => $b->zipcode // '',
.data( "ui-autocomplete" )._renderItem = function( ul, item ) {
return $( "<li></li>" )
.data( "ui-autocomplete-item", item )
- .append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
+ .append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
.appendTo( ul );
};
},{
'name': 'name_sorton',
'value': 'borrowers.surname borrowers.firstname'
+ },{
+ 'name': 'dateofbirth',
+ 'value': 'borrowers.dateofbirth',
},{
'name': 'category_sorton',
'value': 'categories.description',
[% END %]
{ 'mDataProp': 'dt_cardnumber' },
{ 'mDataProp': 'dt_name' },
+ { 'mDataProp': 'dt_dateofbirth' },
{ 'mDataProp': 'dt_category' },
{ 'mDataProp': 'dt_branch' },
{ 'mDataProp': 'dt_dateexpiry' },
[% END %]
<th>Card</th>
<th>Name</th>
+ <th>Date of birth</>
<th>Category</th>
<th>Library</th>
<th>Expires on</th>
[% USE To %]
[% USE AuthorisedValues %]
+[% USE KohaDates %]
{
"sEcho": [% sEcho %],
"iTotalRecords": [% iTotalRecords %],
"[% data.cardnumber | html %]",
"dt_name":
"<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 %]</a><br />[% INCLUDE escape_address data = data %]</span>",
+ "dt_dateofbirth":
+ "[% data.dateofbirth | $KohaDates %]",
"dt_category":
"[% data.category_description |html %] ([% data.category_type |html %])",
"dt_branch":