% has_commit = has_commit_poll?(poll.id ,User.current)%>
<% poll_name = poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%>
<% if @is_teacher%>
<% if has_commit %>
<%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue"%>
<% else %>
<%= link_to poll_name, poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue" %>
<% end %>
<% if poll.polls_status == 1%>
统计结果
<% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
<%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%>
<% end%>
<% if poll.polls_status == 1 %>
发布问卷
<% elsif poll.polls_status == 2%>
取消发布
<% else%>
发布问卷
<% end%>
<%= link_to(l(:button_delete), poll,:method => :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml5 mr10") %>
<% if poll.polls_status == 1 %>
<%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml5"%>
<% else%>
编辑
<% end%>
<% if poll.polls_status == 2 %>
关闭
<% else %>
关闭
<% end%>
<% if poll.polls_status == 1%>
导出
<% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
<%= link_to "导出", export_poll_poll_path(poll.id,:format => "xls"), :class => "polls_de fr ml5"%>
<% end%>
<%= format_date poll.created_at.to_date%>
<% else%>
<% if poll.polls_status == 2%>
<% if has_commit%>
<%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_st fl c_dblue" %>
已答
<%else%>
<%= link_to poll_name, poll_path(poll.id), :class => "polls_title polls_title_st fl c_dblue"%>
<%end%>
<% end%>
<%= format_date poll.created_at.to_date%>
<% if poll.show_result == 1 %>
<% if has_commit%>
<%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fr mr10"%>
<%else%>
统计结果
<%end%>
<% end %>
<% end%>