<%= 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.label :logo %>
<%= f.file_field :logo %>
<%= f.submit "Update" %>
<% end %>
<%= form_for @team do |f| %>
Name |
Comment |
Rank |
Actions |
<% @team.teamers.present.each do |member| %>
<%= 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 %>
|
<% 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 %>