add diff url in navigation
This commit is contained in:
parent
0b016e7c11
commit
3f55e78f49
|
@ -65,7 +65,7 @@ module ApplicationHelper
|
|||
if user.is_a?(User)
|
||||
name = h(user.name(options[:format]))
|
||||
if user.active? || (User.current.admin? && user.logged?)
|
||||
link_to name, user_path(user), :class => user.css_classes
|
||||
link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.forge_domain}, :class => user.css_classes
|
||||
else
|
||||
name
|
||||
end
|
||||
|
@ -1500,16 +1500,16 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def render_dynamic_nav
|
||||
home_link = link_to l(:field_homepage), home_path
|
||||
course_all_course_link = link_to l(:label_course_all), {:controller => 'projects', :action => 'course', :project_type => 1}
|
||||
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,}
|
||||
course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher'}
|
||||
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}
|
||||
courses_link = link_to l(:label_course_practice), {: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}
|
||||
contest_link = link_to l(:label_contest_innovate), {:controller => 'bids', :action => 'contest', :project_type => 1, :host=>Setting.contest_domain}
|
||||
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
|
||||
forum_link = link_to l(:label_project_module_forums), {:controller => "forums", :action => "index", :host => Setting.forge_domain}
|
||||
stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index', :host => Setting.forge_domain}
|
||||
|
||||
#@nav_dispaly_project_label
|
||||
nav_list = Array.new
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
<%=link_to_user(User.current)%>
|
||||
<ul class="sub_menu">
|
||||
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
|
||||
<li><%=link_to l(:label_my_course), user_courses_user_path(User.current) %></li>
|
||||
<li><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %></li>
|
||||
<% end -%>
|
||||
<li><%=link_to l(:label_my_projects), user_projects_user_path(User.current) %></li>
|
||||
<li><%=link_to l(:label_user_edit), my_account_path %></li>
|
||||
<li><%=link_to l(:label_my_projects),{:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %></li>
|
||||
<li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.forge_domain}%></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li style="padding:0 0; margin:0 0;display:inline;border-bottom: 0;">
|
||||
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', { :controller => 'users', :action => 'user_newfeedback', id: User.current.id }, {:class => 'my-message'} if User.current.logged?%>
|
||||
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.forge_domain }, {:class => 'my-message'} if User.current.logged?%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -203,7 +203,7 @@ Redmine::AccessControl.map do |map|
|
|||
end
|
||||
#by young
|
||||
Redmine::MenuManager.map :top_menu do |menu|
|
||||
menu.push :home, :home_path
|
||||
menu.push :home, {:hsot => 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'}
|
||||
|
@ -264,15 +264,15 @@ end
|
|||
# end
|
||||
|
||||
Redmine::MenuManager.map :account_menu do |menu|
|
||||
menu.push :login, :signin_path, :if => Proc.new { !User.current.logged? }
|
||||
menu.push :register, :register_path, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
|
||||
menu.push :login, {:controller => 'account', :action => 'login', :host => Setting.forge_domain}, :if => Proc.new { !User.current.logged? }
|
||||
menu.push :register, {:controller => 'account', :action => 'register', :host => Setting.forge_domain}, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
|
||||
# menu.push :my_account, { :controller => 'my', :action => 'account' }, :if => Proc.new { User.current.logged? }
|
||||
menu.push :logout, :signout_path, :html => {:method => 'post'}, :if => Proc.new { User.current.logged? }
|
||||
menu.push :logout, {:controller => 'account', :action => 'logout', :host => Setting.forge_domain}, :html => {:method => 'post'}, :if => Proc.new { User.current.logged? }
|
||||
end
|
||||
########fq
|
||||
Redmine::MenuManager.map :bid_menu do |menu|
|
||||
menu.push :respond, { :controller => 'bids', :action => 'show' }, :caption => :label_user_response
|
||||
menu.push :project, { :controller => 'bids', :action => 'show_project' }, :caption => :label_bidding_project
|
||||
menu.push :project, { :controller => 'bids', :action => 'show_project', :host => Setting.project_domain }, :caption => :label_bidding_project
|
||||
# menu.push :result, { :controller => 'bids', :action => 'show_results' },
|
||||
# :caption => :label_bidding_results,:if => Proc.new{ |p| User.current.id == p }
|
||||
end
|
||||
|
@ -341,29 +341,29 @@ Redmine::MenuManager.map :course_menu do |menu|
|
|||
|
||||
end
|
||||
Redmine::MenuManager.map :user_menu do |menu|
|
||||
menu.push :activity, {:controller => 'users', :action => 'show' }
|
||||
menu.push :user_course, {:controller => 'users', :action => 'user_courses'}
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
|
||||
menu.push :user_course, {:controller => 'users', :action => 'user_courses', :host => Setting.course_domain}
|
||||
#menu.push :user_homework, {:controller => 'users', :action => 'user_homeworks'} by huang
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects'}
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain}
|
||||
# menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'} by huang
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
|
||||
|
||||
end
|
||||
Redmine::MenuManager.map :user_enterprise_menu do |menu|
|
||||
menu.push :activity, {:controller => 'users', :action => 'show' }
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
|
||||
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects'}
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain}
|
||||
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.forge_domain}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
|
||||
|
||||
end
|
||||
Redmine::MenuManager.map :user_menu_self do |menu|
|
||||
menu.push :activity, {:controller => 'users', :action => 'show' }
|
||||
menu.push :user_information, {:controller => 'users', :action => 'info'}
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects'}
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
|
||||
menu.push :user_information, {:controller => 'users', :action => 'info', :host => Setting.forge_domain}
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.forge_domain}
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.forge_domain}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
|
||||
|
||||
end
|
||||
#end
|
||||
|
|
Loading…
Reference in New Issue