Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop
This commit is contained in:
commit
30eb2d79f2
|
@ -1500,10 +1500,10 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def render_dynamic_nav
|
||||
home_link = link_to l(:field_homepage), "http://"+Setting.forge_domain+":3000"
|
||||
course_all_course_link = link_to l(:label_course_all), {:controller => 'projects', :action => 'course', :project_type => 1,}
|
||||
home_link = link_to l(:field_homepage), {:controller => 'welcome', :action => 'index',:host => Setting.forge_domain}
|
||||
course_all_course_link = link_to l(:label_course_all), {:controller => 'projects', :action => 'course', :project_type => 1}
|
||||
course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher'}
|
||||
courses_link = link_to l(:label_course_practice), {:host=>Setting.course_domain}
|
||||
courses_link = link_to l(:label_course_practice), {:controller => 'projects', :action => 'course', :project_type => 1, :host=>Setting.course_domain}
|
||||
projects_link = link_to l(:label_project_deposit), {:controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}
|
||||
users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index'}
|
||||
contest_link = link_to l(:label_contest_innovate), {:controller => 'bids', :action => 'contest', :project_type => 1, :host=>Setting.contest_domain}
|
||||
|
|
|
@ -162,6 +162,13 @@ class Setting < ActiveRecord::Base
|
|||
logger.info "Settings cache cleared." if logger
|
||||
end
|
||||
|
||||
# fixed domain url in development. tantantan's bug
|
||||
if Rails.env.development?
|
||||
methods.map do |m|
|
||||
define_singleton_method m do; nil; end if m.to_s =~ /([a-zA-Z]+_domain)$/
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
# Returns the Setting instance for the setting named name
|
||||
# (record found in database or new record with default value)
|
||||
|
|
|
@ -203,7 +203,7 @@ Redmine::AccessControl.map do |map|
|
|||
end
|
||||
#by young
|
||||
Redmine::MenuManager.map :top_menu do |menu|
|
||||
menu.push :home, {:hsot => Setting.forge_domain}
|
||||
menu.push :home, {:host => Setting.forge_domain}
|
||||
menu.push :course_practice, {:controller => 'projects', :action => 'course', :project_type => 1}
|
||||
menu.push :project_deposit, { :controller => 'projects', :action => 'index', :project_type => 0}, :caption => :label_project_deposit
|
||||
menu.push :software_user, {:controller => 'users', :action => 'index'}
|
||||
|
|
Loading…
Reference in New Issue