diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6f7019077..eefcea6ca 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -95,6 +95,20 @@ module ApplicationHelper end end + #重载上面方法,增加样式显示 + def link_to_user_header user,canShowRealName=false,options={} + if user.is_a?(User) + if canShowRealName + name = h(user.realname(options[:format])) + else + name = h(user.name(options[:format])) + end + link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => options[:class] + else + h(user.to_s) + end + end + # Displays a link to +issue+ with its subject. # Examples: # diff --git a/app/views/layouts/_new_header.html.erb b/app/views/layouts/_new_header.html.erb index 24df22c81..a430a8e8f 100644 --- a/app/views/layouts/_new_header.html.erb +++ b/app/views/layouts/_new_header.html.erb @@ -12,24 +12,17 @@
-
-
diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb index 36df7f954..a2d2214b6 100644 --- a/lib/redmine/menu_manager.rb +++ b/lib/redmine/menu_manager.rb @@ -110,7 +110,7 @@ module Redmine menu_items_for(menu, project) do |node| links << render_menu_node(node, project) end - links.empty? ? nil : links.reverse.join("\n").html_safe + links.empty? ? nil : links.join("\n").html_safe end def bootstrap_render_menu(menu, project=nil) @@ -131,7 +131,7 @@ module Redmine else caption, url, selected = extract_node_details(node, project) unless url.to_s.include?( 'code_review') - return content_tag('li',render_single_menu_node(node, caption, url, selected),:class => 'fr') + return content_tag('li',render_single_menu_node(node, caption, url, selected)) end end end