dev_aliyun
杨树明 5 years ago
commit bb84bb1080

@ -129,7 +129,8 @@ class Myshixun < ActiveRecord::Base
if current_game.blank?
current_game = Game.find_by_sql("SELECT g.* FROM games g, challenges c where g.myshixun_id=#{self.id} and g.challenge_id = c.id and g.status = 2 order by c.position desc").first
end
return current_game
return current_game.blank? ? games.first : current_game
#
# if self.status == 1
# current_game = Game.find_by_sql("SELECT g.* FROM games g, challenges c where g.myshixun_id=#{self.id} and g.challenge_id = c.id and g.status = 2 order by c.position desc").first

@ -9,12 +9,12 @@
<% if @is_teacher && @is_teacher == 1 %>
<li class="clearfix mb10 none">
<label class="panel-form-label fl">项目邀请码:</label>
<input type="text" style="width: 285px;" class="input-60-40 fl" name="invite_code" value="<%=@project.invite_code %>" placeholder="请输入六位项目邀请码">
<input type="text" style="width: 285px;" class="input-60-40 fl" name="invite_code" value="<%=@project.invite_code %>" placeholder="请输入六位项目邀请码" maxlength="6">
</li>
<% else %>
<li class="clearfix mb10">
<label class="panel-form-label fl">项目邀请码:</label>
<input type="text" style="width: 285px;" class="input-60-40 fl" name="invite_code" placeholder="请输入六位项目邀请码">
<input type="text" style="width: 285px;" class="input-60-40 fl" name="invite_code" placeholder="请输入六位项目邀请码" maxlength="6">
<div class="cl"></div>
</li>
<% end %>

@ -53,7 +53,9 @@
</div>
</div>
</div>
<div class="fr edu-menu-panel" style="height:60px;">
</div>
<div class="fr edu-menu-panel" style="height:60px;">
<%= link_to (image_tag(url_to_avatar(User.current), :width =>"34", :height => "34", :class => "radius mt13", :nhname => "avatar_image", :alt=>"头像", :id => "nh_user_logo")), user_path(User.current),:class => "fl" %>
<ul class="edu-menu-list" style="top:60px;">
<span class="bor-bottom-greyE currentName task-hide"><%= User.current.show_name %></span>
@ -72,8 +74,8 @@
<li><%= link_to '账号管理', my_account_path %></li>
<li class="bor-top-greyE"><%= link_to '退出', signout_path %></li>
</ul>
</div>
<div class="fr head-right mr10">
</div>
<div class="fr head-right mr10">
<a href="javascript:void(0)" id="search-open" class="fl headIcon pointer">
<i class="iconfont icon-sousuo color-white"></i>
</a>
@ -90,14 +92,13 @@
<li><%= link_to '新建项目', new_project_path() %></li>
</ul>
<ul class="fl with50 edu-txt-center">
<li>
<% if User.current.profile_completed? %>
<%= link_to "加入课堂", join_private_courses_path, :remote => true %>
<li><%= link_to "加入课堂", join_private_courses_path, :remote => true %></li>
<li><%= link_to "加入项目", applied_join_project_path, :remote => true %></li>
<% else %>
<%= link_to "加入课堂", 'javascript:void(0)', onclick: 'showUserProfileModal()' %>
<li><%= link_to "加入课堂", 'javascript:void(0)', onclick: 'showUserProfileModal()' %></li>
<li><%= link_to "加入项目", 'javascript:void(0)', onclick: 'showUserProfileModal()' %></li>
<% end %>
</li>
<!-- <li><%#= link_to "加入项目", applied_join_project_path, :remote => true %></li>-->
</ul>
</div>
</div>
@ -118,7 +119,6 @@
</div>
<% end %>
</div>
</div>
</div>
<script>

@ -52,7 +52,9 @@
</div>
</div>
</div>
</div>
<div>
<span class="font-15 fr mt15">
<a href="/login" class="mr5 color-white">登录</a>
<em class="vertical-line"></em>
@ -75,7 +77,7 @@
</ul>
<ul class="fl with50 edu-txt-center">
<li><%= link_to "加入课堂", signin_path %></li>
<!-- <li><%#= link_to "加入项目", applied_join_project_path, :remote => true %></li>-->
<li><%= link_to "加入项目", signin_path %></li>
</ul>
</div>
</div>

@ -351,10 +351,21 @@ class NewHeader extends Component {
</div>
</div>
</Modal>
<a href="/" className={" fl ml25 mr30"}>
<a href="/" className={" fl ml25 mr25"}>
{ImageUrlType===true?<img alt="高校智能化教学与实训平台" className="fl" src={getImageUrl(ImageUrl)} style={{height:'60px'}} />:<img alt="高校智能化教学与实训平台" className="logoimg" src={getImageUrl(ImageUrl)}/>}
</a>
<div className="educontent">
<style>
{
`
.educontents{
margin: 0px auto;
box-sizing: border-box;
}
`
}
</style>
<div className="educontents fl">
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
<div className="head-nav pr">
@ -477,7 +488,7 @@ class NewHeader extends Component {
`
}
</style>
<div style={{display:isLogin===false?'block':'none'}} className={"fr mtf4 mr25"} >
<div style={{display:isLogin===false?'block':'none'}} className={"fr mt15 mr25"} >
<span className="font-15 fr" >
<a href="/login" className="mr5 color-white">登录</a>
<em className="vertical-line"></em>
@ -486,7 +497,7 @@ class NewHeader extends Component {
</div>
<div className="fr head-right mr10 mtf20" >
<div className="fr head-right mr10" >
<a href="javascript:void(0)" id="search-open" className="fl mr30 headIcon">
{/*"/images/educoder/icon/search.svg"
<img src={getImageUrl(`images/educoder/icon/search.svg`)} /> */}
@ -515,9 +526,9 @@ class NewHeader extends Component {
}
</li>
<li>
{/* <li>
<a href="/applied_project/applied_join" data-remote="true">加入项目</a>
</li>
</li> */}
</ul>
</div>
</div>

@ -6,7 +6,7 @@
float: left;
width: 97px;
}
.head-nav{float: left;width: 820px;text-align: center;height: 60px;box-sizing: border-box; min-width: 400px;}
.head-nav{float: left;width: 810px;text-align: center;height: 60px;box-sizing: border-box; min-width: 400px;}
.head-nav ul#header-nav{position: absolute;top: 0px;z-index: 3;height: 60px;box-sizing: border-box;}
.head-nav ul#header-nav li{float: left;height: 60px;line-height: 60px;margin-right: 30px;cursor: pointer;position: relative;font-size: 16px}
.head-nav ul#header-nav li a{display: block;height: 100%;width: 100%;color: #fff}

Loading…
Cancel
Save