From eeb132d82553408998585641f4d585d4f9444b4f Mon Sep 17 00:00:00 2001 From: Arnaud Delcasse Date: Mon, 20 Sep 2010 03:26:19 +0800 Subject: [PATCH] Writing "Already friends" instead of proposing to add people that we already added successfully or accepted in the search results. --- app/views/people/_person.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/people/_person.html.haml b/app/views/people/_person.html.haml index ef1c69d28..646d0b333 100644 --- a/app/views/people/_person.html.haml +++ b/app/views/people/_person.html.haml @@ -2,7 +2,6 @@ -# licensed under the Affero General Public License version 3. See -# the COPYRIGHT file. - %li.message{:id => person.id} = person_image_link(person) @@ -17,6 +16,8 @@ .right{ :style => "display:inline;top:0;" } - if person.id == current_user.person.id thats you! + - elsif current_user.friends.include?(person) + Already friends - elsif current_user.pending_requests.find_by_person_id(person.id) = link_to "pending request", aspects_manage_path - else