|
|
|
@ -1498,5 +1498,33 @@ module ApplicationHelper
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def render_dynamic_nav
|
|
|
|
|
home_link = link_to l(:field_homepage), home_path
|
|
|
|
|
courses_link = link_to l(:label_course_practice), {:controller => 'projects', :action => 'course', :project_type => 1}
|
|
|
|
|
projects_link = link_to l(:label_project_deposit), {:controller => 'projects', :action => 'index', :project_type => 0}
|
|
|
|
|
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}
|
|
|
|
|
bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'}
|
|
|
|
|
forum_link = link_to l(:label_project_module_forums), forums_path
|
|
|
|
|
stores_link = link_to l(:label_stores_index), stores_path
|
|
|
|
|
|
|
|
|
|
#@nav_dispaly_project_label
|
|
|
|
|
nav_list = Array.new
|
|
|
|
|
nav_list.push(home_link)
|
|
|
|
|
nav_list.push(courses_link) if @nav_dispaly_course_label
|
|
|
|
|
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
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
content_li = ''
|
|
|
|
|
nav_list.collect do |nav_item|
|
|
|
|
|
content_li << content_tag(:li, nav_item)
|
|
|
|
|
end
|
|
|
|
|
content_tag :ul, content_li.html_safe
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|