显示问题增加多选、单行文字、多行文字的显示

This commit is contained in:
sw 2015-01-16 14:03:12 +08:00
parent 2954bba411
commit dedb70c56b
1 changed files with 18 additions and 2 deletions

View File

@ -1,10 +1,26 @@
<% poll.poll_questions.each do |poll_question|%> <% poll.poll_questions.each do |poll_question|%>
<div id="poll_questions_<%= poll_question.id%>"> <div id="poll_questions_<%= poll_question.id%>">
<div id="show_poll_questions_<%= poll_question.id %>"> <div id="show_poll_questions_<%= poll_question.id %>">
<%= render :partial => 'show_MC', :locals => {:poll_question => poll_question} %> <% 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} %>
<% elsif poll_question.question_type == 4%>
<%= render :partial => 'show_mulit', :locals => {:poll_question => poll_question} %>
<% end%>
</div> </div>
<div id="edit_poll_questions_<%= poll_question.id %>" style="display: none;"> <div id="edit_poll_questions_<%= poll_question.id %>" style="display: none;">
<%= render :partial => 'edit_MC', :locals => {:poll_question => poll_question} %> <% 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} %>
<% elsif poll_question.question_type == 4%>
<%= render :partial => 'edit_mulit', :locals => {:poll_question => poll_question} %>
<% end%>
</div> </div>
</div> </div>
<% end %> <% end %>