making profile not look so bad
This commit is contained in:
parent
c816a1f78e
commit
997f9ad8d0
4 changed files with 47 additions and 15 deletions
|
|
@ -69,9 +69,13 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
|
||||
def person_image_link(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)
|
||||
"new_requests" if request_count > 0 #Should not be Il8ned
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
#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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue