To test:
- Make sure you have a patron with just a surname and no firstname
- Create an ILL request so that the name of this patron shows up in
the Patron column of the ILL requests table
- Before the patch, the name will display as "null Surname"
- Apply the patch
- Reload the ILL requests page
- The name should now display as just "Surname"
- Sign ye merrily off
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit
5ea877f6cba299373e0ebb9c59f8797baba98bec)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit
da971a81da893ca625d78b172ccab8f4131a8664)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
// Our 'render' function for borrowerlink
var createPatronLink = function(data, type, row) {
- return '<a title="' + _("View borrower details") + '" ' +
+ var patronLink = '<a title="' + _("View borrower details") + '" ' +
'href="/cgi-bin/koha/members/moremember.pl?' +
- 'borrowernumber='+row.borrowernumber+'">' +
- row.patron_firstname + ' ' + row.patron_surname +
- '</a>';
+ 'borrowernumber='+row.borrowernumber+'">';
+ if ( row.patron_firstname ) {
+ patronLink = patronLink + row.patron_firstname + ' ';
+ }
+ patronLink = patronLink + row.patron_surname + '</a>';
+ return patronLink
};
// Our 'render' function for the library name