Revert "refactored local person person friend finder functionality to use the partial"

This reverts commit 9f4035ab019803fc53844e70884b0519142deb18.

Conflicts:

	app/views/services/_remote_friend.html.haml
	app/views/users/getting_started/_step_3.html.haml

refactored invitations, added them to the last page

fixed styling on adding an aspect to the aspect list

added a facebook for person edit aspect memberships

touched up and simplified sign-up flow

fix styling on step 3
This commit is contained in:
zhitomirskiyi 2011-02-07 16:18:06 -08:00
parent d147da1b4a
commit 4e96d11cd0
18 changed files with 234 additions and 258 deletions

View file

@ -50,6 +50,11 @@ class AspectsController < ApplicationController
elsif params[:aspect][:share_with] elsif params[:aspect][:share_with]
@contact = Contact.where(:id => params[:aspect][:contact_id]).first @contact = Contact.where(:id => params[:aspect][:contact_id]).first
@person = Person.where(:id => params[:aspect][:person_id]).first @person = Person.where(:id => params[:aspect][:person_id]).first
@contact = current_user.contact_for(@person)
invite_or_add_contact_to_aspect(@aspect, @person, @contact)
@contact = current_user.contact_for(@person)
respond_to do |format| respond_to do |format|
format.js { render :json => {:html => render_to_string( format.js { render :json => {:html => render_to_string(
:partial => 'aspects/aspect_list_item', :partial => 'aspects/aspect_list_item',
@ -153,17 +158,8 @@ class AspectsController < ApplicationController
@aspect = current_user.aspects.find(params[:aspect_id]) @aspect = current_user.aspects.find(params[:aspect_id])
@contact = current_user.contact_for(@person) @contact = current_user.contact_for(@person)
if @contact invite_or_add_contact_to_aspect(@aspect, @person, @contact)
current_user.add_contact_to_aspect(@contact, @aspect)
else
current_user.send_contact_request_to(@person, @aspect)
contact = current_user.contact_for(@person)
if request = Request.where(:sender_id => @person.id, :recipient_id => current_user.person.id).first
request.destroy
contact.update_attributes(:pending => false)
end
end
flash.now[:notice] = I18n.t 'aspects.add_to_aspect.success' flash.now[:notice] = I18n.t 'aspects.add_to_aspect.success'
respond_to do |format| respond_to do |format|
@ -206,4 +202,20 @@ class AspectsController < ApplicationController
end end
end end
end end
private
def invite_or_add_contact_to_aspect( aspect, person, contact)
if contact
current_user.add_contact_to_aspect(contact, aspect)
else
current_user.send_contact_request_to(person, aspect)
contact = current_user.contact_for(person)
if request = Request.where(:sender_id => person.id, :recipient_id => current_user.person.id).first
request.destroy
contact.update_attributes(:pending => false)
end
end
end
end end

View file

@ -8,7 +8,7 @@ class InvitationsController < Devise::InvitationsController
def new def new
@sent_invitations = current_user.invitations_from_me.includes(:recipient) @sent_invitations = current_user.invitations_from_me.includes(:recipient)
#emails_delivered = sent_invitations.map!{ |i| i.recipient.email } render :layout => false
end end
def create def create

View file

@ -1,5 +1,5 @@
# Copyright (c) 2010, Diaspora Inc. This file is # Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file.
class ServicesController < ApplicationController class ServicesController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
@ -25,7 +25,7 @@ class ServicesController < ApplicationController
flash[:notice] = I18n.t 'services.create.success' flash[:notice] = I18n.t 'services.create.success'
if current_user.getting_started if current_user.getting_started
redirect_to getting_started_path(:step => 1) redirect_to getting_started_path(:step => 3)
else else
redirect_to services_url redirect_to services_url
end end
@ -46,7 +46,7 @@ class ServicesController < ApplicationController
def finder def finder
service = current_user.services.where(:type => "Services::#{params[:provider].titleize}").first service = current_user.services.where(:type => "Services::#{params[:provider].titleize}").first
@friends = service ? service.finder : {} @friends = service ? service.finder(:remote => params[:remote]) : {}
render :layout => false render :layout => false
end end
@ -67,7 +67,7 @@ class ServicesController < ApplicationController
@subject = t('services.inviter.join_me_on_diaspora') @subject = t('services.inviter.join_me_on_diaspora')
@message = <<MSG @message = <<MSG
#{t('services.inviter.click_link_to_accept_invitation')}: #{t('services.inviter.click_link_to_accept_invitation')}:
\n \n
\n \n
#{accept_invitation_url(invited_user, :invitation_token => invited_user.invitation_token)} #{accept_invitation_url(invited_user, :invitation_token => invited_user.invitation_token)}

View file

@ -21,10 +21,8 @@ class UsersController < ApplicationController
params[:user].delete(:password) if params[:user][:password].blank? params[:user].delete(:password) if params[:user][:password].blank?
params[:user].delete(:password_confirmation) if params[:user][:password].blank? and params[:user][:password_confirmation].blank? params[:user].delete(:password_confirmation) if params[:user][:password].blank? and params[:user][:password_confirmation].blank?
params[:user].delete(:language) if params[:user][:language].blank? params[:user].delete(:language) if params[:user][:language].blank?
# change email notifications
# change email notifications
if params[:user][:disable_mail] if params[:user][:disable_mail]
@user.update_attributes(:disable_mail => params[:user][:disable_mail]) @user.update_attributes(:disable_mail => params[:user][:disable_mail])
flash[:notice] = I18n.t 'users.update.email_notifications_changed' flash[:notice] = I18n.t 'users.update.email_notifications_changed'
@ -80,25 +78,31 @@ class UsersController < ApplicationController
@services = @user.services @services = @user.services
service = current_user.services.where(:type => "Services::Facebook").first service = current_user.services.where(:type => "Services::Facebook").first
@step = ((params[:step].to_i>0)&&(params[:step].to_i<5)) ? params[:step].to_i : 1 @step = ((params[:step].to_i>0)&&(params[:step].to_i<4)) ? params[:step].to_i : 1
@step ||= 1 @step ||= 1
if @step == 2 && SERVICES['facebook']['app_id'] == ""
@step = 3
end
if @step == 3 if @step == 3
@requests = Request.where(:recipient_id => @person.id).includes(:sender).all @requests = Request.where(:recipient_id => @person.id).includes(:sender => :profile).all
@friends = service ? service.finder(:local => true) : {} @friends = service ? service.finder(:local => true) : {}
@friends.delete_if{|key, value| @requests.any?{ |r| r.sender_id == value[:person].id} } @friends.delete_if{|key, value| @requests.any?{ |r| r.sender_id == value[:person].id} }
elsif @step == 4
@invites = @user.invites
@friends = service ? service.finder(:remote => true) : {}
@user.getting_started = false
@user.save
end end
render "users/getting_started"
if @step == 3 && @requests.length == 0 && @friends.length == 0
@user.update_attributes(:getting_started => false)
redirect_to root_path
else
render "users/getting_started"
end
end end
def getting_started_completed def getting_started_completed
user = current_user user = current_user
user.update_attributes( :getting_started => false ) user.update_attributes(:getting_started => false)
redirect_to root_path redirect_to root_path
end end

View file

@ -4,37 +4,37 @@
$("#user_email").focus(); $("#user_email").focus();
}); });
.span-3.append-1 .span-15.last
= image_tag 'icons/monotone_email_letter_round.png', :height => "128px", :width => "128px" .span-3
= image_tag 'icons/monotone_email_letter_round.png', :height => "128px", :width => "128px"
.span-20.last .span-12.last
.span-20.last
%h2 %h2
= t('.invite_someone_to_join') = t('.invite_someone_to_join')
.description .description
= t('.if_they_accept_info') = t('.if_they_accept_info')
%br %br
.span-7.append-1
#email_invitation
= form_for User.new, :url => invitation_path(User) do |invite|
%h4
= t('email')
= invite.text_field :email, :title => t('.comma_seperated_plz')
%br
.span-13.append-1 %h4
= form_for User.new, :url => invitation_path(User) do |invite| = t('.aspect')
%h4 = invite.select(:aspects, options_from_collection_for_select(@all_aspects, 'id', 'name'))
= t('email')
= invite.text_field :email, :title => t('.comma_seperated_plz')
%br
%h4 %br
= t('.aspect') %br
= invite.select(:aspects, options_from_collection_for_select(@all_aspects, 'id', 'name'))
%br %h4
%br = t('.personal_message')
= invite.text_area :invite_messages, :rows => 3, :value => ""
%h4 %p
= t('.personal_message') = invite.submit t('.send_an_invitation')
= invite.text_area :invite_messages, :rows => 3, :value => ""
%p
= invite.submit t('.send_an_invitation')
- if !@sent_invitations.empty? - if !@sent_invitations.empty?
.span-6.last .span-6.last

View file

@ -5,23 +5,6 @@
- content_for :head do - content_for :head do
=javascript_include_tag 'contact-list' =javascript_include_tag 'contact-list'
:javascript
$(document).ready(function() {
$("#edit_contact_aspects").click(function(evt){
evt.preventDefault();
$(".badges").fadeOut(200, function(){
$(".edit").fadeIn(200);
});
});
$("#done_contact_aspects").click(function(evt){
evt.preventDefault();
$(".edit").fadeOut(200, function(){
$(".badges").fadeIn(200);
});
});
});
.aspects .aspects
- if !contact - if !contact
%h4 %h4
@ -37,18 +20,10 @@
.badges{:class => ("hidden" if !contact)} .badges{:class => ("hidden" if !contact)}
= aspect_badges(aspects_with_person) = aspect_badges(aspects_with_person)
.right %p
= link_to t('.edit_membership'), "#", :id=> "edit_contact_aspects" = link_to t('.edit_membership'),
{:controller => "people",
.edit.hidden :action => "share_with",
= render :partial => 'people/share_with_pane', :id => @person.id},
:locals => {:person => person, :class => 'button',
:contact => contact, :rel => 'facebox'
:aspects_with_person => aspects_with_person,
:aspects_without_person => aspects_without_person}
%br
- if contact
.right
= link_to t('aspects.aspect_contacts.done_editing'), "#", :id => "done_contact_aspects"
= link_to t('people.profile_sidebar.remove_contact'), person, :confirm => t('are_you_sure'), :method => :delete

View file

@ -13,19 +13,21 @@
= render :partial => 'aspects/aspect_list_item', = render :partial => 'aspects/aspect_list_item',
:locals => {:aspect => aspect, :person => person, :locals => {:aspect => aspect, :person => person,
:contact => contact} :contact => contact}
.add_aspect .add_aspect
= t('users.getting_started.step_3.aspect_name')
= form_for(Aspect.new, :remote => true) do |aspect| = form_for(Aspect.new, :remote => true) do |aspect|
.right
= aspect.submit "add new aspect", :class => 'button'
= aspect.error_messages = aspect.error_messages
= aspect.hidden_field :person_id, :value => person.id if person = aspect.hidden_field :person_id, :value => person.id if person
= aspect.hidden_field :contact_id, :value => contact.id if contact = aspect.hidden_field :contact_id, :value => contact.id if contact
= aspect.hidden_field :share_with, :value => true = aspect.hidden_field :share_with, :value => true
= aspect.text_field :name, :id => "step-3-aspect-name", :style => "display:inline;" %p
= aspect.text_field :name, :style => "display:inline;"
%p.checkbox_select %p.checkbox_select
= aspect.label :contacts_visible, t('aspects.edit.make_aspect_list_visible') = aspect.label :contacts_visible, t('aspects.edit.make_aspect_list_visible')
= aspect.check_box :contacts_visible, :default => true = aspect.check_box :contacts_visible, :checked => true, :default => true
.right .done
= aspect.submit :src => '/images/icons/monotone_add_plus.png', :type => "image", :value => "", :class => 'button' .right
= link_to t('aspects.aspect_contacts.done_editing'), "#", :class => "button", :onClick => '$.facebox.close();'
- if contact
= link_to t('people.profile_sidebar.remove_contact'), person, :confirm => t('are_you_sure'), :method => :delete

View file

@ -1,22 +1,34 @@
%li %li
-if friend[:person] .right
= render :partial => 'people/person', :locals => {:person => friend[:person], :contact => friend[:contact], :request => friend[:request]} -if friend[:contact] && !friend[:contact].pending
-else = t('people.person.already_connected')
.steam_element - elsif (friend[:contact] && friend[:contact].pending)
.right = t('people.person.pending_request')
-if friend[:invitation_id] - elsif friend[:invitation_id]
= t('invitations.new.already_invited') = t('invitations.new.already_invited')
%br %br
= link_to t('.resend'), service_inviter_path(:uid => uid, :provider => 'facebook', :invitation_id => friend[:invitation_id]) = link_to t('.resend'), service_inviter_path(:uid => uid, :provider => 'facebook', :invitation_id => friend[:invitation_id])
- elsif current_user.invites > 0 - elsif friend[:person]
= form_tag service_inviter_path(:provider => 'facebook') do = link_to t('people.show.start_sharing'),
= select_tag(:aspect_id, options_from_collection_for_select(@all_aspects, 'id', 'name')) {:controller => "people",
= hidden_field_tag :uid, uid :action => "show",
= submit_tag t('.invite') :id => friend[:person].id,
:share_with => true},
:class => 'button'
- elsif current_user.invites > 0
= image_tag('/images/user/default.png', :class => 'avatar') = form_tag service_inviter_path(:provider => 'facebook') do
= select_tag(:aspect_id, options_from_collection_for_select(@all_aspects, 'id', 'name'))
= hidden_field_tag :uid, uid
= submit_tag t('.invite')
.content - if friend[:person]
%span.from = person_image_link(friend[:person])
= friend[:name] - else
= image_tag('/images/user/default.png', :class => 'avatar')
%h4.name
- if friend[:person]
= link_to friend[:name], person_path(friend[:person])
- else
= friend[:name]

View file

@ -4,12 +4,17 @@
-if invites > 0 -if invites > 0
- if SERVICES['facebook']['app_id'] !="" - if SERVICES['facebook']['app_id'] !=""
%h4{:style => 'text-align:center;'} %h4{:style => 'text-align:center;'}
= link_to t('.from_facebook'), friend_finder_path('facebook'), :rel => 'facebox' - if defined? remote
= link_to t('.from_facebook'), friend_finder_path('facebook', :remote => remote), :rel => 'facebox'
-else
= link_to t('.from_facebook'), friend_finder_path('facebook'), :rel => 'facebox'
= t('or') = t('or')
= link_to t('.by_email'), new_user_invitation_path, :title => t('.invite_someone') = link_to t('.by_email'), new_user_invitation_path, :title => t('.invite_someone'), :rel => 'facebox'
- else - else
%h4 %h4
= link_to t('.by_email'), new_user_invitation_path, :title => t('.invite_someone') = link_to t('.by_email'), new_user_invitation_path, :title => t('.invite_someone')
= t('.invitations_left', :count => invites) %h5{:style => 'text-align:center;'}
= t('.invitations_left', :count => invites)
- else - else
= t('.dont_have_now') = t('.dont_have_now')

View file

@ -3,54 +3,30 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
- content_for :head do = content_for :head do
:javascript :css
$(document).ready(function(){ header{ display:none; }
$("#new_aspect").live("ajax:success", function(data,stat,xhr){
window.location.reload();
});
$(".aspects li").find(".delete").live("click", function(){ #getting_started_logo.start{
var aspectElement = $(this).parent("li"); -webkit-animation-name: fadeUp;
if (confirm("#{t('are_you_sure')}")){ -webkit-animation-delay: 0s;
aspectElement.fadeOut(300, function(){aspectElement.remove();}); -webkit-animation-duration: 0.35s;
} }
});
});
.span-8.append-1.last
%h1{:style => "text-align:right;"}
= t('.welcome')
.description
=t('.signup_steps')
%h3{:style => "text-align:right;"} @media only screen {
- if @step != 1 #getting_started_logo { -webkit-transform: translateZ(0); }
= link_to t('.connect_services'), getting_started_path(:step => 1) }
- else @-webkit-keyframes fadeUp {
%span.current_gs_step 0% { opacity: 0; -webkit-transform: translate3d(0, 40px, 0); -webkit-animation-timing-function: ease-out; }
= t('.connect_services') 70% { opacity: 0; -webkit-transform: translate3d(0, 35px, 0); }
%br 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); -webkit-animation-timing-function: ease-out; }
- if @step != 2 }
= link_to t('.edit_profile'), getting_started_path(:step => 2)
- else .span-15.prepend-4.last{:style => 'position:relative;'}
%span.current_gs_step = image_tag 'logo_caps.png', :id => 'getting_started_logo', :width => 143, :height => 21, :class => ('start' if @step == 1)
= t('.edit_profile') %br
%br %br
- if @step != 3 .floating{:style=>"min-height:300px;"}
= link_to t('.connect_on_diaspora'), getting_started_path(:step => 3)
- else
%span.current_gs_step
= t('.connect_on_diaspora')
%br
- if @step != 4
= link_to t('.finished'), getting_started_path(:step => 4)
- else
%span.current_gs_step
= t('.finished')
%br
.span-15.last
.floating{:style=>"min-height:500px;"}
= render "users/getting_started/step_#{@step}", :current_user => current_user = render "users/getting_started/step_#{@step}", :current_user => current_user
- if @step > 1 - if @step > 1

