From f3183a11e19ef8872660c0d6094b00504905b074 Mon Sep 17 00:00:00 2001 From: Ilya Zhitomirskiy Date: Fri, 4 Nov 2011 16:20:51 -0700 Subject: [PATCH] message explaining that we're populating things in the background --- app/controllers/services_controller.rb | 4 ++-- app/views/services/finder.html.haml | 6 ++++++ config/locales/diaspora/en.yml | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb index 1d4ad964c..d5833bc96 100644 --- a/app/controllers/services_controller.rb +++ b/app/controllers/services_controller.rb @@ -66,8 +66,8 @@ class ServicesController < ApplicationController def finder @finder = true - service = current_user.services.where(:type => "Services::#{params[:provider].titleize}").first - @friends = service ? service.finder(:remote => params[:remote]).paginate( :page => params[:page], :per_page => 15) : [] + @service = current_user.services.where(:type => "Services::#{params[:provider].titleize}").first + @friends = @service ? @service.finder(:remote => params[:remote]).paginate( :page => params[:page], :per_page => 15) : [] end def inviter diff --git a/app/views/services/finder.html.haml b/app/views/services/finder.html.haml index d7aad4df8..0484e2a38 100644 --- a/app/views/services/finder.html.haml +++ b/app/views/services/finder.html.haml @@ -20,6 +20,12 @@ = render :partial => 'remote_friend', :collection => @friends, :as => :friend = will_paginate @friends + - elsif @service + .no_contacts + %br + %br + %h4 + = t('.fetching_contacts', :service => params[:provider].titleize) - else .no_contacts = link_to(image_tag("social_media_logos/facebook-48x48.png"), "/auth/facebook") diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index d1f4d555c..338be3792 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -717,6 +717,7 @@ en: join_me_on_diaspora: "Join me on DIASPORA*" click_link_to_accept_invitation: "Follow this link to accept your invitation" finder: + fetching_contacts: "Diaspora is populating your %{service} friends please check back in a few minutes." service_friends: "%{service} Friends" no_friends: "No Facebook friends found." remote_friend: