diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ba0a57a95..143045086 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -69,8 +69,12 @@ module ApplicationHelper end - def person_image_link(person) - link_to person_image_tag(person), object_path(person) + def person_image_link(person, opts = {}) + if opts[:to] == :photos + link_to person_image_tag(person), person_photos_path(person) + else + link_to person_image_tag(person), object_path(person) + end end def new_request(request_count) diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index ab936407f..48a4775f7 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -6,10 +6,11 @@ profile .span-4.append-1.last - %h2= @person.real_name + #profile .profile_photo - = person_image_link(@person) + = person_image_link(@person, :to => :photos) + %ul -unless @posts.first.nil? %li @@ -27,20 +28,33 @@ - for aspect in @aspects_with_person %li= link_to aspect.name, aspect + + /should be collapsed, either or, or request friend + - if @person != current_user.person && @contact = link_to t('.remove_friend'), @person, :confirm => t('are_you_sure'), :method => :delete, :class => "button" - - if @person == current_user.person - %b - = link_to t('.edit_my_profile'), edit_person_path(@person) - %br - %br - = link_to t('_photos'), person_photos_path(@person) + /profile junk + #profile_information + %ul + %li + %b bio-epic: + = @person.profile.bio + %li + %b gender: + = @person.profile.gender + %li + %b born: + = "#{time_ago_in_words(@person.profile.birthday)} ago" if @person.profile.birthday + %li + %b= link_to t('.edit_my_profile'), edit_person_path(@person) if @person == current_user.person + + .span-15.last - + = render 'shared/author_info', :person => @person - if @contact || current_user.person == @person - if @posts.count > 0 @@ -72,4 +86,3 @@ %h3 .description = t('.already_requested', :name => @person.real_name) - diff --git a/app/views/shared/_author_info.html.haml b/app/views/shared/_author_info.html.haml index 952af561f..39f91c89d 100644 --- a/app/views/shared/_author_info.html.haml +++ b/app/views/shared/_author_info.html.haml @@ -2,7 +2,7 @@ = person_image_link(person) .from %h2 - = person.real_name + = link_to person.real_name, person_path(person) - if defined?(post) .aspect ➔ @@ -12,5 +12,7 @@ - else - for aspect in current_user.aspects_with_post( post.id ) %li= link_to aspect.name, aspect - - = link_to t('.view_profile'), person_path(person) + #person_nav_links + = link_to t('.view_profile'), person_path(person) + = link_to t('_photos'), person_photos_path(person) + = link_to 'status messages', person_photos_path(person) diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index cc4b98053..e876c178f 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -278,6 +278,10 @@ header :font :weight normal + #person_nav_links + a + :padding + :right 2em .from :font :size 14px @@ -549,6 +553,15 @@ ul.comments :margin 0 :padding 0 + #profile_information + ul + :margin + :top 1em + li + :margin + :bottom 1em + + #stream, #profile, .comments