diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb index f699297dc..842db8e1c 100644 --- a/app/controllers/services_controller.rb +++ b/app/controllers/services_controller.rb @@ -47,7 +47,7 @@ class ServicesController < ApplicationController def finder service = current_user.services.where(:type => "Services::#{params[:provider].titleize}").first @friends = service ? service.finder(:remote => params[:remote]) : [] - render :layout => false + # render :layout => false end def inviter diff --git a/app/views/services/finder.html.haml b/app/views/services/finder.html.haml index 5c8453adb..89174bdc0 100644 --- a/app/views/services/finder.html.haml +++ b/app/views/services/finder.html.haml @@ -5,27 +5,49 @@ - content_for :head do = include_javascripts :finder -#aspect_edit_pane.larger.friend_finder - #facebox_header - %h4 - = t('.invite_your_friends_from', :service => params[:provider].titleize) - .description - - if @friends.size > 0 - = t('.friends', :count => @friends.size) - - else - %i= t('.not_connected') +#section_header + %h2 + = t('contacts.index.title') += render 'shared/contact_sidebar' - .contact_list +.span-18.last + %h3 + = t('.service_friends', :service => params[:provider].titleize) + #people_stream.stream.contacts - if @friends.size > 0 - = render :partial => 'services/finder', :locals => {:friends => @friends} + - for friend in @friends + .stream_element{:id => friend.id} + .right + + - if friend.already_invited? + = link_to t('.resend'), service_inviter_path(:uid => friend.uid, :provider => 'facebook', :invitation_id => friend.invitation_id) + - elsif friend.on_diaspora? + = render 'aspect_memberships/aspect_dropdown', :contact => contact_proxy(friend), :person => friend.person, :hang => 'left' + - else + = facebook_invite_form(friend) + + - if friend.on_diaspora? + = person_image_link(friend.person, :size => :thumb_small) + - else + = image_tag(friend.photo_url, :class => 'avatar') + + .content + %span.from + - if friend.on_diaspora? + = link_to friend.name, person_path(friend.person) + - else + = friend.name + + + .info + - if friend.person + = friend.person.diaspora_handle + - else + not yet on diaspora + + /= will_paginate @friends - else - %br - %br - %br - %br - %br - %br - %br - %h4{:style => 'text-align:center;'} - = link_to t('services.index.connect_to_facebook'), "/auth/facebook" if AppConfig[:configured_services].include?('facebook') + %h3.no_contacts + = t('.no_friends') + diff --git a/app/views/shared/_contact_sidebar.html.haml b/app/views/shared/_contact_sidebar.html.haml index bdc9fca08..e260e7d00 100644 --- a/app/views/shared/_contact_sidebar.html.haml +++ b/app/views/shared/_contact_sidebar.html.haml @@ -11,7 +11,6 @@ - if AppConfig[:featured_users] %li{:class => ("active" if defined?(@featured))} = link_to t('contacts.featured.featured_users'), "/featured", :class => "element_selector" - /%li - / = link_to "Invite friends", "#", :class => "element_selector" - + %li + = link_to "Facebook Friends", friend_finder_path('facebook'), :class => "element_selector" diff --git a/app/views/shared/_invitations.haml b/app/views/shared/_invitations.haml index 12c99f8ca..502f5c423 100644 --- a/app/views/shared/_invitations.haml +++ b/app/views/shared/_invitations.haml @@ -1,7 +1,7 @@ - if AppConfig.configured_services.include?('facebook') - if defined? remote - = link_to t('.from_facebook'), friend_finder_path('facebook', :remote => remote), :rel => 'facebox' + = link_to t('.from_facebook'), friend_finder_path('facebook', :remote => remote) -else - = link_to t('.from_facebook'), friend_finder_path('facebook'), :rel => 'facebox' + = link_to t('.from_facebook'), friend_finder_path('facebook') %br = link_to t('.by_email'), new_user_invitation_path, :title => t('.invite_someone'), :rel => 'facebox' diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 3058565ae..d3a5eceb4 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -642,14 +642,8 @@ en: join_me_on_diaspora: "Join me on DIASPORA*" click_link_to_accept_invitation: "Click this link to accept your invitation" finder: - invite_your_friends_from: "Invite your friends from %{service}" - friends: - zero: "no friends" - one: "1 friend" - few: "%{count} friends" - many: "%{count} friends" - other: "%{count} friends" - not_connected: "not connected" + service_friends: "%{service} Friends" + no_friends: "No Facebook friends found." remote_friend: resend: "resend" invite: "invite" diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 1626b2486..a881c8a08 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -2670,11 +2670,6 @@ h1.tag .hover_edit :display inline -.friend_finder - .share_with - :background - :color rgb(245,245,245) - #contacts_of_contact .section :margin