diaspora/app/views/people/show.html.haml
2011-03-10 12:55:05 -08:00

77 lines
2.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
= include_javascripts :people
- content_for :page_title do
= @person.name
.span-8.append-1.last
= render :partial => 'people/profile_sidebar', :locals => {:person => @person, :contact => @contact }
- if user_signed_in? && @contact.persisted? && @contacts_of_contact.count > 0
.span-8.last
%hr{:style=>"width:300px;"}
.section.contact_pictures
%h4
= @contacts_of_contact.length
= t('.similar_contacts')
- for person in @contacts_of_contact
= person_image_link person
.span-15.last
#author_info
- if user_signed_in? && !(@contact.persisted? || current_user.person == @person)
.right
- if @incoming_request
= link_to t('.incoming_request', :name => truncate(@person.name, :length => 20, :separator => ' ', :omission => '')),
{:controller => "contacts",
:action => "new",
:person_id => @person.id},
:class => 'share_with button',
:rel => 'facebox'
-else
= link_to t('.start_sharing'),
{:controller => "contacts",
:action => "new",
:person_id => @person.id},
:class => 'share_with button',
:rel => 'facebox'
- if @share_with
= javascript_tag "$(document).ready(function() {jQuery.facebox({ ajax: '#{new_contact_path(:person_id => @person.id)}' });});"
- else
- if user_signed_in? && @contact.person
.right
= link_to t('.message'), new_conversation_path(:contact_id => @contact.id, :name => @contact.person.name, :contact_id => @contact.id), :class => 'button', :rel => 'facebox'
/- if @post_type == :photos
/ = link_to t('layouts.header.view_profile'), person_path(@person)
/- else
/ = link_to t('_photos'), person_photos_path(@person)
%h3
= @person.name
.description
= @person.diaspora_handle
%hr
- if @posts.count > 0
-if @post_type == :photos
= render 'photos/index', :photos => @posts
- else
#main_stream.stream
= render 'shared/stream', :posts => @fakes, :commenting_disabled => @commenting_disabled
%a.paginate
= t("more")
= will_paginate @posts
- else
#stream
%li{:style=>"text-align:center;"}
.dull= t('.no_posts')