# HG changeset patch # User HIROSE Yuuji # Date 1340634724 -32400 # Node ID 0ae73ca14d9948b8ddfba6fa545befb20edf5cff # Parent 3e91dd66deb602f18fedfcfacde69205e1d40ff5 Display invite-only group. diff -r 3e91dd66deb6 -r 0ae73ca14d99 after5.rb --- a/after5.rb Mon Jun 25 14:58:05 2012 +0900 +++ b/after5.rb Mon Jun 25 23:32:04 2012 +0900 @@ -4,7 +4,7 @@ # Associative Scheduling Table - after5 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuujigentei.org] # $Id: after5.rb,v 1.19 2012/04/01 11:52:25 yuuji Exp yuuji $ -# Last modified Mon Jun 25 14:57:17 2012 on firestorm +# Last modified Mon Jun 25 23:30:32 2012 on firestorm # See http://www.gentei.org/~yuuji/software/after5/ # このスクリプトはEUCで保存してください。 $hgid = <<_HGID_.split[1..-2].join(" ") @@ -1295,7 +1295,7 @@ 'Set From: address of all ML messages to ML address, which is convenient to keep responses from cellular phones surely to ML address. Most cellular phones tend to return only from: address.'], - 'inviteonly' => ['管理者のみが加入操作可能', + 'inviteonly' => ['管理者のみ加入操作可能', 'Only administrators can add new members.'], 'invite-error' => ['%s への加入はグループ管理者のみが操作できます。', "Only administrator of this group(`%s') can add you."], @@ -3036,10 +3036,6 @@ @H.elementln("table", {'class'=>'border'}){ grmap.sort.collect{|g, ghash| memberp = @sc.ismember(user, g) - # If this group is inviteonly and the user is not a member of it - # nor administrator of it, skip listing. - next if !memberp && !@sc.isadmin(user, g) \ - && @sc.getgroupattr(g, 'inviteonly') @H.elementln("tr"){ @H.element("td", @sc.isadmin(user, g) ? admclass : nil){ g + "
("+@sc.members(g).length.to_s+")" @@ -3059,8 +3055,15 @@ else ghash['name'] end + '
' + \ - @H.radio("groupadd-#{g}", "yes", "IN", memberp) + " / " + \ - @H.radio("groupadd-#{g}", "no", "OUT", !memberp) + # If this group is inviteonly and the user is not a member, + # + if memberp && @sc.isadmin(user, g) || + !@sc.getgroupattr(g, 'inviteonly') + @H.radio("groupadd-#{g}", "yes", "IN", memberp) + " / " + \ + @H.radio("groupadd-#{g}", "no", "OUT", !memberp) + else + @H.element("small"){"("+msg('inviteonly')+")"} + end } + \ @H.element("td"){ @H.element("div", {'class'=>'memlist5'}){