socialforge/app/views/poll/_choice_show.html.erb

29 lines
1.2 KiB
Plaintext
Raw Normal View History

2015-01-14 16:36:30 +08:00
<div class="ur_table_result">
2015-01-16 15:49:22 +08:00
<table border="0" cellspacing="0" cellpadding="0" >
<tbody>
<tr class="table_bluebg">
<td class="td327"><%= l(:label_poll_options) %> </td>
<td class="td42"><%= l(:label_poll_subtotal) %> </td>
<td class="td287"><%= l(:label_poll_proportion) %> </td>
</tr>
<% poll_question.poll_answers.each do |poll_answer| %>
<tr>
<td class="td327"><%= poll_answer.answer_text %> </td>
<td class="td42"><%= poll_answer.poll_votes.count %> </td>
<td class="td287">
<div class="Bar">
2015-01-17 14:54:19 +08:00
<span style="width:<%= statistics_result_percentage(poll_answer.poll_votes.count, total_answer(poll_question.id)) %>%;" id="choice_percentage_<%= poll_answer.id %>"></span>
2015-01-16 15:49:22 +08:00
</div>
2015-01-17 14:54:19 +08:00
<%= statistics_result_percentage(poll_answer.poll_votes.count, total_answer(poll_question.id)) %>%</td>
2015-01-16 15:49:22 +08:00
</tr>
<% end %>
<tr class="table_bluebg">
<td class="td327"><%= l(:label_poll_valid_commit) %> </td>
2015-01-17 14:54:19 +08:00
<td class="td42"><%= total_answer(poll_question.id) %></td>
2015-01-16 15:49:22 +08:00
<td class="td287">&nbsp; </td>
</tr>
</tbody>
</table>
</div>
2015-01-14 16:36:30 +08:00