Project

General

Profile

Patch #2291 ยป loggedon_username_linking_to_profile-r2099.diff

Patch based against r2099. - Mischa The Evil, 2008-12-07 06:38

View differences:

app/controllers/my_controller.rb (working copy)
74 74
    @notification_option = @user.mail_notification? ? 'all' : (@user.notified_projects_ids.empty? ? 'none' : 'selected')    
75 75
  end
76 76

  
77
  def show_account
78
    @user = User.current
79
    redirect_to :controller => 'account', :action => 'show', :id => @user.id
80
  end
81

  
77 82
  # Manage user's password
78 83
  def password
79 84
    @user = User.current
app/views/layouts/base.rhtml (working copy)
24 24
    <div id="account">
25 25
        <%= render_menu :account_menu -%>
26 26
    </div>
27
    <%= content_tag('div', "#{l(:label_logged_as)} #{User.current.login}", :id => 'loggedas') if User.current.logged? %>
27
    <%= content_tag('div', "#{l(:label_logged_as)} #{link_to User.current.login, show_my_account_path}", :id => 'loggedas') if User.current.logged? %>
28 28
    <%= render_menu :top_menu -%>
29 29
</div>
30 30
      
config/routes.rb (working copy)
14 14
  map.home '', :controller => 'welcome'
15 15
  map.signin 'login', :controller => 'account', :action => 'login'
16 16
  map.signout 'logout', :controller => 'account', :action => 'logout'
17
  map.show_my_account 'my/account/show', :controller => 'my', :action => 'show_account'
17 18
  
18 19
  map.connect 'wiki/:id/:page/:action', :controller => 'wiki', :page => nil
19 20
  map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
    (1-1/1)