Manage Team: <%=h @team.name %>

<%= form_for @team, html: { multipart: true, class: 'square' } do |f| %> <%= f.error_messages %>
<%= f.label :name %> <%= f.text_field :name %>
<%= f.label :irc %> <%= f.text_field :irc %>
<%= f.label :web %> <%= f.text_field :web %>
<%= f.label :tag %> <%= f.text_field :tag %>
<%= f.label :country %> <%= country_select :user, :country, include_blank: true %>
<%= f.label :comment %> <%= f.text_field :comment %>
<%= f.label :recruiting %>
<%= f.text_field :recruiting %>

Leave empty if you are not recruiting, or enter your recruiting criteria above.

<%= f.label :logo %> <%= f.file_field :logo %>
<%= f.submit "Update" %>
<% end %>
<%= form_for @team do |f| %> <% @team.teamers.present.each do |member| %> <% end %>
Name Comment Rank Actions
<%= link_to (h member.user.username), member.user %> <%= text_field_tag "comment[#{member.id}]", (h member.comment) %> <%= select_tag "rank[#{member.id}]", options_for_select(member.ranks.invert, member.rank) %> <%= link_to member, confirm: 'Are you sure?', method: :delete, class: 'button tiny' do %> <%= icon 'times' %> Remove <% end %>
<%= f.submit "Update" %>
<% end %>

<%= form_for @team.contesters.build, html: { class: 'square' } do |f| %> <%= f.hidden_field :team_id %>

<%= f.collection_select :contest_id, Contest.active, :id, :name %>
<%= f.submit "Join" %>
<% end %>

<%= link_to 'Show', @team, class: 'button' %> <%= link_to 'Back', teams_path, class: 'button' %>