share with action for people who are already on diaspora

This commit is contained in:
zhitomirskiyi 2011-01-28 16:35:04 -08:00
parent 605e70f095
commit a8ac403e30
3 changed files with 12 additions and 0 deletions

View file

@ -42,6 +42,7 @@ class PeopleController < ApplicationController
def show
@person = Person.where(:id => params[:id]).first
@post_type = :all
@share_with = (params[:share_with] == 'true')
if @person
@incoming_request = current_user.request_from(@person)

View file

@ -28,6 +28,9 @@
:id => @person.id},
:class => 'share_with button',
:rel => 'facebox'
- if @share_with
= javascript_tag "$(document).ready(function() {jQuery.facebox({ ajax: '#{share_with_path(:id => @person.id)}' });});"
- else
.right

View file

@ -32,6 +32,14 @@
= t('invitations.new.already_invited')
%br
= link_to t('.resend'), service_inviter_path(:uid => uid, :provider => 'facebook', :invitation_id => friend[:invitation_id])
- elsif friend[:person]
= link_to t('people.show.start_sharing'),
{:controller => "people",
:action => "show",
:id => friend[:person].id,
:share_with => true},
:class => 'button'
- elsif current_user.invites > 0
= form_tag service_inviter_path do
= select_tag(:aspect_id, options_from_collection_for_select(@all_aspects, 'id', 'name'))