fixed people/contacts layout; pulled person sub-header into its own partial
This commit is contained in:
parent
7052654b25
commit
0cceb4fdd3
4 changed files with 37 additions and 68 deletions
26
app/views/people/_sub_header.html.haml
Normal file
26
app/views/people/_sub_header.html.haml
Normal 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
|
||||
|
|
@ -9,50 +9,11 @@
|
|||
- content_for :page_title do
|
||||
= @person.name
|
||||
|
||||
.span-8.append-1.last
|
||||
.span-6
|
||||
= render :partial => 'people/profile_sidebar', :locals => {:person => @person, :contact => @contact }
|
||||
|
||||
.span-15.last
|
||||
#author_info
|
||||
- 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
|
||||
.span-18.last
|
||||
= render 'people/sub_header', :person => @person, :contact => @contact
|
||||
|
||||
#people_stream.stream
|
||||
- for hash in @hashes
|
||||
|
|
|
|||
|
|
@ -24,32 +24,7 @@
|
|||
|
||||
.span-18.last
|
||||
.stream_container
|
||||
#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
|
||||
= render 'people/sub_header', :person => @person, :contact => @contact
|
||||
|
||||
- if @posts.length > 0
|
||||
-if @post_type == :photos
|
||||
|
|
|
|||
|
|
@ -357,6 +357,9 @@ ul.as-selections
|
|||
:margin
|
||||
:bottom 10px
|
||||
:right 10px
|
||||
h2
|
||||
:margin
|
||||
:bottom 0
|
||||
|
||||
&.show
|
||||
a
|
||||
|
|
@ -372,6 +375,10 @@ ul.as-selections
|
|||
.right
|
||||
:top 10px
|
||||
|
||||
.description
|
||||
:margin
|
||||
:bottom 10px
|
||||
|
||||
#conversation_inbox a
|
||||
&:hover
|
||||
:text
|
||||
|
|
|
|||
Loading…
Reference in a new issue