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

37 lines
1.4 KiB
Plaintext
Raw Normal View History

<div>
<div class="testEditTitle">
第<%= poll_question.question_number%>题:
<%= poll_question.question_title %>
<span class="fontBlue">[多选题]</span>
<%if poll_question.is_necessary == 1%>
<span class="ur_required" title="必答">*</span>
<%end%>
<% if poll_question.min_choices != 0 || poll_question.max_choices != 0 %>
<p class="fontGrey2">
<% if poll_question.min_choices != 0 && poll_question.max_choices != 0 %>
答题时最少选<%=poll_question.min_choices %>项、最多选<%=poll_question.max_choices %>项
<% elsif poll_question.min_choices != 0 %>
答题时最少选<%=poll_question.min_choices %>项
<% elsif poll_question.max_choices != 0 %>
答题时最多选<%=poll_question.max_choices %>项
<% end %>
</p>
<% end %>
</div>
<div class="cl"></div>
<div class="ur_inputs">
<table class="ur_table" style="width:675px;">
<tbody>
<% poll_question.poll_votes.where("user_id = #{User.current.id}").each do |answer|%>
<tr>
<td>
2016-10-14 15:29:07 +08:00
<p class="ml20 break_word">
<%= answer.poll_answer.answer_text == "" ? (answer.vote_text.nil? ? "其他" : answer.vote_text) : answer.poll_answer.answer_text %>
</p>
</td>
</tr>
<% end%>
</tbody>
</table>
</div>
</div><!--多选题 end-->