for adjust test domain and give a setting reposwq
This commit is contained in:
parent
b4bf320c2e
commit
25ee1d8672
|
@ -116,13 +116,13 @@ class WelcomeController < ApplicationController
|
||||||
|
|
||||||
# 判断网站的入口,是课程 course 则跳过index去渲染 course 方法
|
# 判断网站的入口,是课程 course 则跳过index去渲染 course 方法
|
||||||
def entry_select_course
|
def entry_select_course
|
||||||
if request.original_url.match(/course\.trustie\.net/)
|
if request.original_url.match(/.*course\.trustie\.net/)
|
||||||
(course() and render :course and return 0)
|
(course() and render :course and return 0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def entry_select_contest
|
def entry_select_contest
|
||||||
if request.original_url.match(/contest\.trustie\.net/)
|
if request.original_url.match(/.*contest\.trustie\.net/)
|
||||||
contest
|
contest
|
||||||
render :contest
|
render :contest
|
||||||
return 0
|
return 0
|
||||||
|
@ -130,7 +130,7 @@ class WelcomeController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def entry_select_user
|
def entry_select_user
|
||||||
if request.original_url.match(/user\.trustie\.net$/)
|
if request.original_url.match(/.*user\.trustie\.net$/)
|
||||||
redirect_to(:controller => "users", :action => "index")
|
redirect_to(:controller => "users", :action => "index")
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
module RepositoriesHelper
|
module RepositoriesHelper
|
||||||
ROOT_PATH="/home/pdl/redmine-2.3.2-0/apache2/"
|
ROOT_PATH="/home/pdl/redmine-2.3.2-0/apache2/"
|
||||||
PROJECT_PATH_CUT = 40
|
PROJECT_PATH_CUT = 40
|
||||||
REPO_IP_ADDRESS = "repository.trustie.net"
|
REPO_IP_ADDRESS = Setting.repository_domain
|
||||||
|
|
||||||
def format_revision(revision)
|
def format_revision(revision)
|
||||||
if revision.respond_to? :format_identifier
|
if revision.respond_to? :format_identifier
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
<%
|
<%
|
||||||
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(/forge\.trustie\.net\/*/))
|
if (realUrl.match(/.*forge\.trustie\.net\/*/))
|
||||||
@nav_dispaly_project_label = 1
|
@nav_dispaly_project_label = 1
|
||||||
@nav_dispaly_forum_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_course_label = nil
|
@nav_dispaly_course_label = nil
|
||||||
@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_main_course_label = 1
|
@nav_dispaly_main_course_label = 1
|
||||||
@nav_dispaly_main_project_label = 1
|
@nav_dispaly_main_project_label = 1
|
||||||
@nav_dispaly_main_contest_label = 1
|
@nav_dispaly_main_contest_label = 1
|
||||||
elsif (realUrl.match(/contest\.trustie\.net\/*/))
|
elsif (realUrl.match(/.*contest\.trustie\.net\/*/))
|
||||||
@nav_dispaly_contest_label = 1
|
@nav_dispaly_contest_label = 1
|
||||||
@nav_dispaly_store_all_label = 1
|
@nav_dispaly_store_all_label = 1
|
||||||
else
|
else
|
||||||
|
|
|
@ -249,3 +249,5 @@ contest_domain:
|
||||||
default: contest.trustie.net
|
default: contest.trustie.net
|
||||||
course_domain:
|
course_domain:
|
||||||
default: course.trustie.net
|
default: course.trustie.net
|
||||||
|
repository_domain:
|
||||||
|
default: repository.trustie.net
|
||||||
|
|
Loading…
Reference in New Issue