View file

@ -2,14 +2,7 @@
-# licensed under the Affero General Public License version 3 or later. See -# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file. -# the COPYRIGHT file.
- content_for :submit_block do
%h3 = submit_tag "#{t('users.getting_started.save_and_continue')} →"
= t('.your_services') = render :partial => 'people/edit'
.description
= t('.description')
= render 'shared/add_remove_services'
.submit_block
= link_to "#{t('users.getting_started.save_and_continue')} →", getting_started_path(:step => 2), :class => "button"

View file

@ -2,7 +2,18 @@
-# licensed under the Affero General Public License version 3 or later. See -# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file. -# the COPYRIGHT file.
- content_for :submit_block do
= submit_tag "#{t('users.getting_started.save_and_continue')} →"
= render :partial => 'people/edit'
%br
%br
%br
%br
%br
%h3{:style => 'text-align: center;'}
= t('.find_your_friends_on_facebook')
%br
%br
%br
= link_to image_tag('services/facebook_sign_in.png', :id => 'getting_started_logo', :width => 154, :height => 22), '/auth/facebook'
.submit_block
= link_to "#{t('.skip')} →", getting_started_path(:step => @step+1), :class => 'button'

View file

@ -5,24 +5,22 @@
= include_javascripts :aspects = include_javascripts :aspects
%h3 %h3
= t('.your_aspects') = t('.people_already_on_diaspora')
.description
= t('.description')
%br
= t('.your_inviter')
%br
#people_stream.stream %br
- for pending_req in @requests %br
- person = pending_req.sender
= render :partial => 'people/person', :locals => {:request => pending_req, :person => person, :contact => nil}
- for fb_id in @friends.keys
- friend = @friends[fb_id]
= render :partial => 'people/person', :locals => {:request => friend[:request], :person => friend[:person], :contact => friend[:contact]}
#people_stream.stream
- for pending_req in @requests
- person = pending_req.sender
= render :partial => 'people/person', :locals => {:request => pending_req, :person => person, :contact => nil}
- for fb_id in @friends.keys
- friend = @friends[fb_id]
= render :partial => 'people/person', :locals => {:request => friend[:request], :person => friend[:person], :contact => friend[:contact]}
%br
%br
.submit_block .submit_block
= link_to "#{t('users.getting_started.save_and_continue')} →", getting_started_path(:step => 4), :class => "button" = link_to "#{t('.finish')} →", getting_started_completed_path, :class => 'button'

