Commit 89414488 authored by zhitomirskiyi's avatar zhitomirskiyi

placed friend finder in facebox. added translations

parent 49f5f15b
......@@ -48,6 +48,7 @@ class ServicesController < ApplicationController
def finder
service = current_user.services.where(:provider => params[:provider]).first
@friends = service ? service.finder : {}
render :layout => false
end
def inviter
......
......@@ -12,13 +12,6 @@
.description
= t('contacts', :count =>@aspect_contacts_count)
.person_tiles{:style => "display:none;"}
- for contact in @aspect.contacts
.tile
= person_image_link contact.person
= link_to contact.person.name, contact.person
%hr
= form_for @aspect do |asp|
= asp.text_field :name, :value => @aspect.name
= asp.submit t('.rename_aspect'), :class => 'button'
......
......@@ -44,9 +44,9 @@
%h4= t('shared.invitations.invites')
= render "shared/invitations", :invites => @invites
.section
%h4
Find your friends
= link_to "From Facebook", friend_finder_path('facebook')
- if SERVICES['facebook']['app_id'] !=""
.section
%h4
= t('.invite_your_friends')
= link_to t('.from_facebook'), friend_finder_path('facebook'), :rel => 'facebox'
......@@ -5,46 +5,59 @@
- content_for :head do
= include_javascripts :aspects
.span-24.last
%h3
Facebook friend finder
#aspect_edit_pane
#facebox_header
%h4
= t('.invite_your_friends_from', :service => params[:provider].titleize)
.description
- if @friends.keys.length > 0
= "#{@friends.keys.length} friends"
- else
%i= t('.not_connected')
.span-12.prepend-6
.contact_list
= search_field_tag :contact_search, "", :class => 'contact_list_search', :results => 5, :placeholder => t('shared.contact_list.all_contacts')
%ul
- for uid in @friends.keys
- friend = @friends[uid]
%li
.right
-if friend[:contact] && !friend[:contact].pending
= t('people.person.already_connected')
- elsif (friend[:contact] && friend[:contact].pending)
= t('people.person.pending_request')
- elsif friend[:person]
= link_to t('people.show.start_sharing'),
{:controller => "people",
:action => "share_with",
:id => friend[:person].id},
:class => 'button',
:rel => 'facebox'
- elsif friend[:invitation_id]
= t('invitations.new.already_invited')
%br
= link_to t('.resend'), service_inviter_path(:uid => uid, :provider => 'facebook', :invitation_id => friend[:invitation_id])
- else
= form_tag service_inviter_path do
= select_tag(:aspect_id, options_from_collection_for_select(@all_aspects, 'id', 'name'))
= hidden_field_tag :uid, uid
= hidden_field_tag :provider, 'facebook'
= submit_tag "invite"
- if friend[:person]
= person_image_link(friend[:person])
.contact_list
- if @friends.keys.length > 0
= search_field_tag :contact_search, "", :class => 'contact_list_search', :results => 5, :placeholder => t('shared.contact_list.all_contacts')
%ul
- for uid in @friends.keys
- friend = @friends[uid]
%li
.right
-if friend[:contact] && !friend[:contact].pending
= t('people.person.already_connected')
- elsif (friend[:contact] && friend[:contact].pending)
= t('people.person.pending_request')
- elsif friend[:person]
= link_to t('people.show.start_sharing'),
{:controller => "people",
:action => "share_with",
:id => friend[:person].id},
:class => 'button',
:rel => 'facebox'
- elsif friend[:invitation_id]
= t('invitations.new.already_invited')
%br
= link_to t('.resend'), service_inviter_path(:uid => uid, :provider => 'facebook', :invitation_id => friend[:invitation_id])
- else
= form_tag service_inviter_path do
= select_tag(:aspect_id, options_from_collection_for_select(@all_aspects, 'id', 'name'))
= hidden_field_tag :uid, uid
= hidden_field_tag :provider, 'facebook'
= submit_tag "invite", :disable_with => "#{t('.generating')}..."
%h4.name
- if friend[:person]
= link_to friend[:name], person_path(friend[:person])
- else
= friend[:name]
= person_image_link(friend[:person])
%h4.name
- if friend[:person]
= link_to friend[:name], person_path(friend[:person])
- else
= friend[:name]
- else
%br
%br
%br
%h4
= link_to t('services.index.connect_to_facebook'), "/auth/facebook" if SERVICES['facebook']['app_id'] !=""
......@@ -189,6 +189,8 @@ en:
index:
handle_explanation: "This is your diaspora handle. Like an email address, you can give this to people to reach you."
no_contacts: "No contacts"
invite_your_friends: "Invite your friends"
from_facebook: "From Facebook"
notifications:
request_accepted: "accepted your share request."
new_request: "offered to share with you."
......@@ -428,7 +430,10 @@ en:
join_me_on_diaspora: "Join me on DIASPORA*"
click_link_to_accept_invitation: "Click this link to accept your invitation"
finder:
generating: "generating"
resend: "resend"
invite_your_friends_from: "Invite your friends from %{service}"
not_connected: "not connected"
notifier:
hello: "Hello %{name}!"
love: "love,"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment