diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb index 4a10821aa..0f07640fb 100644 --- a/app/controllers/requests_controller.rb +++ b/app/controllers/requests_controller.rb @@ -44,7 +44,12 @@ class RequestsController < ApplicationController else raise e end - respond_with :location => aspect + + if params[:getting_started] + redirect_to getting_started_path(params[:getting_started]) + else + respond_with :location => aspect + end return end diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb index 7c5da42a7..d5fd50c83 100644 --- a/app/controllers/services_controller.rb +++ b/app/controllers/services_controller.rb @@ -31,7 +31,6 @@ class ServicesController < ApplicationController :uid => auth['uid']) end - flash[:notice] = "Authentication successful." redirect_to services_url end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index fb1fa8e70..9e1f9dd91 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -61,8 +61,9 @@ class UsersController < ApplicationController @person = @user.person @profile = current_user.profile @photos = current_user.visible_posts(:person_id => current_user.person.id, :_type => 'Photo').paginate :page => params[:page], :order => 'created_at DESC' + @services = current_user.services - if params[:id].to_i < 4 + if params[:id].to_i < 5 render "users/getting_started/#{params[:id]}" else render "users/getting_started/1" diff --git a/app/views/people/edit.html.haml b/app/views/people/edit.html.haml index 4e657eddf..11a3986f5 100644 --- a/app/views/people/edit.html.haml +++ b/app/views/people/edit.html.haml @@ -29,7 +29,7 @@ %h4 Your birthday %br - = select_date Time.now, :order => [:month, :day, :year] + = date_select person, :birthday, :order => [:month, :day, :year], :start_year => 1930, :end_year => Time.now.year %h4 Your bio diff --git a/app/views/requests/_new_request.haml b/app/views/requests/_new_request.haml index 11e6f73c2..1f7355d2a 100644 --- a/app/views/requests/_new_request.haml +++ b/app/views/requests/_new_request.haml @@ -11,10 +11,6 @@ - if @friends_not_in_aspect = render('shared/add_friend_dropdown', :aspect => aspect, :friends => @friends_not_in_aspect) - - - - = form_for Request.new do |fr_request| = fr_request.error_messages @@ -26,5 +22,9 @@ = fr_request.label :destination_url, t(".friends_username") = fr_request.text_field :destination_url = fr_request.hidden_field :aspect_id, :value => aspect.id + + - if defined?(getting_started) + = hidden_field_tag :getting_started, getting_started + = fr_request.submit diff --git a/app/views/users/getting_started/1.html.haml b/app/views/users/getting_started/1.html.haml index 8bb35efd4..ca743df5f 100644 --- a/app/views/users/getting_started/1.html.haml +++ b/app/views/users/getting_started/1.html.haml @@ -36,7 +36,7 @@ %h4 Your birthday %br - = select_date Time.now, :order => [:month, :day, :year] + = date_select person, :birthday, :order => [:month, :day, :year], :start_year => 1930, :end_year => Time.now.year %h4 Your bio @@ -71,3 +71,6 @@ .submit_block = person.submit "Save and continue →" +/.bottom_notification +/ .blue_button +/ SKIP diff --git a/app/views/users/getting_started/2.html.haml b/app/views/users/getting_started/2.html.haml index 3e7fe3175..ffb7e5cc8 100644 --- a/app/views/users/getting_started/2.html.haml +++ b/app/views/users/getting_started/2.html.haml @@ -34,13 +34,13 @@ .floating %h3 Your aspects - %p - Diaspora aspects are mappings of your real-life aspects. + .description + Diaspora aspects are mappings of your real-life aspects. You can manage these later by clicking the manage tab on the top right. %h4 Aspect name - form_for Aspect.new, :remote => true do |aspect| - = aspect.text_field :name + = aspect.text_field :name, :style => "display:inline;" = aspect.submit "Add" %ul.aspects @@ -55,7 +55,7 @@ .fancybox_content #add_request_pane - = render "requests/new_request", :aspect => aspect + = render "requests/new_request", :aspect => aspect, :getting_started => 2 = link_to "x", aspect_path(aspect), :confirm => "are you sure?", :method => :delete, :remote => true, :class => "delete right" diff --git a/app/views/users/getting_started/3.html.haml b/app/views/users/getting_started/3.html.haml index 65fae6637..13725bfc4 100644 --- a/app/views/users/getting_started/3.html.haml +++ b/app/views/users/getting_started/3.html.haml @@ -6,7 +6,7 @@ .span-8.append-1.last %h1{:style => "text-align:right;"} - = "Welcome!" + = "Welcome to Diaspora!" .description Do the stuff below to further complete some things. @@ -20,19 +20,18 @@ .span-15.last .floating - %h3 - Your friends - .description - Find your friends on Diaspora, Facebook, or send them an invite via email. + %h3 Your services + %ul#stream + - for service in @services + %h3 + %b= service.provider + logged in as + %b + = service.nickname + = link_to "disconnect", service, :confirm => "disconnect #{service.provider}?", :method => :delete - %h4 - On Diaspora - = text_field_tag :diaspora_handle, nil, :placeholder => "Diaspora handle" + %h4= link_to "Connect to twitter", "/auth/twitter" if SERVICES['twitter']['consumer_key']!= "" + %h4= link_to "Connect to facebook", "/auth/facebook" if SERVICES['facebook']['app_id'] !="" - %h4 - On Facebook - = text_field_tag :facebook_handle, nil, :placeholder => "Name" - - %h4 - Invite - = text_field_tag :email, nil, :placeholder => "Email", :type => "email" + .submit_block + = link_to "Save and continue →", getting_started_path(4), :class => "button" diff --git a/app/views/users/getting_started/4.html.haml b/app/views/users/getting_started/4.html.haml new file mode 100644 index 000000000..a1cfef842 --- /dev/null +++ b/app/views/users/getting_started/4.html.haml @@ -0,0 +1,27 @@ +-# Copyright (c) 2010, Diaspora Inc. This file is +-# licensed under the Affero General Public License version 3 or later. See +-# the COPYRIGHT file. + + + +.span-8.append-1.last + %h1{:style => "text-align:right;"} + = "Welcome to Diaspora!" + .description + Do the stuff below to further complete some things. + + %h3{:style => "text-align:right;"} + = link_to "Edit your profile", getting_started_path(1) + %br + = link_to "Define your aspects", getting_started_path(2) + %br + = link_to "Connect your services", getting_started_path(3) + %br + +.span-15.last + .floating + %h1 + You're all set up! + %h3 + = link_to "Continue on to your everyone page, an overview of all of your aspects.", root_path + diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 8e6b2af86..6860a7301 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -1300,10 +1300,28 @@ ul.aspects .floating :padding 12px :background - :color rgb(254,254,254) + :color rgb(255,255,255) :-webkit-box-shadow 0 1px 3px #333 :border-radius 2px :border :bottom 1px solid #ccc :top 1px solid #fff + + +.bottom_notification + :position fixed + :bottom 0 + :left 0 + :width 100% + :background + :color rgba(16,127,201,0.8) + + :text + :align center + :font + :size 16px + :weight bold + :color #fff + :padding 21px + diff --git a/public/stylesheets/sass/ui.sass b/public/stylesheets/sass/ui.sass index e064b3fcf..ff4b3c099 100644 --- a/public/stylesheets/sass/ui.sass +++ b/public/stylesheets/sass/ui.sass @@ -10,7 +10,7 @@ :display inline - :padding 4px + :padding 5px :font-size 12px :line-height 100% @@ -27,9 +27,9 @@ :left 1px solid #ccc :right 1px solid #ccc - :border-radius 3px - :-moz-border-radius 3px - :-webkit-border-radius 3px + :border-radius 8px + :-moz-border-radius 8px + :-webkit-border-radius 8px :cursor pointer