From 05e50ea5912d827967c5be0ef8b90c8045f1d065 Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 16 Oct 2011 02:04:34 -0400 Subject: [PATCH] user nav links --- app/views/users/_secondary_links.html.erb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/users/_secondary_links.html.erb b/app/views/users/_secondary_links.html.erb index da6a714c7..72b809819 100644 --- a/app/views/users/_secondary_links.html.erb +++ b/app/views/users/_secondary_links.html.erb @@ -1,14 +1,15 @@ <% content_for(:secondary_links) do %>
  • <%= link_to "Listing", users_path %>
  • - <% unless CurrentUser.is_anonymous? %> - <% if @user %> + <% 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) %>
  • + <% else %>
  • <%= link_to "Send message", new_dmail_path(:dmail => {:to_id => @user.id}) %>
  • <% end %>
  • |
  • -
  • <%= link_to "My settings", edit_user_path(CurrentUser.user) %>
  • -
  • <%= link_to "My profile", user_path(CurrentUser.user) %>
  • -
  • |
  • <%= link_to "Sign out", session_path, :method => :delete %>
  • <% end %>