diaspora/app/views/aspects/manage.html.haml
2010-12-07 00:21:05 -08:00

62 lines
2.1 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
= include_javascripts :aspects
#section_header
%h2=t('.manage_aspects')
.right{:style=>"top:0;"}
= link_to("+ #{t('.add_a_new_aspect')}", "#add_aspect_pane", :class => "new_aspect add_aspect_button button", :title => t('.add_a_new_aspect'))
#manage_aspect_zones
.span-4.append-1.last
%h3=t('.requests')
.requests
%i
%p= "#{t('.drag_to_add')} =>"
%ul.dropzone
- if @remote_requests.size < 1
%li=t('.no_requests')
- else
- for request in @remote_requests
%li.person.request{:data=>{:guid=>request.id, :person_id=>request.from.id}}
.delete
.x
X
.circle
= link_to person_image_tag(request.from), request.from
= render 'shared/invitations', :invites => @invites
.span-19.last
- for hash in @aspect_hashes
.aspect.span-9{:data=>{:guid=>hash[:aspect].id}}
.aspect_name
%span.edit_name_field
%h3{:contenteditable=>true}
= hash[:aspect].name
%span.tip click to edit
%ul.tools
%li= link_to t('.add_a_new_contact'), "#manage_aspect_contacts_pane_#{hash[:aspect].id}", :class => 'manage_aspect_contacts_button'
%li!= remove_link(hash[:aspect])
%ul.dropzone{:data=>{:aspect_id=>hash[:aspect].id}}
-for person in hash[:people]
%li.person{:data=>{:guid=>person.id, :aspect_id=>hash[:aspect].id}}
.delete
.x
X
.circle
= link_to person_image_tag(person), person
.draggable_info
=t('.drag_to_add')
.fancybox_content
%div{:id => "manage_aspect_contacts_pane_#{hash[:aspect].id}"}
= render "requests/manage_aspect_contacts", :aspect_name => hash[:aspect].name, :aspect_id => hash[:aspect].id, :manage => true