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 end
def person_image_link(person) def person_image_link(person, opts = {})
link_to person_image_tag(person), object_path(person) 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 end
def new_request(request_count) def new_request(request_count)

View file

@ -6,10 +6,11 @@
profile profile
.span-4.append-1.last .span-4.append-1.last
%h2= @person.real_name
#profile #profile
.profile_photo .profile_photo
= person_image_link(@person) = person_image_link(@person, :to => :photos)
%ul %ul
-unless @posts.first.nil? -unless @posts.first.nil?
%li %li
@ -27,20 +28,33 @@
- for aspect in @aspects_with_person - for aspect in @aspects_with_person
%li= link_to aspect.name, aspect %li= link_to aspect.name, aspect
/should be collapsed, either or, or request friend
- if @person != current_user.person && @contact - if @person != current_user.person && @contact
= link_to t('.remove_friend'), @person, :confirm => t('are_you_sure'), :method => :delete, :class => "button" = 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 /profile junk
%br #profile_information
= link_to t('_photos'), person_photos_path(@person) %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 .span-15.last
= render 'shared/author_info', :person => @person
- if @contact || current_user.person == @person - if @contact || current_user.person == @person
- if @posts.count > 0 - if @posts.count > 0
@ -72,4 +86,3 @@
%h3 %h3
.description .description
= t('.already_requested', :name => @person.real_name) = t('.already_requested', :name => @person.real_name)

View file

@ -2,7 +2,7 @@
= person_image_link(person) = person_image_link(person)
.from .from
%h2 %h2
= person.real_name = link_to person.real_name, person_path(person)
- if defined?(post) - if defined?(post)
.aspect .aspect
@ -12,5 +12,7 @@
- else - else
- for aspect in current_user.aspects_with_post( post.id ) - for aspect in current_user.aspects_with_post( post.id )
%li= link_to aspect.name, aspect %li= link_to aspect.name, aspect
#person_nav_links
= link_to t('.view_profile'), person_path(person) = 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 :font
:weight normal :weight normal
#person_nav_links
a
:padding
:right 2em
.from .from
:font :font
:size 14px :size 14px
@ -549,6 +553,15 @@ ul.comments
:margin 0 :margin 0
:padding 0 :padding 0
#profile_information
ul
:margin
:top 1em
li
:margin
:bottom 1em
#stream, #profile, #stream, #profile,
.comments .comments