<% if pool.starts_at < Time.zone.now %>Started<%else%>Starts<%end%>: <%= pool.starts_at.to_formatted_s(:long)%>
Pending Entries: <%= pool.pending_entries.size%>
Total Entries: <%= pool.user_entries.size%>
Last Update: <%=pool.updated_at.to_formatted_s(:long)%>
Entry Fee: $<%=pool.fee%>
Payouts:
<% take = pool.user_entries.size * pool.fee.to_f -
(pool.payouts.inject(0) {|sum, p| sum += p.kind == '$' ? p.payout.to_i : 0}) %>
<% pool.payouts.delete_if{|p| p.kind.blank?}.sort_by {|p| p.rank }.each do |p| -%>
<%=p.rank != 'L' ? p.rank.to_i.ordinal : 'Last'%>: $<%=p.kind == '$' ? p.payout : p.payout.to_f / 100.0 * take%>
<% end -%>
Scoring: <%=pool.pool.scoring_strategy.description%>
<% if current_user -%>
Entries for <%= current_user.login%>: <%= link_to pool.entries_for(current_user).size, :controller => 'entry', :action => 'index', :id => pool.id %>
<% if pool.accepting_entries? -%>
<%= link_to 'Add New Entry', :controller => 'entry', :action => 'new', :id => pool.id %>
<% end -%>
<% else -%>
To enter this pool, please <%= link_to 'login', login_path%> or <%= link_to 'signup', signup_path%>
<% end -%>