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

32 lines
1.1 KiB
Plaintext
Raw Normal View History

<% poll_question.poll_answers.each do |pa| %>
<div class="ml20">
<div class="ur_title_result">
<span class="title_index">
<%= pa.answer_position %>
</span>
<%= pa.answer_text %>
</div>
<div class="ur_table_result">
<table border="0" cellspacing="0" cellpadding="0" class="full_width">
<tbody>
<tr class="table_bluebg">
<td class="td_full"><%= l(:label_answer) %> </td>
</tr>
<% poll_question.poll_votes.where("poll_answer_id = #{pa.id}").each do |poll_vote| %>
<tr>
<td class="td_full"><%= poll_vote.vote_text.html_safe %> </td>
</tr>
<% end %>
<tr class="table_bluebg">
<td class="td_full">
<%= l(:label_poll_answer_valid_result) %>
<%= l(:label_answer_total) %>
<%= poll_question.poll_votes.where("poll_answer_id = #{pa.id}").count %>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<% end %>