Patch #2291 ยป loggedon_username_linking_to_profile-r2099.diff
| app/controllers/my_controller.rb (working copy) | ||
|---|---|---|
|
@notification_option = @user.mail_notification? ? 'all' : (@user.notified_projects_ids.empty? ? 'none' : 'selected')
|
||
|
end
|
||
|
def show_account
|
||
|
@user = User.current
|
||
|
redirect_to :controller => 'account', :action => 'show', :id => @user.id
|
||
|
end
|
||
|
# Manage user's password
|
||
|
def password
|
||
|
@user = User.current
|
||
| app/views/layouts/base.rhtml (working copy) | ||
|---|---|---|
|
<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.current.login, show_my_account_path}", :id => 'loggedas') if User.current.logged? %>
|
||
|
<%= render_menu :top_menu -%>
|
||
|
</div>
|
||
|
|
||
| config/routes.rb (working copy) | ||
|---|---|---|
|
map.home '', :controller => 'welcome'
|
||
|
map.signin 'login', :controller => 'account', :action => 'login'
|
||
|
map.signout 'logout', :controller => 'account', :action => 'logout'
|
||
|
map.show_my_account 'my/account/show', :controller => 'my', :action => 'show_account'
|
||
|
|
||
|
map.connect 'wiki/:id/:page/:action', :controller => 'wiki', :page => nil
|
||
|
map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
|
||