fix the user.trustie.net
This commit is contained in:
parent
e4939bca2c
commit
5d77381bb9
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
class WelcomeController < ApplicationController
|
class WelcomeController < ApplicationController
|
||||||
caches_action :robots
|
caches_action :robots
|
||||||
before_filter :entry_select_course, :entry_select_contest, :only => [:index]
|
before_filter :entry_select_course, :entry_select_contest, :entry_select_user, :only => [:index]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
# @news = News.latest User.current
|
# @news = News.latest User.current
|
||||||
|
@ -124,4 +124,11 @@ class WelcomeController < ApplicationController
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def entry_select_user
|
||||||
|
if request.original_url.match(/user\.trustie\.net/)
|
||||||
|
redirect_to(:controller => "users", :action => "index")
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,43 +1,32 @@
|
||||||
<%
|
<%
|
||||||
request.headers['REQUEST_URI'] = "" if request.headers['REQUEST_URI'].nil?
|
request.headers['REQUEST_URI'] = "" if request.headers['REQUEST_URI'].nil?
|
||||||
realUrl = request.original_url
|
realUrl = request.original_url
|
||||||
if (realUrl.match(/project\/course/))
|
if (realUrl.match(/users/))
|
||||||
@nav_dispaly_course_label = 1
|
|
||||||
elsif (realUrl.match(/users/))
|
|
||||||
@nav_dispaly_home_path_label = 1
|
@nav_dispaly_home_path_label = 1
|
||||||
@nav_dispaly_main_course_label = 1
|
@nav_dispaly_main_course_label = 1
|
||||||
@nav_dispaly_main_project_label = 1
|
@nav_dispaly_main_project_label = 1
|
||||||
elsif (realUrl.match(/projects/))
|
|
||||||
@nav_dispaly_project_label = 1
|
|
||||||
elsif (realUrl.match(/contest/))
|
elsif (realUrl.match(/contest/))
|
||||||
@nav_dispaly_contest_label = 1
|
@nav_dispaly_contest_label = 1
|
||||||
elsif (realUrl.match(/calls/))
|
elsif (realUrl.match(/calls/))
|
||||||
|
@nav_dispaly_home_path_label = 1
|
||||||
@nav_dispaly_bid_label = 1
|
@nav_dispaly_bid_label = 1
|
||||||
elsif (realUrl.match(/forums/))
|
elsif (realUrl.match(/forums/))
|
||||||
@nav_dispaly_forum_label = 1
|
@nav_dispaly_forum_label = 1
|
||||||
elsif (realUrl.match(/[^forge]\/course[^\.]/))
|
elsif (realUrl.match(/forge\.trustie\.net\/*/))
|
||||||
@nav_dispaly_course_label = 1
|
|
||||||
@nav_dispaly_project_label = 1
|
@nav_dispaly_project_label = 1
|
||||||
@nav_dispaly_contest_label = 1
|
@nav_dispaly_forum_label = 1
|
||||||
elsif (realUrl.match(/course\.trustie\.net/))
|
elsif (realUrl.match(/course\.trustie\.net\/*/))
|
||||||
@nav_dispaly_course_all_label = 1
|
@nav_dispaly_course_all_label = 1
|
||||||
@nav_dispaly_forum_label = 1
|
@nav_dispaly_forum_label = 1
|
||||||
@nav_dispaly_store_all_label = 1
|
@nav_dispaly_store_all_label = 1
|
||||||
elsif (realUrl.match(/user\.trustie\.net/))
|
elsif (realUrl.match(/user\.trustie\.net\/*/))
|
||||||
@nav_dispaly_home_path_label = 1
|
@nav_dispaly_home_path_label = 1
|
||||||
@nav_dispaly_course_all_label = 1
|
@nav_dispaly_main_course_label = 1
|
||||||
@nav_dispaly_project_label = 1
|
@nav_dispaly_main_project_label = 1
|
||||||
elsif (realUrl.match(/forge\.trustie\.net/))
|
|
||||||
@nav_dispaly_project_label = 1
|
|
||||||
@nav_dispaly_user_label = 1
|
|
||||||
@nav_dispaly_forum_label = 1
|
|
||||||
else
|
else
|
||||||
@nav_dispaly_course_label = 1
|
@nav_dispaly_home_path_label = 1
|
||||||
@nav_dispaly_project_label = 1
|
@nav_dispaly_main_course_label = 1
|
||||||
@nav_dispaly_user_label = 1
|
@nav_dispaly_main_project_label = 1
|
||||||
@nav_dispaly_contest_label = 1
|
|
||||||
@nav_dispaly_bid_label = 1
|
|
||||||
@nav_dispaly_forum_label = 1
|
|
||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
<div id="top-menu" style="background-color: #15bccf;height:40px;margin-top: 10px;margin-bottom: 10px;">
|
<div id="top-menu" style="background-color: #15bccf;height:40px;margin-top: 10px;margin-bottom: 10px;">
|
||||||
|
|
Loading…
Reference in New Issue