<%= stylesheet_link_tag 'polls', :media => 'all' %>

<%= @poll.polls_name%>

<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
<% mc_question_list = @poll.poll_questions.where("question_type=1") %> <% mcq_question_list = @poll.poll_questions.where("question_type=2") %> <% single_question_list = @poll.poll_questions.where("question_type=3") %> <% multi_question_list = @poll.poll_questions.where("question_type=4") %>
">

单选题

<% mc_question_list.each_with_index do |pq, list_index| %>
<%= l(:label_question_number,:question_number => pq.question_number) %><%= pq.question_title %>
<% pq.poll_answers.each do |pa| %> <% end %>
<% end %>
">

多选题

<% mcq_question_list.each do |pq| %>
<%= l(:label_question_number,:question_number => pq.question_number) %><%= pq.question_title %>
<% pq.poll_answers.each do |pa| %> <% end %>
<% end %>
">

单行主观题

<% single_question_list.each do |pq| %>
<%= l(:label_question_number,:question_number => pq.question_number) %><%= pq.question_title %>
>
<% end %>
">

多行主观题

<% multi_question_list.each do |pq| %>
<%= l(:label_question_number,:question_number => pq.question_number) %><%= pq.question_title %>
<% pq.poll_answers.each_with_index do |pa, i| %>

<%= i + 1 %>.<%= pa.answer_text%>

>
<% end %>
<% end %>
<% if @poll.polls_status == 2 %> <%= link_to l(:button_submit),commit_poll_poll_path(@poll), :method => :post,:class => "BlueCirBtn",:format => 'js',:remote=>true %> <% end %>
<%= l(:label_complete_question) %> <%= format "%.2f" ,@percent %>%