Merge branch 'szzh' of http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git into szzh
commit
64c0fc7413
@ -0,0 +1,45 @@
|
||||
<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>
|
||||
<% 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 %>
|
||||
<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>
|
||||
<% if @is_teacher && poll.polls_status == 2%>
|
||||
<a class="polls_de fr ml20" onclick="republish_poll(<%= poll.id%>);">
|
||||
取消发布
|
||||
</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="polls_date fr">
|
||||
<%= format_time poll.created_at%>
|
||||
</li>
|
@ -0,0 +1,44 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript">
|
||||
function clickPublishPoll()
|
||||
{
|
||||
hideModal("#popbox02");
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "<%= publish_poll_poll_path(poll.id)%>",
|
||||
data: 'text',
|
||||
success: function (data) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
function clickCanel(){hideModal("#popbox02");}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="popbox02">
|
||||
<div class="upload_con">
|
||||
<div class="upload_box">
|
||||
<p class="polls_box_p">
|
||||
问卷取消发布后学生提交的问卷答案将会被清空,
|
||||
<br />
|
||||
是否确定取消发布该问卷?
|
||||
</p>
|
||||
<div class="polls_btn_box">
|
||||
<%= link_to "确 定",republish_poll_poll_path(poll.id), :class => "upload_btn", :onclick => "clickCanel();" %>
|
||||
<a class="upload_btn upload_btn_grey" onclick="clickCanel();">
|
||||
取 消
|
||||
</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -0,0 +1 @@
|
||||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
Loading…
Reference in new issue