2015-01-13 15:59:02 +08:00
|
|
|
|
<%= stylesheet_link_tag 'polls', :media => 'all' %>
|
2015-01-20 16:50:16 +08:00
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
function republish_poll(poll_id)
|
|
|
|
|
{
|
|
|
|
|
$('#ajax-modal').html("<div id='popbox02'>" +
|
|
|
|
|
"<div class='upload_con'>" +
|
|
|
|
|
"<div class='upload_box'>" +
|
|
|
|
|
"<p class='polls_box_p'>取消发布后问卷统计结果将会被清空<br />是否确定取消发布该问卷?</p>" +
|
|
|
|
|
"<div class='polls_btn_box'>" +
|
|
|
|
|
"<a href='/poll/"+ poll_id +"/republish_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
|
|
|
|
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
|
|
|
|
"</div>" +
|
|
|
|
|
"<div class='cl'></div>" +
|
|
|
|
|
"</div>" +
|
|
|
|
|
"</div>" +
|
|
|
|
|
"</div>");
|
|
|
|
|
showModal('ajax-modal', '310px');
|
2015-01-23 09:31:30 +08:00
|
|
|
|
$('#ajax-modal').css('height','115px');
|
2015-01-20 16:50:16 +08:00
|
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
|
|
|
|
"<a onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
|
|
|
|
$('#ajax-modal').parent().removeClass("alert_praise");
|
|
|
|
|
$('#ajax-modal').parent().css("top","").css("left","");
|
|
|
|
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function clickCanel(){hideModal("#popbox02");}
|
2015-01-21 11:14:01 +08:00
|
|
|
|
|
|
|
|
|
function poll_submit(poll_id)
|
|
|
|
|
{
|
|
|
|
|
$('#ajax-modal').html("<div id='popbox02'>" +
|
|
|
|
|
"<div class='upload_con'>" +
|
|
|
|
|
"<div class='upload_box'>" +
|
|
|
|
|
"<p class='polls_box_p'>问卷发布后将不能对问卷进行修改,<br />是否确定发布该问卷?</p>" +
|
|
|
|
|
"<div class='polls_btn_box'>" +
|
|
|
|
|
"<a href='/poll/"+ poll_id +"/publish_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
|
|
|
|
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
|
|
|
|
"</div>" +
|
|
|
|
|
"<div class='cl'></div>" +
|
|
|
|
|
"</div>" +
|
|
|
|
|
"</div>" +
|
|
|
|
|
"</div>");
|
|
|
|
|
showModal('ajax-modal', '310px');
|
2015-01-23 09:31:30 +08:00
|
|
|
|
$('#ajax-modal').css('height','115px');
|
2015-01-21 11:14:01 +08:00
|
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
|
|
|
|
"<a href='#' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
|
|
|
|
$('#ajax-modal').parent().removeClass("alert_praise");
|
|
|
|
|
$('#ajax-modal').parent().css("top","").css("left","");
|
|
|
|
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
|
|
|
|
}
|
2015-01-20 16:50:16 +08:00
|
|
|
|
</script>
|
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 %>">
|
2015-01-20 11:42:28 +08:00
|
|
|
|
<%= render :partial => 'poll', :locals => {:poll => poll} %>
|
2015-01-17 13:30:50 +08:00
|
|
|
|
</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-->
|