<%= 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 %>
<%= 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 %>
<% elsif pq.question_type == 2 %>
<%= l(:label_question_number, :question_number => pq.question_number) %> <%= pq.question_title %> [多选题] <% if pq.is_necessary == 1 %> * <% end %> <% if pq.min_choices != 0 || pq.max_choices != 0 %>

<% if pq.min_choices != 0 && pq.max_choices != 0 %> 答题时最少选<%=pq.min_choices %>项、最多选<%=pq.max_choices %>项 <% elsif pq.min_choices != 0 %> 答题时最少选<%=pq.min_choices %>项 <% elsif pq.max_choices != 0 %> 答题时最多选<%=pq.max_choices %>项 <% end %>

<% end %>
<% pq.poll_answers.each do |pa| %> <% end %>
<% elsif pq.question_type == 3 %>
<%= l(:label_question_number, :question_number => pq.question_number) %> <%= pq.question_title %> [主观题] <% if pq.is_necessary == 1 %> * <% end %>
<% elsif pq.question_type == 4 %>
<%= l(:label_question_number, :question_number => pq.question_number) %> <%= pq.question_title %> [多行主观题] <% if pq.is_necessary == 1 %> * <% end %>
<% pq.poll_answers.each_with_index do |pa, i| %>

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

>
<% end %>
<% else %> <% end %> <% end %>
<% if @poll.polls_status == 2 %> <%=l(:button_submit) %> <%#= 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 %>%