Unfortunately this feature wasn't properly reviewed and tested, and it
had many bugs, some of them critical and hard to fix, like validations
being skipped in concurrent requests.
So we're removing it before releasing version 1.1. We might add it back
in the future if we manage to solve the critical issues.
This commit reverts commit 836f9ba7.
50 lines
1.8 KiB
Plaintext
50 lines
1.8 KiB
Plaintext
<% provide :title do %><%= @poll.name %><% end %>
|
|
|
|
<div class="polls-results-stats">
|
|
<%= render "poll_header" %>
|
|
|
|
<%= render "poll_subnav" %>
|
|
|
|
<div class="row margin" data-equalizer data-equalize-on="medium">
|
|
<div class="small-12 medium-3 column sidebar" data-equalizer-watch>
|
|
<p><strong><%= t("polls.show.results.title") %></strong></p>
|
|
<ul class="menu vertical">
|
|
<%- @poll.questions.each do |question| %>
|
|
<li><%= link_to question.title, "##{question.title.parameterize}" %></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="small-12 medium-9 column" data-equalizer-watch>
|
|
<%- @poll.questions.each do |question| %>
|
|
<% most_voted_answer_id = question.most_voted_answer_id %>
|
|
<h3 id="<%= question.title.parameterize %>"><%= question.title %></h3>
|
|
<table id="question_<%= question.id %>_results_table">
|
|
<thead>
|
|
<tr>
|
|
<%- question.question_answers.each do |answer| %>
|
|
<th scope="col" <%= answer.id == most_voted_answer_id ? "class=win" : "" %>>
|
|
<% if answer.id == most_voted_answer_id %>
|
|
<span class="show-for-sr"><%= t("polls.show.results.most_voted_answer") %></span>
|
|
<% end %>
|
|
<%= answer.title %>
|
|
</th>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<%- question.question_answers.each do |answer| %>
|
|
<td id="answer_<%= answer.id %>_result" <%= answer.id == most_voted_answer_id ? "class=win" : "" %>>
|
|
<%= answer.total_votes %>
|
|
(<%= answer.total_votes_percentage.round(2) %>%)
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|