2014-03-23 00:22:25 +00:00
|
|
|
<div class="wide box">
|
2014-04-25 22:15:15 +00:00
|
|
|
<%= form_for @match, html: { class: 'square' } do |f| %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.error_messages %>
|
|
|
|
<%= f.hidden_field :contest_id %>
|
|
|
|
|
2014-04-25 22:15:15 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :contester1_id, "Team #1" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.select :contester1_id, @match.contest.contesters.active.collect{|c| ["#{c.team.name}", c.id]} %>
|
2014-04-25 22:15:15 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :contester2_id, "Team #2" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.select :contester2_id, @match.contest.contesters.active.collect{|c| ["#{c.team.name}", c.id]} %>
|
2014-04-25 22:15:15 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :map1_id, "Map #1" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.select :map1_id, @match.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
2014-04-25 22:15:15 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :map2_id, "Map #2" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.select :map2_id, @match.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
2014-04-25 22:15:15 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :match_time %>
|
|
|
|
<%= f.datetime_select :match_time, datetime_separator: '', time_separator: '' %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :referee_id %>
|
2020-03-25 23:34:31 +00:00
|
|
|
<%= f.select :referee_id, Group.referees.collect{|u| [u, u.id]}, {:include_blank => true} %>
|
2014-04-25 22:15:15 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :week_id %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.select :week_id, @match.contest.weeks.ordered.collect{|w| [w, w.id]}, {:include_blank => true} %>
|
2014-04-25 22:15:15 +00:00
|
|
|
</div>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.submit 'Save Match' %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
</div>
|