<% rgroups = Group.find_by_bit_flag(@node.rgroups).collect{|g| g.name} wgroups = Group.find_by_bit_flag(@node.wgroups).collect{|g| g.name} %>

Change groups for read

<% form_tag do %>

path: <%= @node.path %> <%= hidden_field_tag("path", @node.path) %>

<% if @users options = Array.new @users.each{|user| options.push "#{user.login}" } %>

user: <%= select_tag("owner", options) %>

<% end %>

other_mode: <% options = Array.new options.push "4 (others can read)" options.push "0 (others cannot read)" %> <%= select_tag("other_mode", options) %>

readable to: <% options = ["everyone"] if @groups options.push('') options += @groups.collect{|g| gname = g.name "#{h(gname)}" } end %> <%= select_tag("rgroups[]", options, {:multiple=>true} ) %>

writable to: <% options = Array.new if @groups options.push('') options += @groups.collect{|g| gname = g.name "#{h(gname)}" } end %> <%= select_tag("wgroups[]", options, {:multiple=>true} ) %>


<%= submit_tag("update") %> <% end %>