save and continue buttons on getting_started#1 and getting_started#2. raise fields
This commit is contained in:
parent
ec141a2019
commit
ea46fa8fd8
6 changed files with 105 additions and 36 deletions
|
|
@ -40,7 +40,12 @@ class UsersController < ApplicationController
|
|||
flash[:error] = "Failed to update profile"
|
||||
end
|
||||
end
|
||||
|
||||
if params[:getting_started]
|
||||
redirect_to getting_started_path(params[:getting_started].to_i+1)
|
||||
else
|
||||
redirect_to edit_user_path(@user)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -49,9 +49,6 @@
|
|||
|
||||
=will_paginate @photos
|
||||
|
||||
|
||||
|
||||
|
||||
.submit_block
|
||||
= link_to t('.cancel'), edit_user_path(current_user)
|
||||
= t('.or')
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
Do the stuff below to further complete some things.
|
||||
|
||||
%h3
|
||||
= link_to "Edit your profile", getting_started_path(1)
|
||||
= link_to "Edit your profile", getting_started_path(1), :class => 'selected'
|
||||
%br
|
||||
= link_to "Define your aspects", getting_started_path(2)
|
||||
%br
|
||||
|
|
@ -18,5 +18,56 @@
|
|||
%br
|
||||
|
||||
.span-15.last
|
||||
= render 'users/profile'
|
||||
.floating
|
||||
= form_for @user do |user|
|
||||
%h3
|
||||
Your Profile
|
||||
.description
|
||||
This info will be available to whomever you connect with on Diaspora.
|
||||
|
||||
= user.error_messages
|
||||
|
||||
= user.fields_for :profile do |profile|
|
||||
%h4
|
||||
Your name
|
||||
= profile.text_field :first_name, :value => @profile.first_name, :placeholder => "First name"
|
||||
= profile.text_field :last_name, :value => @profile.last_name, :placeholder => "Last name"
|
||||
|
||||
%h4
|
||||
Your birthday
|
||||
%br
|
||||
= select_date Time.now, :order => [:month, :day, :year]
|
||||
|
||||
%h4
|
||||
Your bio
|
||||
= profile.text_area :bio, :value => @profile.bio, :rows => 5, :placeholder => "Fill me out"
|
||||
|
||||
%h4
|
||||
Your photo
|
||||
%div#image_picker
|
||||
= profile.hidden_field :image_url, :value => (@profile.image_url if @profile.image_url), :id => 'image_url_field'
|
||||
|
||||
- unless @photos.nil? || @photos.empty?
|
||||
- for photo in @photos
|
||||
- if @profile.image_url && @profile.image_url.include?(photo.url(:thumb_medium))
|
||||
%div.small_photo{:id => photo.url(:thumb_medium), :class=>'selected'}
|
||||
= check_box_tag 'checked_photo', true, true
|
||||
= link_to image_tag(photo.url(:thumb_medium)), "#"
|
||||
- else
|
||||
%div.small_photo{:id => photo.url(:thumb_medium)}
|
||||
= check_box_tag 'checked_photo'
|
||||
= link_to image_tag(photo.url(:thumb_medium)), "#"
|
||||
|
||||
- else
|
||||
=t('.you_dont_have_any_photos')
|
||||
= link_to t('.albums'), albums_path(:aspect => 'all')
|
||||
=t('.page_to_upload_some')
|
||||
|
||||
=will_paginate @photos
|
||||
|
||||
= hidden_field_tag :getting_started, 1
|
||||
|
||||
|
||||
.submit_block
|
||||
= user.submit "Save and continue →"
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
.description
|
||||
Do the stuff below to further complete some things.
|
||||
|
||||
%h3
|
||||
%h3.nav
|
||||
= link_to "Edit your profile", getting_started_path(1)
|
||||
%br
|
||||
= link_to "Define your aspects", getting_started_path(2)
|
||||
|
|
@ -31,6 +31,7 @@
|
|||
%br
|
||||
|
||||
.span-15.last
|
||||
.floating
|
||||
%h3
|
||||
Your aspects
|
||||
%p
|
||||
|
|
@ -50,7 +51,7 @@
|
|||
- for friend in aspect.people
|
||||
= person_image_link(friend)
|
||||
|
||||
= link_to (image_tag('add_friend_button.png', :title => "add to #{@aspect}")), "#add_request_pane", :class => 'add_request_button'
|
||||
= link_to (image_tag('add_friend_button.png', :title => "add to #{aspect}")), "#add_request_pane", :class => 'add_request_button'
|
||||
|
||||
.fancybox_content
|
||||
#add_request_pane
|
||||
|
|
@ -58,3 +59,8 @@
|
|||
|
||||
= link_to "x", aspect_path(aspect), :confirm => "are you sure?", :method => :delete, :remote => true, :class => "delete right"
|
||||
|
||||
%br
|
||||
%br
|
||||
|
||||
.submit_block
|
||||
= link_to "Save and continue →", getting_started_path(3), :class => "button"
|
||||
|
|
|
|||
|
|
@ -16,24 +16,23 @@
|
|||
= link_to "Define your aspects", getting_started_path(2)
|
||||
%br
|
||||
= link_to "Connect your services", getting_started_path(3)
|
||||
%br
|
||||
|
||||
.span-15.last
|
||||
.floating
|
||||
%h3
|
||||
Your friends
|
||||
.description
|
||||
Find your friends on Diaspora, Facebook, or send them an invite via email.
|
||||
|
||||
.span-5.last
|
||||
%h4
|
||||
On Diaspora
|
||||
= text_field_tag :diaspora_handle, nil, :placeholder => "Diaspora handle"
|
||||
|
||||
.span-5.last
|
||||
%h4
|
||||
On Facebook
|
||||
= text_field_tag :facebook_handle, nil, :placeholder => "Name"
|
||||
|
||||
.span-5.last
|
||||
%h4
|
||||
Invite
|
||||
= text_field_tag :email, nil, :placeholder => "Email", :type => "email"
|
||||
|
|
|
|||
|
|
@ -1266,7 +1266,7 @@ ul.aspects
|
|||
:size 24px
|
||||
|
||||
> li
|
||||
:padding 12px
|
||||
:padding 12px 0
|
||||
:border
|
||||
:bottom 1px solid #eee
|
||||
|
||||
|
|
@ -1293,3 +1293,14 @@ ul.aspects
|
|||
|
||||
.inline
|
||||
:display inline
|
||||
|
||||
.floating
|
||||
:padding 12px
|
||||
:background
|
||||
:color rgb(254,254,254)
|
||||
:-webkit-box-shadow 0 1px 3px #333
|
||||
:border-radius 2px
|
||||
:border
|
||||
:bottom 1px solid #ccc
|
||||
:top 1px solid #fff
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue