2014-04-26 01:24:47 +00:00
|
|
|
<h1>Gather Admin: #<%= @gather.id %></h1>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-26 01:24:47 +00:00
|
|
|
<div class="restart">
|
|
|
|
<h3>Restart Gather</h3>
|
|
|
|
|
|
|
|
<%= form_for(@gather, html: { class: 'square' }) do |f| %>
|
|
|
|
<%= render 'shared/errors', messages: @gather.errors.full_messages %>
|
|
|
|
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.hidden_field :admin %>
|
2014-04-26 01:24:47 +00:00
|
|
|
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :captain1 %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.select :captain1_id, @gather.gatherers.collect{|c| [c, c.id]} %>
|
2014-04-26 01:24:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :captain2 %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.select :captain2_id, @gather.gatherers.collect{|c| [c, c.id]} %>
|
2014-04-26 01:24:47 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.submit 'Restart Gather' %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2014-04-26 01:24:47 +00:00
|
|
|
<div class="turns">
|
|
|
|
<h3>Change Turns</h3>
|
|
|
|
|
|
|
|
<%= form_for(@gather, html: { class: 'square' }) do |f| %>
|
|
|
|
<%= render 'shared/errors', messages: @gather.errors.full_messages %>
|
|
|
|
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :turn %>
|
|
|
|
<%= f.select :turn, ['Team 1', 'Team 2'] %>
|
|
|
|
</div>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.submit 'Change Turn' %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2014-04-26 01:24:47 +00:00
|
|
|
<div class="replace">
|
|
|
|
<h3>Replace Players</h3>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
|
|
|
<% if @gather.gatherers.first %>
|
2014-04-26 01:24:47 +00:00
|
|
|
<%= form_for(@gather.gatherers.first, html: { class: 'square' }) do |f| %>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :id, "Select Player" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.select :id, @gather.gatherers.collect{|g| [g.user, g.id]} %>
|
2014-04-26 01:24:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :username, "Replace with:" %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.text_field :username %>
|
2014-04-26 01:24:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.submit 'Replace Player' %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2014-04-26 01:24:47 +00:00
|
|
|
<div class="restart">
|
|
|
|
<h3>Start New</h3>
|
|
|
|
<%= form_for Gather.new do |f| %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% f.object.category = @gather.category %>
|
|
|
|
<%= f.hidden_field :category_id %>
|
2014-04-26 01:24:47 +00:00
|
|
|
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.submit "Start New Gather (#{f.object.category})" %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
</div>
|