Add photo count
This commit is contained in:
parent
a7bfc542e1
commit
d7e6ec8a4c
2 changed files with 7 additions and 3 deletions
|
|
@ -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')
|
||||
@photos = Photo.where(author_id: @profile.id).order('created_at desc')
|
||||
unless params[:format] == "json" # hovercard
|
||||
if current_user
|
||||
@block = current_user.blocks.where(:person_id => @person.id).first
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
%br
|
||||
%br
|
||||
-if contact.sharing? || person == current_user.person
|
||||
%ul#profile_information
|
||||
%ul#aspect_nav.left_nav
|
||||
|
||||
- unless person.bio.blank?
|
||||
%li
|
||||
%h4
|
||||
|
|
@ -47,7 +48,10 @@
|
|||
- unless @photos.blank?
|
||||
%h4
|
||||
= t('_photos')
|
||||
- for photo in @photos
|
||||
.contact_count
|
||||
= " #{@photos.count}"
|
||||
- @thumbs = @photos.limit(3)
|
||||
- for photo in @thumbs
|
||||
= image_tag(photo.url(:thumb_small))
|
||||
%br
|
||||
= link_to t('layouts.header.view_all'), person_photos_path(person)
|
||||
|
|
|
|||
Loading…
Reference in a new issue