diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index 0a6a44dfc..c4ea5c044 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -14,11 +14,9 @@ class PeopleController < ApplicationController def show @person = current_user.visible_person_by_id(params[:id]) @profile = @person.profile - @person_groups = current_user.groups_with_person(@person) - - - @groups_array = current_user.groups.collect{|x| [x.to_s, x.id]} + @groups_with_person = current_user.groups_with_person(@person) + @all_groups = current_user.groups.collect{|x| [x.to_s, x.id]} @posts = Post.where(:person_id => @person.id, :_id.in => current_user.visible_post_ids).paginate :page => params[:page], :order => 'created_at DESC' diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 76fc3acef..df4b94e59 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -13,17 +13,15 @@ -unless @posts.first.nil? %li %i= "last seen: #{how_long_ago(@posts.first)}" - %li - %i= "friends since: #{how_long_ago(@person)}" - %li - ="groups: #{@person_groups}" - = "edit" - = @groups_array.inspect - = form_tag move_person_path - = select :to, :to, @groups_array - = hidden_field_tag :from, :from, :value => @person_groups.first.id - = hidden_field_tag :friend_id, :friend_id, :value => @person.id - = submit_tag "save" + - unless @person == current_user.person + %li + %i= "friends since: #{how_long_ago(@person)}" + %li + = form_tag move_person_path + = select :to, :to, @all_groups + = hidden_field_tag :from, :from, :value => @groups_with_person.first.id + = hidden_field_tag :friend_id, :friend_id, :value => @person.id + = submit_tag "save" %li url: = @person.url