% captain = team == 1 ? @gather.captain1 : @gather.captain2 %>
<% pick = false %>
<%= if team.nil? then "Lobby" else team == 1 ? "Marines" : "Aliens" end %>
<%= form_tag pick_gather_path(@gather) do %>
<% @gather.gatherers.ordered.team(team).each do |gatherer| %>
-
<% if @gatherer and gatherer.can_update? cuser, { team: @gatherer.team } %>
<% pick = true %>
<%= radio_button_tag :player, gatherer.id %>
<%= flag gatherer.user.country %>
<%= namelink gatherer.user %>
<% else %>
<%= flag(gatherer.user.country) if gatherer.user && gatherer.user.country %>
<% if gatherer == captain and gatherer.team == gatherer.gather.turn %>
<%= icon 'chevron-right' %>
<% end %>
<%= namelink gatherer.user %>
<% if gatherer == captain %>
<%= icon('star') %>
<% end %>
<% end %>
<% end %>
<% if pick %>
<%= submit_tag 'Pick' %>
<% end %>
<% end %>