DG MS some fixes for getting started

This commit is contained in:
maxwell 2010-12-04 23:05:47 -08:00
parent 23c446c8bf
commit 0a8af9e72b
3 changed files with 17 additions and 7 deletions

View file

@ -51,7 +51,11 @@ class AspectsController < ApplicationController
flash[:error] = e.message flash[:error] = e.message
end end
respond_with :location => aspects_manage_path if current_user.getting_started
redirect_to :back
else
respond_with :location => aspects_manage_path
end
end end
def show def show

View file

@ -68,10 +68,13 @@ class PeopleController < ApplicationController
raw_image = params[:person][:profile].delete(:image) raw_image = params[:person][:profile].delete(:image)
params[:profile_image_hash] = { :user_file => raw_image, :to => "all" } params[:profile_image_hash] = { :user_file => raw_image, :to => "all" }
photo = current_user.post(:photo, params[:profile_image_hash]) photo = current_user.build_post(:photo, params[:profile_image_hash])
params[:person][:profile][:image_url] = photo.url(:thumb_large) if photo.save!
params[:person][:profile][:image_url_medium] = photo.url(:thumb_medium)
params[:person][:profile][:image_url_small] = photo.url(:thumb_small) params[:person][:profile][:image_url] = photo.url(:thumb_large)
params[:person][:profile][:image_url_medium] = photo.url(:thumb_medium)
params[:person][:profile][:image_url_small] = photo.url(:thumb_small)
end
end end
if current_user.update_profile params[:person][:profile] if current_user.update_profile params[:person][:profile]

View file

@ -15,8 +15,11 @@
%b= service.nickname %b= service.nickname
= link_to t('services.index.disconnect'), service, :confirm => t('services.index.really_disconnect', :service => service.provider), :method => :delete = link_to t('services.index.disconnect'), service, :confirm => t('services.index.really_disconnect', :service => service.provider), :method => :delete
%h4= link_to t('services.index.connect_to_twitter'), "/auth/twitter" if SERVICES['twitter']['consumer_key']!= "" - unless @services.any?{|x| x.provider == 'twitter'}
%h4= link_to t('services.index.connect_to_facebook'), "/auth/facebook" if SERVICES['facebook']['app_id'] !="" %h4= link_to t('services.index.connect_to_twitter'), "/auth/twitter" if SERVICES['twitter']['consumer_key']!= ""
- unless @services.any?{|x| x.provider == 'facebook'}
%h4= link_to t('services.index.connect_to_facebook'), "/auth/facebook" if SERVICES['facebook']['app_id'] !=""
.submit_block .submit_block
= link_to "#{t('users.getting_started.save_and_continue')} →", getting_started_path(:step => 4), :class => "button" = link_to "#{t('users.getting_started.save_and_continue')} →", getting_started_path(:step => 4), :class => "button"