diaspora/app/views/people/_profile_sidebar.html.haml

60 lines
1.8 KiB
Text

-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :head do
:javascript
$(document).ready(function(){
$('.delete').bind('ajax:success', function() {
$(this).closest('li').fadeOut(200);
});
$('.delete').bind('ajax:failure', function() {
alert("#{t('status_messages.destroy.failure')}");
});
});
#profile
.profile_photo
= person_image_link(person, :size => :thumb_large, :to => :photos)
- if user_signed_in?
- if person == current_user.person
%p
= link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path
- if person != current_user.person
%hr{:style=>"width:300px;"}
%br
= render 'aspect_memberships/aspect_dropdown', :contact => @contact, :person => @person, :hang => 'left'
%br
%br
-if contact.sharing? || person == current_user.person
%hr{:style=>"width:300px;"}
%ul#profile_information
- unless person.profile.bio.blank?
%li
%h4
=t('.bio')
%div{ :class => direction_for(person.profile.bio) }
= markdownify(person.profile.bio, :newlines => true)
- unless person.profile.location.blank?
%li
%h4
=t('.location')
%div{ :class => direction_for(person.profile.location) }
= markdownify(person.profile.location, :newlines => true)
%li.span-8.last
.span-4
- unless person.profile.gender.blank?
%h4
=t('.gender')
= person.profile.gender
.span-4.last
- unless person.profile.birthday.blank?
%h4
=t('.born')
= birthday_format(person.profile.birthday)