View file

@ -1,39 +0,0 @@
-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
%h1
= t('.set_up', :name => first_name_or_username(current_user))
.description
= t('.ready_to_share')
%ul.inline_aspect_listing
- for aspect in @all_aspects
%li= aspect
-unless @friends.blank?
%br
= t('services.finder.invite_your_friends_from', :service => "facebook".titleize)
= t('shared.invitations.invitations_left', :count => @invites)
%br
.contact_list
= render :partial => 'services/finder', :locals => {:friends => @friends, :getting_started => true}
%br
%br
%h3
= link_to t('.continue'), root_path
%br
%br
%br
%p
= t('.change_profile')
= t('.user_menu')
%p
= t('.manage_aspects')
.submit_block
= link_to "#{t('.finish')} →", root_url, :class => "button"

View file

@ -236,24 +236,11 @@ en:
skip: "skip getting started" skip: "skip getting started"
save_and_continue: "Save and continue" save_and_continue: "Save and continue"
step_3: step_3:
your_aspects: "Your aspects"
description: "Tell Diaspora what different aspects of you are seen by different contacts. You can manage these later through your account menu at the top right. Your aspects are unique to you and not visible by others."
aspect_name: "Aspect name"
add: "Add"
your_inviter: "Here are the people who are waiting for you:"
drag_to_add: "Drag them to the aspect of yourself they know"
no_requests: "You have no requests"
step_1:
your_services: "Your services"
description: 'You are able to connect your existing social networks to your Diaspora account. You will be able to post publically through your Home page when you select “make public"'
step_4:
set_up: "You're all set up, %{name}!"
ready_to_share: "You're now ready to start sharing with "
continue: "Continue on to your Home page, an overview of all of your aspects."
change_profile: "You can edit your profile and manage your connected services at any time through "
user_menu: "the user menu located at the top right."
manage_aspects: "You can also add contacts while on any aspect page."
finish: "Finish" finish: "Finish"
people_already_on_diaspora: "People already on Diaspora"
step_2:
find_your_friends_on_facebook: "would you like to find your friends on facebook?"
skip: "Skip"
update: update:
password_changed: "Password Changed" password_changed: "Password Changed"
password_not_changed: "Password Change Failed" password_not_changed: "Password Change Failed"

