-# 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(){ if( $("#edit_aspect_pane").hasClass("active") ) { editPaneFadeOut(); } else { editPaneFadeIn(); } } ); editPaneFadeIn = function(){ var trigger = $("#edit_aspect_trigger"); $("#edit_aspect_pane").addClass("active"); $(".contact_pictures").fadeOut(200, function(){ $("#edit_aspect_pane").fadeIn(200); trigger.html("done editing"); }); }; editPaneFadeOut = function(){ var trigger = $("#edit_aspect_trigger"); trigger.html("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(){ editPaneFadeIn(); }); - if (aspect == :all) && @request_count > 0 #new_request_pane{:class => "everyone"} %h1.new_request - if @request_count > 1 = link_to "#{@request_count} new requests!", aspects_manage_path - else = link_to "#{@request_count} new request!", aspects_manage_path #left_pane{:class => ("everyone" if aspect == :all)} - if aspect == :all %h2= t('.everyone') - else %h2{:style=>"position:relative;margin-bottom:0;"} = aspect .right = link_to "edit aspect", "#", :id => "edit_aspect_trigger", :class => "button" %span{:style=>"color:#999;font-size:14px;"} = aspect.contacts.count - if aspect.contacts.count == 1 contact - else contacts - unless aspect == :all #edit_aspect_pane - if @contacts.count > 0 %h3 Add an existing contact = render 'shared/contact_list', :aspect => aspect, :contacts => @contacts, :manage => defined?(manage) = render 'shared/add_contact', :aspect => aspect %h3 Aspect settings != remove_link(aspect) .contact_pictures - for contact in contacts = person_image_link(contact.person) - if aspect == :all && @contacts.count == 0 %h4 You currently have no contacts. Find your contacts here. = form_tag(people_path, :method => 'get') do = text_field_tag 'q', nil, :placeholder => t('search'), :type => 'search', :results => 5 -if aspect == :all %br %br %br %br %h3{:style=>"position:relative;"} Aspects .right{:style=>"font-size:12px;top:7px;"} = link_to 'add aspect', '#add_aspect_pane', :class => "add_aspect_button" - for user_aspect in current_user.aspects %div{:style=>"border-bottom:1px solid #eee;padding:6px;"} %h4.aspect_title_right{:style => "margin-bottom:0;"} = link_to user_aspect, user_aspect %span{:style=>"font-size:12px;color:#888;"} = "#{user_aspect.contacts.count} contacts" - if user_aspect.contacts.count > 0 - for aspect_contact in user_aspect.contacts[0..8] = person_image_link(aspect_contact.person) .clearfix %br %br %br %br %h3 Invites %p invite people to join Diaspora. = render "shared/invitations", :invites => @invites