Merge branch 'develop' into dev_aliyun

dev_aliyun
daiao 5 years ago
commit fff1b432e1

@ -284,14 +284,14 @@ class EcloudController < ApplicationController
self.logged_user = user
user = UserExtensions.where(:user_id => User.current.id).first
if user.gender.nil? || user.school_id.nil? || User.current.lastname.nil?
redirect_to my_account_path
elsif user.identity == 3 && user.school_id.nil?
redirect_to my_account_path
else
redirect_to User.current
end
# if user.gender.nil? || user.school_id.nil? || User.current.lastname.nil?
# redirect_to my_account_path
# elsif user.identity == 3 && user.school_id.nil?
# redirect_to my_account_path
# else
# redirect_to User.current
# end
redirect_to User.current
end

@ -396,7 +396,7 @@ class ManagementsController < ApplicationController
# 搜索镜像
def mirror_search
@scope = []
if params[:q] && params[:q].lstrip.rstrip != ""
if params[:q] && params[:q].strip != ""
@scope = MirrorRepository.where("name like ?", "%#{params[:q]}%").map(&:name)
end
respond_to do |format|

@ -5,9 +5,8 @@
<ul id="header-nav">
<!-- <li class="<%#= params[:controller] == "welcome" ? 'active' : '' %>"><%#= link_to "首页", home_path %></li>-->
<li class="<%= subjects_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "实践课程", subjects_path %></li>
<li class="<%= course_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "翻转课堂", courses_path %></li>
<!-- 精选实训 -->
<li class="pr <%= shixuns_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "实训项目", shixuns_path %><img src="/images/educoder/hot-h.png" class="nav-img" /></li>
<li class="pr <%= shixuns_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "实训项目", shixuns_path %></li>
<li class="<%= course_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "教学课堂", "/classrooms" %></li>
<% careers = Career.published.order("created_at asc") %>
<% if careers.present? %>
@ -49,7 +48,7 @@ display: none; right:110px;">
</ul>
</div>
<div class="seperateLine"></div>
<input type="text" class="search-input fl" id="search-input" name="search_keyword" placeholder="实践课程/翻转课堂/实训项目/交流问答"/>
<input type="text" class="search-input fl" id="search-input" name="search_keyword" placeholder="实践课程/教学课堂/实训项目/交流问答"/>
<a href="javascript:void(0)" class="search-icon fl" id="header_keyword_search">
<i class="iconfont icon-sousuo color-blue mt14 fl"></i>
</a>
@ -59,7 +58,7 @@ display: none; right:110px;">
<%= 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>
<li><%= link_to '我的翻转课堂', user_path(User.current) %></li>
<li><%= link_to '我的教学课堂', user_path(User.current) %></li>
<li><%= link_to '我的实训项目', user_path(User.current, :type => 'a_shixun') %></li>
<li><%= link_to '我的实践课程', user_path(User.current, :type => 'a_path') %></li>
<li><%= link_to '我的开发项目', user_path(User.current, :type => 'a_project') %></li>
@ -83,7 +82,7 @@ display: none; right:110px;">
<div class="overPart"></div>
<ul class="fl with50 edu-txt-center pr ul-leftline">
<% unless User.current.identity == "学生" %>
<li><%= link_to '新建翻转课堂', new_course_path() %></li>
<li><%= link_to '新建教学课堂', "/classrooms" %></li>
<% end %>
<li><%= link_to '新建实训项目', new_shixun_path() %></li>
<li><%= link_to '新建实践课程', new_subject_path() %></li>
@ -91,10 +90,10 @@ display: none; right:110px;">
</ul>
<ul class="fl with50 edu-txt-center">
<% if User.current.profile_completed? %>
<li><%= link_to "加入翻转课堂", join_private_courses_path, :remote => true %></li>
<li><%= link_to "加入教学课堂", join_private_courses_path, :remote => true %></li>
<li><%= link_to "加入开发项目", applied_join_project_path, :remote => true %></li>
<% else %>
<li><%= link_to "加入翻转课堂", 'javascript:void(0)', onclick: 'showUserProfileModal()' %></li>
<li><%= link_to "加入教学课堂", 'javascript:void(0)', onclick: 'showUserProfileModal()' %></li>
<li><%= link_to "加入开发项目", 'javascript:void(0)', onclick: 'showUserProfileModal()' %></li>
<% end %>
</ul>

@ -7,9 +7,8 @@
<ul id="header-nav">
<!-- <li class="<%#= params[:controller] == "welcome" ? 'active' : '' %>"><%#= link_to "首页", home_path %></li>-->
<li class="<%= subjects_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "实践课程", subjects_path %></li>
<li class="<%= course_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "翻转课堂", courses_path %></li>
<li class="pr <%= shixuns_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "实训项目", shixuns_path %><img src="/images/educoder/hot-h.png" class="nav-img" /></li>
<li class="pr <%= shixuns_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "实训项目", shixuns_path %></li>
<li class="<%= course_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "教学课堂", "/classrooms" %></li>
<% careers = Career.published.order("created_at asc") %>
<% if careers.present? %>
@ -47,7 +46,7 @@
</ul>
</div>
<div class="seperateLine"></div>
<input type="text" class="search-input fl" id="search-input" name="search_keyword" placeholder="实践课程/翻转课堂/实训项目/交流问答"/>
<input type="text" class="search-input fl" id="search-input" name="search_keyword" placeholder="实践课程/教学课堂/实训项目/交流问答"/>
<a href="javascript:void(0)" class="search-icon fl" id="header_keyword_search">
<!--<svg class="icon fl mt23" width="20px" height="20px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#333333" d="M463.9 804.4c-194.7 0-353.1-158.4-353.1-353.1S269.2 98.2 463.9 98.2 817 256.6 817 451.3 658.6 804.4 463.9 804.4z m0-651.9c-164.8 0-298.8 134-298.8 298.8s134 298.8 298.8 298.8 298.8-134 298.8-298.8-134-298.8-298.8-298.8zM884.9 926.6c-7.2 0-14.4-2.9-19.8-8.6l-198-210.6c-10.3-10.9-9.7-28.1 1.2-38.4 10.9-10.3 28.1-9.8 38.4 1.2l198 210.6c10.3 10.9 9.7 28.1-1.2 38.4-5.2 5-11.9 7.4-18.6 7.4z" /></svg>-->
<i class="iconfont icon-sousuo color-blue mt14 fl"></i>
@ -76,7 +75,7 @@
<li><%= link_to "新建开发项目", signin_path %></li>
</ul>
<ul class="fl with50 edu-txt-center">
<li><%= link_to "加入翻转课堂", signin_path %></li>
<li><%= link_to "加入教学课堂", signin_path %></li>
<li><%= link_to "加入开发项目", signin_path %></li>
</ul>
</div>

@ -2444,7 +2444,7 @@ RedmineApp::Application.routes.draw do ## oauth相关
# add by nwb
# 课程路由设置
resources :courses do
resources :courses, :path => "classrooms" do
member do
get 'settings', :action => 'settings', :as => 'settings'
get 'teachers'

Loading…
Cancel
Save