making profile not look so bad

This commit is contained in:
maxwell 2010-11-05 00:54:09 -07:00
parent c816a1f78e
commit 997f9ad8d0
4 changed files with 47 additions and 15 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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