diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index 85d06471e..8c08e7211 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -81,7 +81,7 @@ class PeopleController < ApplicationController @aspect = :profile @stream = Stream::Person.new(current_user, @person, :max_time => max_time) @profile = @person.profile - + @photos = Photo.where(author_id: @profile.id).limit(3).order('created_at desc') unless params[:format] == "json" # hovercard if current_user @block = current_user.blocks.where(:person_id => @person.id).first diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index c70a4a920..f6ca113fb 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -14,7 +14,7 @@ class PhotosController < ApplicationController def index @post_type = :photos @person = Person.find_by_guid(params[:person_id]) - + @photos = Photo.where(author_id: @person.id).limit(3).order('created_at desc') if @person @contact = current_user.contact_for(@person) diff --git a/app/views/people/_profile_sidebar.html.haml b/app/views/people/_profile_sidebar.html.haml index 4821a0965..c76b4f985 100644 --- a/app/views/people/_profile_sidebar.html.haml +++ b/app/views/people/_profile_sidebar.html.haml @@ -44,5 +44,14 @@ =t('.born') = birthday_format(person.birthday) + %li + - unless @photos.blank? + %h4 + = link_to t('_photos'), person_photos_path(person) + - for photo in @photos + = image_tag(photo.url(:thumb_small)) + + + %br %br