View file

@ -9,15 +9,13 @@ Feature: invitation acceptance
And I fill in "Password confirmation" with "secret" And I fill in "Password confirmation" with "secret"
And I press "Sign up" And I press "Sign up"
Then I should be on the getting started page Then I should be on the getting started page
And I should see "Welcome to Diaspora!" And I should see "getting_started_logo"
And I should see "ohai" When I fill in "profile_first_name" with "O"
When I follow "Save and continue"
And I fill in "profile_first_name" with "O"
And I fill in "profile_last_name" with "Hai" And I fill in "profile_last_name" with "Hai"
And I fill in "profile_gender" with "guess!" And I fill in "profile_gender" with "guess!"
And I press "Save and continue" And I press "Save and continue"
Then I should see "Profile updated" Then I should see "Profile updated"
And I should see "Your aspects" And I should see "would you like to find your friends on facebook?"
And I should not see "Here are the people who are waiting for you:" And I should not see "Here are the people who are waiting for you:"
Scenario: accept invitation from user Scenario: accept invitation from user
@ -29,17 +27,17 @@ Feature: invitation acceptance
And I fill in "Password confirmation" with "secret" And I fill in "Password confirmation" with "secret"
And I press "Sign up" And I press "Sign up"
Then I should be on the getting started page Then I should be on the getting started page
And I should see "Welcome to Diaspora!" And I should see "getting_started_logo"
And I should see "ohai" When I fill in "profile_first_name" with "O"
When I follow "Save and continue"
And I fill in "profile_first_name" with "O"
And I fill in "profile_last_name" with "Hai" And I fill in "profile_last_name" with "Hai"
And I fill in "profile_gender" with "guess!" And I fill in "profile_gender" with "guess!"
And I press "Save and continue" And I press "Save and continue"
Then I should see "Profile updated" Then I should see "Profile updated"
And I should see "Your aspects" And I should see "would you like to find your friends on facebook?"
And I should see "Here are the people who are waiting for you:"
When I follow "Skip"
Then I should see "People already on Diaspora"
And I press the first ".share_with.button" And I press the first ".share_with.button"
And I press the first ".add.button" within "#facebox #aspects_list ul > li:first-child" And I press the first ".add.button" within "#facebox #aspects_list ul > li:first-child"

