Sha256: e0df81e8878629792285f0a1a54187c21a57ff47cb31f12e60bf342b41ad1c0d

Contents?: true

Size: 1.62 KB

Versions: 19

Compression:

Stored size: 1.62 KB

Contents

<% show_header = defined?(show_header) ? show_header : true %>
<% if show_header %>
<h1>Possibility Report</h1>
<ul>
<li>Total games played: <%= pool.tournament_entry.picks.games_played %></li>
<li>Pool Tie Break: <%=pool.tournament_entry.tie_breaker || '-' %></li>
<li>Number of entries: <%=pool.entries.size%></li>
<li>Number of remaining outcomes: <%=pool.tournament_entry.picks.number_of_outcomes%></li>
</ul>
<% end %>
<% if @message %>
<span class="message"><%=@message%></span>
<% end %>
<table class="report">
<thead>
<tr>
<td>Entry</td>
<td>Chance<br/>for 1st</td>
<td>Highest<br/>Place</td>
<td>Current<br/>Score</td>
<td>Max<br/>Score</td>
<td>Tie<br/>Break</td>
<td>Champions for 1st</td>
</tr>
</thead>
<tbody>
<% db_entry_ids = @pool.user_entries.inject({}) {|h,e| h[e.name] = e.id; h} %>
<% @stats.each do |stat| -%>
<tr class="<%=cycle('even', 'odd', :name => 'rtclass')%>">
<td><%= link_to stat.entry.name, :controller => 'entry', :action => 'show', :id => db_entry_ids[stat.entry.name]%></td>
<td><%="%5.2f" % (stat.times_champ * 100.0/pool.tournament_entry.picks.number_of_outcomes)%>%</td>
<td><%=stat.min_rank.ordinal%></td>
<td><%=stat.entry.bracket.score_against(pool.tournament_entry.picks, pool.scoring_strategy)%></td>
<td><%=stat.max_score%></td>
<td><%=stat.entry.tie_breaker%></td>
<td>
<% if stat.champs.size > 0 %>
<a class="info" href="#">Detail
<span class="flow">
<% stat.champs.sort_by{|k,v| -v}.each do |team, occurrences| -%>
<nobr><%=team%> <%=occurrences%> (<%="%5.2f" % (occurrences.to_f * 100.0 / stat.times_champ)%>%)</nobr>
<br/>
<% end -%>
</span>
</a>
<% end -%>
&nbsp;
</td>
</tr>
<% end -%>
</tbody>
</table>

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
tournament-4.0.2 webgui/app/views/reports/_possibility.html.erb
tournament-4.0.0 webgui/app/views/reports/_possibility.html.erb
tournament-3.3.3 webgui/app/views/reports/_possibility.html.erb
tournament-3.3.2 webgui/app/views/reports/_possibility.html.erb
tournament-3.3.1 webgui/app/views/reports/_possibility.html.erb
tournament-3.3.0 webgui/app/views/reports/_possibility.html.erb
tournament-3.2.2 webgui/app/views/reports/_possibility.html.erb
tournament-3.2.1 webgui/app/views/reports/_possibility.html.erb
tournament-3.2.0 webgui/app/views/reports/_possibility.html.erb
tournament-3.1.1 webgui/app/views/reports/_possibility.html.erb
tournament-3.1.0 webgui/app/views/reports/_possibility.html.erb
tournament-3.0.3 webgui/app/views/reports/_possibility.html.erb
tournament-3.0.2 webgui/app/views/reports/_possibility.html.erb
tournament-3.0.1 webgui/app/views/reports/_possibility.html.erb
tournament-3.0.0 webgui/app/views/reports/_possibility.html.erb
tournament-2.5.0 webgui/app/views/reports/_possibility.html.erb
tournament-2.6.0 webgui/app/views/reports/_possibility.html.erb
tournament-2.5.2 webgui/app/views/reports/_possibility.html.erb
tournament-2.5.1 webgui/app/views/reports/_possibility.html.erb