end问题

This commit is contained in:
huang 2017-03-23 15:10:56 +08:00
parent 77ba9c1958
commit d61e4753cf
1 changed files with 19 additions and 11 deletions

View File

@ -13,11 +13,11 @@
</div>
<div class="content-history-inner" style="height: 100px;">
<% unless @outputs.blank? %>
<% @outputs.each_with_index do |output, index| %>
<% @outputs.each do |output| %>
<div class="<%= output.code == 0 ? 'clearfix history-success mb10' : 'clearfix history-fail mb10' %>">
<span class="<%= output.code == 0 ? 'icon-success fl mr5' : 'icon-fail fl mr5' %>"><%= index + 1 %></span>
<span class="<%= output.code == 0 ? 'icon-success fl mr5' : 'icon-fail fl mr5' %>">2</span>
<p class="fl"><%= output.code == 0 ? '恭喜,您已经完成了本任务!' : '错误结果!' %></p>
<%= link_to "详情", outputs_show_myshixun_game_path(@game, :myshixun_id => @myshixun, :game_output_id => output.id), :class => "fr mr10", :remote => true %>
<%= link_to "详情", outputs_show_myshixun_game_path(@game, :myshixun_id => @myshixun, :game_output_id => output.id), :class => "fr mr10" %>
</div>
<% end %>
<% end %>
@ -31,12 +31,13 @@
</div>
</div>
<div class="content-history-inner">
<% unless @outputs.blank? %>
<% @outputs.each_with_index do |output, index| %>
<div class="<%= output.code == 0 ? 'clearfix history-success mb10' : 'clearfix history-fail mb10' %>">
<span class="<%= output.code == 0 ? 'icon-success fl mr5' : 'icon-fail fl mr5' %>"><%= index + 1%></span>
<p class="fl"><%= output.code == 0 ? '恭喜,您已经完成了本任务!' : '错误结果!' %></p>
<%= link_to "详情", outputs_show_myshixun_game_path(@game, :myshixun_id => @myshixun, :game_output_id => output.id), :class => "fr mr10", :remote => true %>
<!--<! if (results.length != 0) { !>-->
<! for(var i=0;i< results.length; i++) { !>
<! if(results[i][0] == 0){ !>
<div class="clearfix history-success mb10">
<span class="icon-success fl mr5">2</span>
<p class="fl">恭喜,您已经完成了本任务!</p>
<a href="/myshixuns/<%= @myshixun.id %>/games/<%= @game.id %>/outputs_show?game_output_id=<!= results[i][1] !>" class="fr mr10" >详情</a>
</div>
<! }else{ !>
<div class="clearfix history-fail mb10">
@ -54,8 +55,8 @@
<div class="panel-header ">
<h3 >测试输出</h3>
</div>
<div class="content-history-inner" id="game_test_output">
<!=output !>
<div class="content-history-inner">
<!=output !>
</div>
</div>
<div class="col-width fl content-submit ml19 mt15">
@ -63,6 +64,7 @@
<h3 >操作</h3>
</div>
<div class="content-submitbox">
<a href="javascript:void(0)" class="task-btn mb10" onclick="file_edit_submit()">保存修改</a>
<! if(status == 0){ !>
<div id="game_commit">
<a href="javascript:void(0)" class="task-btn task-btn-green" onclick="training_task_submmit();">提交评测</a>
@ -145,4 +147,10 @@
function hide_windows(){
$(".content-half-fix").hide();
}
function file_edit_submit(){
$('#file_update_id').submit();
}
</script>