90 lines
2.6 KiB
Text
90 lines
2.6 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
|
|
$("#edit_aspect_trigger").live("click",
|
|
function(){
|
|
EditPane.toggle();
|
|
}
|
|
);
|
|
|
|
var EditPane = {
|
|
toggle: function() {
|
|
if( $("#edit_aspect_pane").hasClass("active") ) {
|
|
EditPane.fadeOut();
|
|
} else {
|
|
EditPane.fadeIn();
|
|
}
|
|
},
|
|
|
|
fadeIn: function(){
|
|
var trigger = $("#edit_aspect_trigger");
|
|
|
|
$("#edit_aspect_pane").addClass("active");
|
|
$(".contact_pictures").fadeOut(200, function(){
|
|
$("#edit_aspect_pane").fadeIn(200);
|
|
trigger.html("#{t('.done_editing')}");
|
|
});
|
|
},
|
|
|
|
fadeOut: function(){
|
|
var trigger = $("#edit_aspect_trigger");
|
|
trigger.html("#{t('aspects.show.edit_aspect')}");
|
|
|
|
$("#edit_aspect_pane").removeClass("active");
|
|
$("#edit_aspect_pane").fadeOut(200, function(){
|
|
$(".contact_pictures").fadeIn(200);
|
|
});
|
|
}
|
|
};
|
|
|
|
- if aspect != :all && aspect.contacts.count == 0
|
|
:javascript
|
|
$(document).ready(function(){
|
|
EditPane.fadeIn();
|
|
});
|
|
|
|
- if (aspect == :all) && @request_count > 0
|
|
#new_request_pane{:class => "everyone"}
|
|
%h1.new_request{:style => 'text-align:center'}
|
|
= new_request_link(@request_count)
|
|
|
|
#left_pane{:class => ("everyone" if aspect == :all)}
|
|
|
|
- if aspect == :all
|
|
%h3= t('.all_contacts')
|
|
|
|
.section.contact_pictures
|
|
- for contact in contacts
|
|
= person_image_link(contact.person)
|
|
|
|
- if aspect == :all && @contacts.count == 0
|
|
%h4
|
|
= t('.no_contacts')
|
|
= form_tag(people_path, :method => 'get') do
|
|
= text_field_tag 'q', nil, :placeholder => t('search'), :type => 'search', :results => 5
|
|
|
|
-if aspect == :all
|
|
.section.aspect_listings
|
|
%h3
|
|
= link_to(t('.aspects'), aspects_manage_path)
|
|
.right{:style=>"font-size:12px;top:7px;"}
|
|
= link_to t('.add_aspect'), '#add_aspect_pane', :class => "add_aspect_button"
|
|
|
|
%ul
|
|
- for user_aspect in @aspects
|
|
%li
|
|
%h4
|
|
= link_to user_aspect, user_aspect
|
|
%span
|
|
= t('contacts', :count=>user_aspect.contacts.count)
|
|
|
|
- if user_aspect.contacts.count > 0
|
|
- for aspect_contact in user_aspect.contacts[0..7]
|
|
= person_image_link(aspect_contact.person)
|
|
.section
|
|
%h3= t('.invites')
|
|
= render "shared/invitations", :invites => @invites
|
|
|