Sha256: 04005ae3f757e8e71b0d1e38a60530c00fc8673d0f73dac2063d7d7c1ed55350

Contents?: true

Size: 1.59 KB

Versions: 1

Compression:

Stored size: 1.59 KB

Contents

<h1>Pool Administration</h1>
<% form_for 'pool', @pool, :url => {:controller => 'admin', :action => 'pool', :id => @pool.id} do |f| -%>
<table border="0" width="100%">
<tr><td>Number of submitted entries</td><td><%=@pool.user_entries.size - @pool.pending_entries.size%></td></tr>
<tr><td>Number of pending entries</td><td><%=@pool.pending_entries.size%></td></tr>
<tr>
<td><%=f.label 'name'%></td>
<td><%=f.text_field 'name', :size => 40, :maxlength => 128%></td>
</tr>
<tr>
<td><%=f.label 'starts_at'%></td>
<td><%=f.date_select 'starts_at'%></td>
</tr>
<tr>
<td><%=f.label 'active'%></td>
<td><%=f.check_box 'active'%></td>
</tr>
<tr>
<td><%=f.label 'fee'%></td>
<td>$<%=f.text_field 'fee', :size => 5, :maxlength => 3%></td>
</tr>
<tr>
<td><%=f.label 'scoring_strategy'%></td>
<td>
<% @available_scoring_strategies.each do |s| -%>
<%=f.radio_button 'scoring_strategy', s.class.name %> <em><%= s.name %></em>: <%= s.description%>
<br/>
<% end -%>
</td>
</tr>
<tr>
<td>
Payouts
</td>
<td>
<table border="0">
<tr><td><b>Rank</b></td><td><b>Amount</b></td><td><b>Kind</b></td><td><b>Delete?</b></td></tr>
<% @pool.payouts.each_with_index do |po, idx| -%>
<% f.fields_for 'payouts', po do |payout_fields| -%>
<tr>
<td><%= payout_fields.text_field 'rank', :size => 2, :maxlength => 5, :index => idx%></td>
<td><%= payout_fields.text_field 'payout', :size => 5, :maxlength => 10, :index => idx%></td>
<td><%= payout_fields.select 'kind', ['%', '$'], {}, :index => idx%></td>
<td><%= payout_fields.check_box :_delete, :index => idx %></td>
</tr>
<% end -%>
<% end -%>
</table>
</td>
</tr>
</table>
<%= submit_tag 'Save'%>
<% end -%>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tournament-2.0.0 webgui/app/views/admin/pool.html.erb