diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index 3e02c579..9ac9f9ab 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -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 diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 884e32a8..92173fc3 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -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| diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 1133f2e5..76e59dcf 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -5,9 +5,8 @@
- + @@ -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" %> diff --git a/config/routes.rb b/config/routes.rb index 3745c502..96be83a4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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'