Makes logged-in username in topbar linking to (#2291).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2109 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e93d02d228
commit
0ea3d150e1
|
@ -47,8 +47,8 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
# Display a link to user's account page
|
||||
def link_to_user(user)
|
||||
(user && !user.anonymous?) ? link_to(user, :controller => 'account', :action => 'show', :id => user) : 'Anonymous'
|
||||
def link_to_user(user, options={})
|
||||
(user && !user.anonymous?) ? link_to(user.name(options[:format]), :controller => 'account', :action => 'show', :id => user) : 'Anonymous'
|
||||
end
|
||||
|
||||
def link_to_issue(issue, options={})
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<div id="account">
|
||||
<%= render_menu :account_menu -%>
|
||||
</div>
|
||||
<%= content_tag('div', "#{l(:label_logged_as)} #{User.current.login}", :id => 'loggedas') if User.current.logged? %>
|
||||
<%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}", :id => 'loggedas') if User.current.logged? %>
|
||||
<%= render_menu :top_menu -%>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue