fixed people/contacts layout; pulled person sub-header into its own partial

This commit is contained in:
danielgrippi 2011-08-05 15:51:01 -07:00
parent 7052654b25
commit 0cceb4fdd3
4 changed files with 37 additions and 68 deletions

View file

@ -0,0 +1,26 @@
#author_info
.right
- if user_signed_in? && current_user.person != person
= render 'aspect_memberships/aspect_dropdown', :contact => contact, :person => person, :hang => 'left'
- elsif user_signed_in? && current_user.person == person
= link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path, :class => 'button creation'
%h2
= person.name
%span.diaspora_handle
= person.diaspora_handle
.description
- if !person.profile.tag_string.blank? && user_signed_in? && (contact.persisted? || person == current_user.person || incoming_request)
= Diaspora::Taggable.format_tags(person.profile.tag_string)
- if user_signed_in? && person == current_user.person
%span.hover_edit
= link_to t('.edit'), edit_profile_path
- else
- if user_signed_in? && person == current_user.person
%i
= t('.you_have_no_tags')
%span.add_tags
= link_to t('.add_some'), edit_profile_path
%hr

View file

@ -9,50 +9,11 @@
- content_for :page_title do - content_for :page_title do
= @person.name = @person.name
.span-8.append-1.last .span-6
= render :partial => 'people/profile_sidebar', :locals => {:person => @person, :contact => @contact } = render :partial => 'people/profile_sidebar', :locals => {:person => @person, :contact => @contact }
.span-15.last .span-18.last
#author_info = render 'people/sub_header', :person => @person, :contact => @contact
- if user_signed_in? && !(@contact.persisted? || current_user.person == @person)
.right
- if @incoming_request
= link_to t('people.show.incoming_request', :name => truncate(@person.name, :length => 20, :separator => ' ', :omission => '')),
{:controller => "contacts",
:action => "new",
:person_id => @person.id},
:class => 'share_with button',
:rel => 'facebox'
-else
= link_to t('people.show.start_sharing'),
{:controller => "contacts",
:action => "new",
:person_id => @person.id},
:class => 'share_with button',
:rel => 'facebox'
- if @share_with
= javascript_tag "$(document).ready(function() {jQuery.facebox({ ajax: '#{new_contact_path(:person_id => @person.id)}' });});"
- else
- if user_signed_in? && @contact.person && @contact.receiving?
.right
= link_to t('people.show.mention'), new_status_message_path(:person_id => @person.id), :class => 'button', :rel => 'facebox'
- if @contact.mutual?
= link_to t('people.show.message'), new_conversation_path(:contact_id => @contact.id, :name => @contact.person.name, :contact_id => @contact.id), :class => 'button', :rel => 'facebox'
%h3
= @person.name
%span.diaspora_handle
= @person.diaspora_handle
.description
- if !@person.profile.tag_string.blank?
= Diaspora::Taggable.format_tags(@person.profile.tag_string)
- if user_signed_in? && @person == current_user.person
%span.hover_edit
= link_to t('people.show.edit'), edit_profile_path
%hr
#people_stream.stream #people_stream.stream
- for hash in @hashes - for hash in @hashes

View file

@ -24,32 +24,7 @@
.span-18.last .span-18.last
.stream_container .stream_container
#author_info = render 'people/sub_header', :person => @person, :contact => @contact
.right
- if user_signed_in? && current_user.person != @person
= render 'aspect_memberships/aspect_dropdown', :contact => @contact, :person => @person, :hang => 'left'
- elsif user_signed_in? && current_user.person == @person
= link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path, :class => 'button creation'
%h2
= @person.name
%span.diaspora_handle
= @person.diaspora_handle
.description
- if !@person.profile.tag_string.blank? && user_signed_in? && (@contact.persisted? || @person == current_user.person || @incoming_request)
= Diaspora::Taggable.format_tags(@person.profile.tag_string)
- if user_signed_in? && @person == current_user.person
%span.hover_edit
= link_to t('.edit'), edit_profile_path
- else
- if user_signed_in? && @person == current_user.person
%i
= t('.you_have_no_tags')
%span.add_tags
= link_to t('.add_some'), edit_profile_path
%hr
- if @posts.length > 0 - if @posts.length > 0
-if @post_type == :photos -if @post_type == :photos

View file

@ -357,6 +357,9 @@ ul.as-selections
:margin :margin
:bottom 10px :bottom 10px
:right 10px :right 10px
h2
:margin
:bottom 0
&.show &.show
a a
@ -372,6 +375,10 @@ ul.as-selections
.right .right
:top 10px :top 10px
.description
:margin
:bottom 10px
#conversation_inbox a #conversation_inbox a
&:hover &:hover
:text :text