changeset 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
files after5.rb
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/after5.rb	Mon Jun 25 14:30:54 2012 +0900
+++ b/after5.rb	Mon Jun 25 14:41:58 2012 +0900
@@ -4,7 +4,7 @@
 # Associative Scheduling Table - after5
 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuuji<at>gentei.org]
 # $Id: after5.rb,v 1.19 2012/04/01 11:52:25 yuuji Exp yuuji $
-# Last modified Mon Jun 25 14:29:40 2012 on firestorm
+# Last modified Mon Jun 25 14:40:45 2012 on firestorm
 # See http://www.gentei.org/~yuuji/software/after5/
 # このスクリプトはEUCで保存してください。
 $hgid = <<_HGID_.split[1..-2].join(" ")
@@ -3222,6 +3222,10 @@
     @O.print @H.elementln("form", actionmethod){
       @H.hidden('group', group) + "\n" + \
       if group
+        # Non symmetric job: Move the current users above.
+        gmemlist = userlist.select{|u| @sc.ismember(u, group)}
+        userlist = (gmemlist + userlist).uniq
+        # In this context, should return simply "".
 	""
       else
 	# new group creation

yatex.org