-#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

#aspect_edit_pane
  #facebox_header{:data=>{:guid=>@aspect.id}}
    %h3#aspect_name_title
      %span.name= @aspect
      %span.tiny_text
        = link_to t('.rename'), '#', :id => 'rename_aspect_link'

    #aspect_name_edit.hidden
      = form_for @aspect, :remote => true do |aspect|
        = aspect.text_field :name, :maxlength => 20
        = aspect.submit t('.update'), 'data-disable-with' => t('.updating'), :class => 'button'

  - if @contacts.count > 0
    = render 'shared/contact_list', :aspect => @aspect, :contacts => @contacts

  %br
  .bottom_submit_section
    .left
      = button_to t('delete'), @aspect, :method => "delete", :data => { :confirm => t('.confirm_remove_aspect') }, :class => 'button delete'
      - if @aspect.contacts_visible
        = link_to image_tag('icons/padlock-open.png', :height => 16, :width => 16, :id => "contact_visibility_padlock", :class => 'open', :title => t('.aspect_list_is_visible')),
                  aspect_toggle_contact_visibility_path(@aspect), :method => :put, :remote => true
          
      - else
        = link_to image_tag('icons/padlock-closed.png', :height => 16, :width => 16, :id => "contact_visibility_padlock", :title => t('.aspect_list_is_not_visible')),
                  aspect_toggle_contact_visibility_path(@aspect), :method => :put, :remote => true
          
    = submit_tag t('.done'), :class => 'button creation', :rel => 'close'

