所有问卷
(<%= @obj_count%>)
<% if @is_teacher%>
<%= link_to l(:label_new_poll), new_poll_path(:polls_type => "Course",:polls_group_id => @course.id), :class => "newbtn" %>
<% end%>
<% @polls.each do |poll|%>
<% unless !@is_teacher && poll.polls_status != 2 %>
-
<% if @is_teacher %>
<% if has_commit_poll?(poll.id ,User.current) %>
<%= poll.polls_name %>
<% else %>
<%= link_to poll.polls_name, poll_path(poll.id), :class => "polls_title fl" %>
<% end %>
<% else %>
<% if has_commit_poll?(poll.id ,User.current) && poll.polls_status == 2 %>
<%= poll.polls_name %>
<% elsif (!has_commit_poll?(poll.id ,User.current)) && poll.polls_status == 2 %>
<%= link_to poll.polls_name, poll_path(poll.id), :class => "polls_title fl" %>
<% end %>
<% end %>
-
<%if @is_teacher%>
<%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%>
<% end%>
-
<% if @is_teacher && poll.polls_status == 1 #新建状态的问卷可删除%>
<%= link_to(l(:button_delete), poll,
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml20 mr10") %>
<% end%>
-
<% if @is_teacher && poll.polls_status == 1 #新建状态的问卷可编辑%>
<%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml20"%>
<% end%>
-
<%= format_time poll.created_at%>
<% end %>
<% end%>
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>