Revert "Revert "fixed commenting bug on current user's profile page""

This reverts commit 166202d0b2.
This commit is contained in:
maxwell 2010-12-09 13:57:43 -08:00
parent 5fb782a988
commit b54a72c240
2 changed files with 2 additions and 3 deletions

View file

@ -47,13 +47,12 @@ class PeopleController < ApplicationController
if @person if @person
@profile = @person.profile @profile = @person.profile
@contact = current_user.contact_for(@person) @contact = current_user.contact_for(@person)
@is_contact = @person != current_user.person && @contact
if @contact if @contact
@aspects_with_person = @contact.aspects @aspects_with_person = @contact.aspects
end end
@commenting_disabled = !@contact @commenting_disabled = (current_user.person.id != @person.id) && !@contact
@posts = current_user.posts_from(@person).paginate :page => params[:page] @posts = current_user.posts_from(@person).paginate :page => params[:page]
@post_hashes = hashes_for_posts @posts @post_hashes = hashes_for_posts @posts

View file

@ -17,7 +17,7 @@
= link_to t('_photos'), person_photos_path(@person) = link_to t('_photos'), person_photos_path(@person)
.span-8.append-1.last .span-8.append-1.last
= render :partial => 'people/profile_sidebar', :locals => {:person => @person, :is_contact => @is_contact} = render :partial => 'people/profile_sidebar', :locals => {:person => @person, :is_contact => @contact}
.span-15.last .span-15.last
- unless @contact || current_user.person == @person - unless @contact || current_user.person == @person