css加载顺序 路由链接

This commit is contained in:
huang 2017-03-16 14:40:55 +08:00
parent 471f37b3d4
commit 3e870f115b
2 changed files with 7 additions and 9 deletions

View File

@ -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

View File

@ -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,14 +31,11 @@
<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>
</a></li>
<li class="leftnav-box"><a href="#" class="leftnav-box-inner ">
<i class="fa fa-comments-o font-28"></i><br/><span class="font-16">讨论区</span><span class="btn-cir ml5">456</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>