diaspora/app/views/people/_aspect_list.haml

50 lines
1.5 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_include_tag 'contact-list'
:javascript
$(document).ready(function() {
$("#edit_contact_aspects").click(function(evt){
evt.preventDefault();
$(".badges").fadeOut(200, function(){
$(".edit").fadeIn(200);
});
});
$("#done_contact_aspects").click(function(evt){
evt.preventDefault();
$(".edit").fadeOut(200, function(){
$(".badges").fadeIn(200);
});
});
});
.aspects
- if !contact
%h4
= t('people.show.not_connected', :name => person.first_name)
- elsif contact.pending
%h4
= t('people.person.pending_request')
.badges{:class => ("hidden" if !contact)}
- for aspect in aspects_with_person
= render :partial => 'aspects/aspect_badge', :locals => {:aspect => aspect}
.right
= link_to "edit aspect membership", "#", :id=> "edit_contact_aspects"
.edit{:class => ("hidden" if contact)}
= render :partial => 'people/share_with_pane',
:locals => {:person => person,
:contact => contact,
:aspects_with_person => aspects_with_person,
:aspects_without_person => aspects_without_person}
- if contact
.right
= link_to "done editing", "#", :id => "done_contact_aspects"
= link_to t('people.profile_sidebar.remove_contact'), person, :confirm => t('are_you_sure'), :method => :delete