socialforge/app/views/training_tasks/_action_status.html.erb

25 lines
1.0 KiB
Plaintext

<%# activity = activity.nil? ? local_assigns[:activity] : activity %>
<div class="mb10">
<% if activity.status == 1 %>
<span class="task-display-span b_dgrey mt10">本任务已通过测评,处于关闭状态。</span>
<% elsif activity.status == 2 %>
<span class="task-display-span alert-blue mt10">当前任务正在后台测评中,稍后将显示您的任务完成情况......</span>
<% else %>
<% if User.current.member_of?(@project) && @project.is_child_training_project? %>
<div id="training_tasl_commit">
<%= link_to "提交评测", task_execute_project_path(@project, :training_task_id => activity.id), :class => "task-display-span bBlue mt10", :onclick => "training_task_submmit();", :remote => true %>
</div>
<% end %>
<% end %>
</div>
<script>
function training_task_submmit(){
$("#training_tasl_commit").html("<span class='task-display-span alert-blue mt10'>当前任务正在后台测评中,稍后将显示您的任务完成情况......</span>")
}
</script>