From a39818408132dea55b8237f0ca44b04878ade13c Mon Sep 17 00:00:00 2001 From: zhitomirskiyi Date: Thu, 3 Feb 2011 16:52:43 -0800 Subject: [PATCH] WIP --- app/views/users/getting_started.html.haml | 18 +++--- .../users/getting_started/_step_1.html.haml | 13 +++- .../users/getting_started/_step_2.html.haml | 61 +------------------ .../users/getting_started/_step_3.html.haml | 54 +++++++++++++++- config/locales/diaspora/en.yml | 4 +- features/signs_up.feature | 12 ++-- 6 files changed, 81 insertions(+), 81 deletions(-) diff --git a/app/views/users/getting_started.html.haml b/app/views/users/getting_started.html.haml index ec53b5db3..6c405dac2 100644 --- a/app/views/users/getting_started.html.haml +++ b/app/views/users/getting_started.html.haml @@ -26,23 +26,23 @@ %h3{:style => "text-align:right;"} - if @step != 1 - = link_to t('.edit_profile'), getting_started_path(:step => 1) + = link_to t('.connect_services'), getting_started_path(:step => 1) + - else + %span.current_gs_step + = t('.connect_services') + %br + - if @step != 2 + = link_to t('.edit_profile'), getting_started_path(:step => 2) - else %span.current_gs_step = t('.edit_profile') %br - - if @step != 2 - = link_to t('.define_aspects'), getting_started_path(:step => 2) + - if @step != 3 + = link_to t('.define_aspects'), getting_started_path(:step => 3) - else %span.current_gs_step = t('.define_aspects') %br - - if @step != 3 - = link_to t('.connect_services'), getting_started_path(:step => 3) - - else - %span.current_gs_step - = t('.connect_services') - %br - if @step != 4 = link_to t('.finished'), getting_started_path(:step => 4) - else diff --git a/app/views/users/getting_started/_step_1.html.haml b/app/views/users/getting_started/_step_1.html.haml index fc786edca..8a92c6d2c 100644 --- a/app/views/users/getting_started/_step_1.html.haml +++ b/app/views/users/getting_started/_step_1.html.haml @@ -2,7 +2,14 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -- content_for :submit_block do - = submit_tag "#{t('users.getting_started.save_and_continue')} →" -= render :partial => 'people/edit' + +%h3 + = t('.your_services') + .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" diff --git a/app/views/users/getting_started/_step_2.html.haml b/app/views/users/getting_started/_step_2.html.haml index b4d593674..fc786edca 100644 --- a/app/views/users/getting_started/_step_2.html.haml +++ b/app/views/users/getting_started/_step_2.html.haml @@ -1,63 +1,8 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -- content_for :head do - = include_javascripts :aspects -%h3 - = t('.your_aspects') - .description - = t('.description') - --if @requests.size > 0 - %h3 - = t('.your_inviter') - - %h3 - %ul.dropzone - - if @requests.size < 1 - %li=t('.no_requests') - - else - - for request in @requests - %li.person.request{:data=>{:guid=>request.id, :person_id=>request.sender.id}} - = person_image_link(request.sender) - .requests - %p= "#{t('.drag_to_add')} =>" - - -%ul#aspect_list - - for aspect in @all_aspects - %li.aspect{:data=>{:guid=>aspect.id}} - - .aspect_name - %span.edit_name_field - %h3{:contenteditable=>true} - = aspect.name - %span.tip click to edit - - %ul.tools - %li!= remove_link(aspect) - - %ul.dropzone{:data=>{:aspect_id=>aspect.id}} - -for contact in aspect.contacts - %li.person{:data=>{:guid=>contact.person.id, :aspect_id=>aspect.id}} - .delete - .x - X - .circle - = person_image_link(contact.person) -%h4 - = t('.aspect_name') - = form_for Aspect.new do |aspect| - = aspect.text_field :name, :id => "step-2-aspect-name", :style => "display:inline;" - %p.checkbox_select - = aspect.label :contacts_visible, t('aspects.edit.make_aspect_list_visible') - = aspect.check_box :contacts_visible, :default => true - %br - = aspect.submit t('.add') -%br -%br - -.submit_block - = link_to "#{t('users.getting_started.save_and_continue')} →", getting_started_path(:step => 3), :class => "button" +- content_for :submit_block do + = submit_tag "#{t('users.getting_started.save_and_continue')} →" += render :partial => 'people/edit' diff --git a/app/views/users/getting_started/_step_3.html.haml b/app/views/users/getting_started/_step_3.html.haml index f94ff7dfd..8ff298d55 100644 --- a/app/views/users/getting_started/_step_3.html.haml +++ b/app/views/users/getting_started/_step_3.html.haml @@ -1,14 +1,62 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. - +- content_for :head do + = include_javascripts :aspects %h3 - = t('.your_services') + = t('.your_aspects') .description = t('.description') -= render 'shared/add_remove_services' +-if @requests.size > 0 + %h3 + = t('.your_inviter') + + %h3 + %ul.dropzone + - if @requests.size < 1 + %li=t('.no_requests') + - else + - for request in @requests + %li.person.request{:data=>{:guid=>request.id, :person_id=>request.sender.id}} + = person_image_link(request.sender) + .requests + %p= "#{t('.drag_to_add')} =>" + + +%ul#aspect_list + - for aspect in @all_aspects + %li.aspect{:data=>{:guid=>aspect.id}} + + .aspect_name + %span.edit_name_field + %h3{:contenteditable=>true} + = aspect.name + %span.tip click to edit + + %ul.tools + %li!= remove_link(aspect) + + %ul.dropzone{:data=>{:aspect_id=>aspect.id}} + -for contact in aspect.contacts + %li.person{:data=>{:guid=>contact.person.id, :aspect_id=>aspect.id}} + .delete + .x + X + .circle + = person_image_link(contact.person) +%h4 + = t('.aspect_name') + = form_for Aspect.new do |aspect| + = aspect.text_field :name, :id => "step-3-aspect-name", :style => "display:inline;" + %p.checkbox_select + = aspect.label :contacts_visible, t('aspects.edit.make_aspect_list_visible') + = aspect.check_box :contacts_visible, :default => true + %br + = aspect.submit t('.add') +%br +%br .submit_block = link_to "#{t('users.getting_started.save_and_continue')} →", getting_started_path(:step => 4), :class => "button" diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 096f1a502..809560c6e 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -235,7 +235,7 @@ en: finished: "Finished!" skip: "skip getting started" save_and_continue: "Save and continue" - step_2: + 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" @@ -243,7 +243,7 @@ en: 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_3: + 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: diff --git a/features/signs_up.feature b/features/signs_up.feature index 2d9018c49..b70911dff 100644 --- a/features/signs_up.feature +++ b/features/signs_up.feature @@ -12,22 +12,22 @@ Feature: new user registration And I should see "Welcome to Diaspora!" Scenario: new user goes through the setup wizard + Then I should see "Your services" + When I follow "Save and continue" + And I wait for "step 2" to load + When I fill in "profile_first_name" with "O" And I fill in "profile_last_name" with "Hai" And I fill in "profile_gender" with "guess!" And I press "Save and continue" - And I wait for "step 2" to load + And I wait for "step 3" to load Then I should see "Profile updated" And I should see "Your aspects" - When I fill in "step-2-aspect-name" with "cheez friends" + When I fill in "step-3-aspect-name" with "cheez friends" And I press "Add" Then I should see "cheez friends" - When I follow "Save and continue" - And I wait for "step 3" to load - Then I should see "Your services" - When I follow "Save and continue" And I wait for "step 4" to load Then I should see "You're all set up, O!"