Mercurial > hgrepos > hgweb.cgi > after5
comparison after5.rb @ 64:2445a87742d0 draft
Gather the current group-member at the beginning of the user list.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 25 Jun 2012 14:41:58 +0900 |
parents | e2aa6180c2c6 |
children | 3e91dd66deb6 |
comparison
equal
deleted
inserted
replaced
63:e2aa6180c2c6 | 64:2445a87742d0 |
---|---|
2 # -*- coding: euc-jp -*- | 2 # -*- coding: euc-jp -*- |
3 # | 3 # |
4 # Associative Scheduling Table - after5 | 4 # Associative Scheduling Table - after5 |
5 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuuji<at>gentei.org] | 5 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuuji<at>gentei.org] |
6 # $Id: after5.rb,v 1.19 2012/04/01 11:52:25 yuuji Exp yuuji $ | 6 # $Id: after5.rb,v 1.19 2012/04/01 11:52:25 yuuji Exp yuuji $ |
7 # Last modified Mon Jun 25 14:29:40 2012 on firestorm | 7 # Last modified Mon Jun 25 14:40:45 2012 on firestorm |
8 # See http://www.gentei.org/~yuuji/software/after5/ | 8 # See http://www.gentei.org/~yuuji/software/after5/ |
9 # このスクリプトはEUCで保存してください。 | 9 # このスクリプトはEUCで保存してください。 |
10 $hgid = <<_HGID_.split[1..-2].join(" ") | 10 $hgid = <<_HGID_.split[1..-2].join(" ") |
11 $HGid$ | 11 $HGid$ |
12 _HGID_ | 12 _HGID_ |
3220 warnp = nil | 3220 warnp = nil |
3221 | 3221 |
3222 @O.print @H.elementln("form", actionmethod){ | 3222 @O.print @H.elementln("form", actionmethod){ |
3223 @H.hidden('group', group) + "\n" + \ | 3223 @H.hidden('group', group) + "\n" + \ |
3224 if group | 3224 if group |
3225 # Non symmetric job: Move the current users above. | |
3226 gmemlist = userlist.select{|u| @sc.ismember(u, group)} | |
3227 userlist = (gmemlist + userlist).uniq | |
3228 # In this context, should return simply "". | |
3225 "" | 3229 "" |
3226 else | 3230 else |
3227 # new group creation | 3231 # new group creation |
3228 grps = @sc.groups() | 3232 grps = @sc.groups() |
3229 i=1 | 3233 i=1 |