- <% if @user %>
- Welcome, <%= @user.display_name %> |
- <%= link_to 'account', {:controller => 'user', :action => 'account'}, {:id => 'loginanchor'}%> |
- <%= link_to 'logout', {:controller => 'user', :action => 'logout'}, {:id => 'loginanchor'}%>
+ <% if @user and @user.id %>
+ Welcome, <%= link_to @user.display_name, {:controller => 'user', :action => 'view', :display_name => @user.display_name}%> |
+ <% @inbox_weight = 'bold' if @user.new_messages.size > 0 %>
+ <%= yield :greeting %>
+ <%= link_to "inbox (#{@user.new_messages.size})", {:controller => 'message', :action => 'inbox', :display_name => @user.display_name}, {:style => "font-weight: #{@inbox_weight};" } %> |
+ <%= link_to 'logout', {:controller => 'user', :action => 'logout', :referer => request.request_uri}, {:id => 'logoutanchor'}%>