Permalink
Browse files

add bonus points to pool page

  • Loading branch information...
1 parent 0156281 commit a299727ee0ab860ea2cebc68907465a5be723948 @geraldb geraldb committed Jun 24, 2012
Showing with 18 additions and 0 deletions.
  1. +18 −0 app/views/pools/show.html.erb
View
18 app/views/pools/show.html.erb
@@ -38,6 +38,24 @@
<p><%= raw( @pool.welcome_html ) %></p>
+<table width='100%' cellspacing=0>
+ <% @pool.bonus_rounds.each do |round| %>
+ <% round.questions.each do |question| %>
+ <tr>
+ <td colspan='2' style='background-color: lightgrey;'>Bonuspunkte: <%= question.title %></td>
+ </tr>
+ <% question.tips.order('pts desc').each do |tip| %>
+ <% if tip.pts > 0 %>
+ <tr>
+ <td><%= tip.user.name %></td>
+ <td>+<%= tip.pts %> Punkte</td>
+ </tr>
+ <% end %>
+ <% end %><!-- each tip -->
+ <% end %><!-- each question -->
+ <% end %><!-- each round -->
+</table>
+
<table width='100%' cellspacing=0>

0 comments on commit a299727

Please sign in to comment.