<% content_for(:secondary_links) do %>
  • <%= link_to "Listing", users_path %>
  • <% if @user && !CurrentUser.is_anonymous? %>
  • |
  • <% if @user.id == CurrentUser.id %>
  • <%= link_to "Settings", edit_user_path(CurrentUser.user) %>
  • <%= link_to "Profile", user_path(CurrentUser.user) %>
  • <%= link_to "Messages (#{CurrentUser.dmails.unread.count})", dmails_path(:search => {:owner_id_eq => CurrentUser.id, :to_id_eq => CurrentUser.id}) %>
  • <% else %>
  • <%= link_to "Send message", new_dmail_path(:dmail => {:to_id => @user.id}) %>
  • <% end %>
  • |
  • <%= link_to "Sign out", session_path, :method => :delete %>
  • <% end %>
    <% end %>