s4
changeset 220:7d05425e4057
Put information how many members in that group.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Wed, 15 Jun 2016 17:34:08 +0859 |
parents | e2dea2f63a69 |
children | acd904062e55 |
files | s4-funcs.sh |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/s4-funcs.sh Mon Jun 13 12:28:00 2016 +0859 1.2 +++ b/s4-funcs.sh Wed Jun 15 17:34:08 2016 +0859 1.3 @@ -1614,8 +1614,15 @@ 1.4 # grpは呼出し元の動的スコープ変数でよくないな... 1.5 ##qgrp=`sqlquote $grp` 1.6 getgrp="(select gname from grp where rowid=${rowid:--1})" 1.7 - sql="select a.rowid, a.$link, coalesce(b.$gcs, a.$nm) as nick, 1.8 - coalesce(b.gecos, a.$nm) as name, 1.9 + sql="select a.rowid, a.$link, 1.10 + coalesce(b.$gcs, a.$nm) as nick, 1.11 + coalesce(b.gecos, a.$nm) /* If group, concat (Nusers) */ 1.12 + || case when a.$nm in (select gname from grp) 1.13 + then printf('(%d名)', 1.14 + (select count(user) from grp_mem where gname=a.$nm)) 1.15 + else '<a.$nm>' 1.16 + end 1.17 + as name, 1.18 b.tag, 1.19 case when a.$nm in (select user from grp_adm 1.20 where gname=$getgrp) then '(管理者)'