Modern way of showing user in grids

1 view
Skip to first unread message

Alexander Obuhovich

unread,
Nov 21, 2011, 7:49:40 AM11/21/11
to In-Portal Development
Most of data, that can be added from Front-End has CreatedById column, that stores ID of user, who created that record.

In all places we use LEFT JOIN to PortalUser table to speed up user data retrieval. However we don't centrally use universal scheme for user data display.
Here is the one, that I've developed on one of projects I was working on:

'CASE %1$s.CreatedById WHEN ' . USER_ROOT . ' THEN "root" WHEN ' . USER_GUEST . ' THEN "Guest" ELSE IF(CONCAT(pu.FirstName, pu.LastName) <> "", CONCAT(pu.FirstName, " ", pu.LastName), pu.Username) END'

Above SQL shows user's firstname & lastname only when they are filled and shows username otherwise.


--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Phil -- wbtc.fr --

unread,
Nov 21, 2011, 7:58:35 AM11/21/11
to in-por...@googlegroups.com
do you intend to make 1 admin grid column then?

2011/11/21 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Nov 21, 2011, 8:01:41 AM11/21/11
to in-por...@googlegroups.com
Nope, won't be adding such column, where it's missing.

This is only for case, when we have this column and always display username, but could display firstname+lastname for easy managing.

Dmitry A.

unread,
Nov 21, 2011, 12:15:06 PM11/21/11
to in-por...@googlegroups.com
Hi guys,


I like the idea!


DA
Reply all
Reply to author
Forward
0 new messages