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

<%= @poll.polls_name%>

<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
    <% @poll_questions.each do |pq| %> <% if pq.question_type == 1 %>
  1. <%= l(:label_question_number,:question_number => pq.question_number) %> <%= pq.question_title %> [单选题] <% if pq.is_necessary == 1 %> * <% end %>
    <% pq.poll_answers.each do |pa| %> <% end %>
  2. <% elsif pq.question_type == 2 %>
  3. <%= l(:label_question_number,:question_number => pq.question_number) %> <%= pq.question_title %> [多选题] <% if pq.is_necessary == 1 %> * <% end %>
    <% pq.poll_answers.each do |pa| %> <% end %>
  4. <% elsif pq.question_type == 3 %>
  5. <%= l(:label_question_number,:question_number => pq.question_number) %> <%= pq.question_title %> [单行主观] <% if pq.is_necessary == 1 %> * <% end %>
    >
  6. <% elsif pq.question_type == 4 %>
  7. <%= l(:label_question_number,:question_number => pq.question_number) %> <%= pq.question_title %> [多行主观] <% if pq.is_necessary == 1 %> * <% end %>
    " onblur="onblur_<%= pq.id %>(this);"><%= get_anwser_vote_text(pq.id,User.current.id).html_safe %>
  8. <% else %> <% end %> <% end %>
<% if @poll.polls_status == 2 %> <%= link_to l(:button_submit),commit_poll_poll_path(@poll), :method => :post,:class => "ur_button",:format => 'js',:remote=>true %> <% end %>
<%= l(:label_complete_question) %> <%= format "%.2f" ,@percent %>%