导航栏根据配置信息确定是否显示非项目连接
This commit is contained in:
parent
988f8b7918
commit
78b60efbbe
|
@ -1947,6 +1947,8 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def bootstrap_render_dynamic_nav
|
||||
hidden_non_project = Setting.find_by_name("hidden_non_project")
|
||||
visiable = !(hidden_non_project && hidden_non_project.value == "0")
|
||||
|
||||
main_course_link = link_to l(:label_course_practice), {:controller => 'welcome', :action => 'index', :host => Setting.course_domain}
|
||||
main_project_link = link_to l(:label_project_deposit), {:controller => 'welcome', :action => 'index', :host => Setting.project_domain}
|
||||
|
@ -1964,21 +1966,21 @@ module ApplicationHelper
|
|||
|
||||
#@nav_dispaly_project_label
|
||||
nav_list = Array.new
|
||||
nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label && @show_course == 1
|
||||
nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label && @show_course == 1 && visiable
|
||||
# nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label && @show_course == 1
|
||||
nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label && @show_course == 1
|
||||
nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label && @show_course == 1 && visiable
|
||||
|
||||
nav_list.push(main_project_link) if @nav_dispaly_main_project_label
|
||||
nav_list.push(main_course_link) if @nav_dispaly_main_course_label && @show_course == 1
|
||||
nav_list.push(main_contest_link) if @nav_dispaly_main_contest_label && @show_contest == 1
|
||||
nav_list.push(main_course_link) if @nav_dispaly_main_course_label && @show_course == 1 && visiable
|
||||
nav_list.push(main_contest_link) if @nav_dispaly_main_contest_label && @show_contest == 1 && visiable
|
||||
|
||||
nav_list.push(courses_link) if @nav_dispaly_course_label && @show_course == 1
|
||||
nav_list.push(courses_link) if @nav_dispaly_course_label && @show_course == 1 && visiable
|
||||
# nav_list.push(projects_link) if @nav_dispaly_project_label
|
||||
#nav_list.push(users_link) if @nav_dispaly_user_label
|
||||
# nav_list.push(contest_link) if @nav_dispaly_contest_label && @show_contest == 1
|
||||
nav_list.push(bids_link) if @nav_dispaly_bid_label
|
||||
nav_list.push(forum_link) if @nav_dispaly_forum_label
|
||||
nav_list.push(stores_link) if @nav_dispaly_store_all_label
|
||||
nav_list.push(bids_link) if @nav_dispaly_bid_label && visiable
|
||||
nav_list.push(forum_link) if @nav_dispaly_forum_label && visiable
|
||||
nav_list.push(stores_link) if @nav_dispaly_store_all_label && visiable
|
||||
|
||||
content_li = ''
|
||||
nav_list.collect do |nav_item|
|
||||
|
|
Loading…
Reference in New Issue