Move Facebook inviter view into the contacts layout, rather than a facebox
This commit is contained in:
parent
7b85dcec9c
commit
a8d37fb3fc
6 changed files with 49 additions and 39 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
#section_header
|
||||
%h2
|
||||
= t('contacts.index.title')
|
||||
|
||||
= render 'shared/contact_sidebar'
|
||||
|
||||
.span-18.last
|
||||
%h3
|
||||
= t('.service_friends', :service => params[:provider].titleize)
|
||||
#people_stream.stream.contacts
|
||||
- if @friends.size > 0
|
||||
= t('.friends', :count => @friends.size)
|
||||
- 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
|
||||
%i= t('.not_connected')
|
||||
= 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
|
||||
|
||||
|
||||
.contact_list
|
||||
- if @friends.size > 0
|
||||
= render :partial => 'services/finder', :locals => {:friends => @friends}
|
||||
.info
|
||||
- if friend.person
|
||||
= friend.person.diaspora_handle
|
||||
- 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')
|
||||
not yet on diaspora
|
||||
|
||||
/= will_paginate @friends
|
||||
- else
|
||||
%h3.no_contacts
|
||||
= t('.no_friends')
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue