]> projects.mako.cc - selectricity-live/blob - app/views/quickvote/_result.rhtml
The legend is now hidden when there is only one color to display on a graph.
[selectricity-live] / app / views / quickvote / _result.rhtml
1 <div class="winner">
2 <% if result.winner? and result.winners.length == 1%>
3   <p>The winner is:
4      <strong><%=h @candidates[result.winner].name.capitalize %></strong></p>
5 <% elsif result.winner? and result.winners.length > 1 %>
6   <p>There was a tie. The winners are: <strong><%=h( result.winners.collect {|w| @candidates[w].to_s.capitalize}.join(", ") )%></strong></p>
7 <% else %>
8   <p>There is no winner using this method. </strong></p>
9 <% end %>
10 </div>

Benjamin Mako Hill || Want to submit a patch?