Merge branch 'dev_shixun_project' of https://git.trustie.net/jacknudt/trustieforge into dev_shixun_project
Conflicts: app/views/games/show.html.erb app/views/layouts/base_myshixun.html.erb
This commit is contained in:
commit
e12ce9f090
|
@ -10,9 +10,10 @@ class Myshixun < ActiveRecord::Base
|
|||
def current_task
|
||||
games = self.games
|
||||
current_game = games.select{|game| game.status != 2}
|
||||
if undo_agame.blank?
|
||||
current_game = Game.find_by_sql("SELECT * FROM `games` where myshixun_id=#{self.id} and status = 2 order by stage desc;")
|
||||
if current_game.blank?
|
||||
current_game = Game.where(:status => 2, :myshixun_id => self.id).order("stage desc").first
|
||||
end
|
||||
return current_game
|
||||
end
|
||||
|
||||
def parent
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
<div class="rightbar-header clearfix">
|
||||
<h2 class="rightbar-h2 fl">Helloworld:Java入门实训项目</h2>
|
||||
<a href="javascript:void(0)" class="fr rightbar-pause" id="leave_shixun_page"><i class="fa fa-power-off font-20 mt5"></i><span class="ml10">暂时离开</span></a>
|
||||
<ul class="rightbar-score fr" >
|
||||
<li><i class="fa fa-signal font-14 mr5"></i>排名:<a href="#" class="">123</a></li>
|
||||
<li><i class="fa fa-trophy font-14 mr5"></i>积分:<a href="#" class="">123</a></li>
|
||||
<li><i class="fa fa-clock-o font-14 mr5"></i>耗时:<a href="#" class="">56:00</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="content clearfix" >
|
||||
<div class="alert alert-blue mr15 mt15 ml15" >
|
||||
<button data-dismiss="alert" class="task-close fr" type="button">×</button>
|
||||
|
@ -106,8 +97,4 @@
|
|||
g('tab_con_'+n).className='dis';
|
||||
g('tab_nav_'+n).className='tab_hover';
|
||||
}
|
||||
$("#leave_shixun_page").click(function(){
|
||||
var htmlvalue = "<%= j (render :partial => 'games/leave_tip') %>";
|
||||
pop_box_new(htmlvalue,460,316);
|
||||
});
|
||||
</script>
|
|
@ -9,7 +9,7 @@
|
|||
<%= favicon %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar', 'css/moduel', 'css/font-awesome','css/taskstyle' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common', 'css/font-awesome','css/taskstyle','css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar', 'css/moduel' %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
|
@ -31,16 +31,17 @@
|
|||
<ul>
|
||||
<li class="leftnav-box">
|
||||
<%#= link_to "当前任务" %>
|
||||
<a href="#" class="leftnav-box-inner leftnav-active">
|
||||
<a href="<%= myshixun_game_path(@myshixun.current_task, :myshixun_id => @myshixun) %>" class="leftnav-box-inner leftnav-active">
|
||||
<i class="fa fa-gamepad font-28"></i><br/><span class="font-16">当前任务</span>
|
||||
</a></li>
|
||||
<li class="leftnav-box"><a href="#" class="leftnav-box-inner ">
|
||||
<i class="fa fa-qrcode font-28"></i><br/><span class="font-16">全部任务</span><span class="btn-cir ml5">123</span>
|
||||
<li class="leftnav-box"><a href="<%= myshixun_games_path(@myshixun) %>" class="leftnav-box-inner ">
|
||||
<i class="fa fa-qrcode font-28"></i><br/><span class="font-16">全部任务</span><span class="btn-cir ml5"><%= @myshixun.games.count %></span>
|
||||
</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rightbar">
|
||||
<%= render :partial => "myshixuns/myshixun_top" %>
|
||||
<%= render_flash_messages %>
|
||||
<%= yield %>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<div class="rightbar-header clearfix">
|
||||
<h2 class="rightbar-h2 fl">Helloworld:Java入门实训项目</h2>
|
||||
<a href="#" class=" fr rightbar-pause "><i class="fa fa-power-off font-20 mt5"></i><span class="ml10">暂时离开</span></a>
|
||||
<ul class="rightbar-score fr" >
|
||||
<li><i class="fa fa-signal font-14 mr5"></i>排名:<a href="#" class="">123</a></li>
|
||||
<li><i class="fa fa-trophy font-14 mr5"></i>积分:<a href="#" class="">123</a></li>
|
||||
<li><i class="fa fa-clock-o font-14 mr5"></i>耗时:<a href="#" class="">56:00</a></li>
|
||||
</ul>
|
||||
</div>
|
Loading…
Reference in New Issue