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

27 lines
1.5 KiB
Plaintext
Raw Normal View History

2016-10-27 10:12:50 +08:00
<% poll.poll_questions.each do |poll_question|%>
<div id="poll_questions_<%= poll_question.id%>">
<div id="show_poll_questions_<%= poll_question.id %>">
<% if poll_question.question_type == 1%>
<%= render :partial => 'show_MC', :locals => {:poll_question => poll_question} %>
<% elsif poll_question.question_type == 2%>
<%= render :partial => 'show_MCQ', :locals => {:poll_question => poll_question} %>
<% elsif poll_question.question_type == 3%>
<%= render :partial => 'show_single', :locals => {:poll_question => poll_question} %>
2016-10-27 10:55:12 +08:00
<% elsif poll_question.question_type == 4%>
<%= render :partial => 'show_mulit', :locals => {:poll_question => poll_question} %>
2016-10-27 10:12:50 +08:00
<% end%>
</div>
2016-10-27 10:12:50 +08:00
<div id="edit_poll_questions_<%= poll_question.id %>" style="display: none;">
<% if poll_question.question_type == 1%>
<%= render :partial => 'edit_MC', :locals => {:poll_question => poll_question} %>
<% elsif poll_question.question_type == 2%>
<%= render :partial => 'edit_MCQ', :locals => {:poll_question => poll_question} %>
<% elsif poll_question.question_type == 3%>
<%= render :partial => 'edit_single', :locals => {:poll_question => poll_question} %>
2016-10-27 10:55:12 +08:00
<% elsif poll_question.question_type == 4%>
<%= render :partial => 'edit_mulit', :locals => {:poll_question => poll_question} %>
2016-10-27 10:12:50 +08:00
<% end%>
2016-10-11 08:51:00 +08:00
</div>
2016-10-27 10:12:50 +08:00
</div>
<% end %>