Pool Administration

<% form_for 'pool', @pool, :url => {:controller => 'admin', :action => 'pool', :id => @pool.id} do |f| -%>
Number of submitted entries<%=@pool.user_entries.size - @pool.pending_entries.size%>
Number of pending entries<%=@pool.pending_entries.size%>
<%=f.label 'name'%> <%=f.text_field 'name', :size => 40, :maxlength => 128%>
<%=f.label 'starts_at'%> <%=f.datetime_select 'starts_at'%>
<%=f.label 'active'%> <%=f.check_box 'active'%>
<%=f.label 'fee'%> $<%=f.text_field 'fee', :size => 5, :maxlength => 3%>
<%=f.label 'scoring_strategy'%> <% @available_scoring_strategies.each do |s| -%> <%=f.radio_button 'scoring_strategy', s.class.name %> <%= s.name %>: <%= s.description%>
<% end -%>
Payouts ? Payouts have a rank, amount and kind. The rank is either a number or the letter L. Rank 1 defines the payout for 1st place, rank 2 for 2nd place and so on. Rank L defines the payout for the last place entry and is optional. The amount of the payout is a number. Its meaning depends on the kind of the payout. If the kind is '%', then the amount is a percentage of the total entry fees collected. If the kind is '$', then the amount is a fixed dollar amount. This lets you have payouts for the pool that give the last place entry the entry fee back. <% @pool.payouts.each_with_index do |po, idx| -%> <% f.fields_for 'payouts', po do |payout_fields| -%> <% end -%> <% end -%>
RankAmountKindDelete?
<%= payout_fields.text_field 'rank', :size => 2, :maxlength => 5, :index => idx%> <%= payout_fields.text_field 'payout', :size => 5, :maxlength => 10, :index => idx%> <%= payout_fields.select 'kind', ['%', '$'], {}, :index => idx%> <%= payout_fields.check_box :_delete, :index => idx %>
<%= submit_tag 'Save'%> <% end -%>