2015-01-13 15:59:02 +08:00
|
|
|
|
<%= stylesheet_link_tag 'polls', :media => 'all' %>
|
2015-01-13 16:58:44 +08:00
|
|
|
|
<div class="polls_content" id="polls" style="width:677px;">
|
2015-01-12 17:25:48 +08:00
|
|
|
|
<div class="polls_head">
|
|
|
|
|
<h2>所有问卷
|
2015-01-13 11:54:07 +08:00
|
|
|
|
<span>(<%= @obj_count%>)</span>
|
2015-01-12 17:25:48 +08:00
|
|
|
|
</h2>
|
2015-01-13 11:54:07 +08:00
|
|
|
|
<% if @is_teacher%>
|
|
|
|
|
<%= link_to l(:label_new_poll), new_poll_path(:polls_type => "Course",:polls_group_id => @course.id), :class => "newbtn" %>
|
|
|
|
|
<% end%>
|
2015-01-12 17:25:48 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="polls_list">
|
|
|
|
|
<% @polls.each do |poll|%>
|
2015-01-17 13:30:50 +08:00
|
|
|
|
<ul id="polls_<%= poll.id %>">
|
|
|
|
|
<li title="<%= poll.polls_name %>">
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<% if has_commit_poll?(poll.id ,User.current) %>
|
|
|
|
|
<sapn class="polls_title fl"> <%= poll.polls_name %></sapn>
|
2015-01-16 10:59:25 +08:00
|
|
|
|
<% else %>
|
2015-01-17 13:30:50 +08:00
|
|
|
|
<%= link_to poll.polls_name, poll_path(poll.id), :class => "polls_title fl" %>
|
2015-01-16 10:59:25 +08:00
|
|
|
|
<% end %>
|
2015-01-17 13:30:50 +08:00
|
|
|
|
<% else %>
|
|
|
|
|
<% if has_commit_poll?(poll.id ,User.current) && poll.polls_status == 2 %>
|
|
|
|
|
<sapn class="polls_title fl" >
|
|
|
|
|
<%= poll.polls_name %>
|
|
|
|
|
</sapn>
|
|
|
|
|
<% 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 %>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<%if @is_teacher && poll.polls_status == 2%>
|
|
|
|
|
<%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%>
|
|
|
|
|
<% end%>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<!--新建状态的问卷可删除-->
|
|
|
|
|
<%= link_to(l(:button_delete), poll,
|
|
|
|
|
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml20 mr10") %>
|
|
|
|
|
<% end%>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<% if @is_teacher && poll.polls_status == 1%>
|
|
|
|
|
<!--新建状态的问卷可编辑-->
|
|
|
|
|
<%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml20"%>
|
|
|
|
|
<% end%>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="polls_date fr">
|
|
|
|
|
<%= format_time poll.created_at%>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
2015-01-12 17:25:48 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% end%>
|
|
|
|
|
|
2015-01-13 11:44:28 +08:00
|
|
|
|
<ul class="wlist">
|
|
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
2015-01-12 17:25:48 +08:00
|
|
|
|
</ul>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div><!--列表end-->
|
|
|
|
|
|
2015-01-13 15:59:02 +08:00
|
|
|
|
</div><!--问卷内容end-->
|