View file

@ -1341,6 +1341,7 @@ ul#settings_nav
:margin 0 :margin 0
:padding 0 :padding 0
.dull .dull
:color #aaa :color #aaa
:font :font
@ -1506,10 +1507,6 @@ ul.aspects
:-moz-box-shadow 0 1px 3px #333 :-moz-box-shadow 0 1px 3px #333
:box-shadow 0 1px 3px #333 :box-shadow 0 1px 3px #333
:-webkit-border-radius 2px
:-moz-border-radius 2px
:border-radius 2px
:border :border
:bottom 1px solid #ccc :bottom 1px solid #ccc
:top 1px solid #fff :top 1px solid #fff
@ -1615,7 +1612,7 @@ h3 span.current_gs_step
:left 0 :left 0
:width 100% :width 100%
:background :background
:color rgba(16,127,201,0.8) :color rgba(63,143,186,0.8)
:text :text
:align center :align center
@ -1629,7 +1626,7 @@ h3 span.current_gs_step
a a
:color #fafafa :color #fafafa
:background :background
:color rgb(16,127,201) :color $blue
:padding 8px :padding 8px
:-webkit-border-radius 10px :-webkit-border-radius 10px
@ -2393,3 +2390,40 @@ ul.show_comments
#logo #logo
:position relative :position relative
#email_invitation
input
:width 100%
textarea
:width 100%
#share_with
.add_aspect
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
:margin
:top 0.5em
:background
:color #ddd
p
:padding
:left 1em
&.checkbox_select
label
:padding
:left 15px
:top 0
:height 2em
.right
:z-index 5
:top 5px
:right 1em
.done
:padding 1em
.right
:right 1em

View file

@ -156,6 +156,14 @@ describe AspectsController do
response.should redirect_to(:back) response.should redirect_to(:back)
end end
end end
it "adds to aspect if the person_id is present" do
@aspect = @user.aspects.create(:name => "new aspect")
@user.aspects.stub!(:create).and_return(@aspect)
@controller.should_receive(:invite_or_add_contact_to_aspect).with(
anything(), @user2.person, @user.contact_for(@user2.person))
post :create, "aspect" => {"name" => "new aspect", :person_id => @user2.person.id, :share_with => true}
end
end end
describe "#manage" do describe "#manage" do