@@ -46,7 +46,9 class UsersController < ApplicationController | |||||
46 | :limit => @user_pages.items_per_page, |
|
46 | :limit => @user_pages.items_per_page, | |
47 | :offset => @user_pages.current.offset |
|
47 | :offset => @user_pages.current.offset | |
48 |
|
48 | |||
49 | render :layout => !request.xhr? |
|
49 | respond_to do |format| | |
|
50 | format.html { render :layout => !request.xhr? } | |||
|
51 | end | |||
50 | end |
|
52 | end | |
51 |
|
53 | |||
52 | def show |
|
54 | def show | |
@@ -64,8 +66,10 class UsersController < ApplicationController | |||||
64 | return |
|
66 | return | |
65 | end |
|
67 | end | |
66 | end |
|
68 | end | |
67 | render :layout => 'base' |
|
|||
68 |
|
69 | |||
|
70 | respond_to do |format| | |||
|
71 | format.html { render :layout => 'base' } | |||
|
72 | end | |||
69 | rescue ActiveRecord::RecordNotFound |
|
73 | rescue ActiveRecord::RecordNotFound | |
70 | render_404 |
|
74 | render_404 | |
71 | end |
|
75 | end | |
@@ -98,15 +102,23 class UsersController < ApplicationController | |||||
98 | @user.notified_project_ids = (params[:notification_option] == 'selected' ? params[:notified_project_ids] : []) |
|
102 | @user.notified_project_ids = (params[:notification_option] == 'selected' ? params[:notified_project_ids] : []) | |
99 |
|
103 | |||
100 | Mailer.deliver_account_information(@user, params[:password]) if params[:send_information] |
|
104 | Mailer.deliver_account_information(@user, params[:password]) if params[:send_information] | |
|
105 | ||||
|
106 | respond_to do |format| | |||
|
107 | format.html { | |||
101 | flash[:notice] = l(:notice_successful_create) |
|
108 | flash[:notice] = l(:notice_successful_create) | |
102 |
redirect_to(params[:continue] ? |
|
109 | redirect_to(params[:continue] ? | |
103 |
|
|
110 | {:controller => 'users', :action => 'new'} : | |
104 | return |
|
111 | {:controller => 'users', :action => 'edit', :id => @user} | |
|
112 | ) | |||
|
113 | } | |||
|
114 | end | |||
105 | else |
|
115 | else | |
106 | @auth_sources = AuthSource.find(:all) |
|
116 | @auth_sources = AuthSource.find(:all) | |
107 | @notification_option = @user.mail_notification |
|
117 | @notification_option = @user.mail_notification | |
108 |
|
118 | |||
109 | render :action => 'new' |
|
119 | respond_to do |format| | |
|
120 | format.html { render :action => 'new' } | |||
|
121 | end | |||
110 | end |
|
122 | end | |
111 | end |
|
123 | end | |
112 |
|
124 | |||
@@ -148,13 +160,20 class UsersController < ApplicationController | |||||
148 | elsif @user.active? && params[:send_information] && !params[:password].blank? && @user.auth_source_id.nil? |
|
160 | elsif @user.active? && params[:send_information] && !params[:password].blank? && @user.auth_source_id.nil? | |
149 | Mailer.deliver_account_information(@user, params[:password]) |
|
161 | Mailer.deliver_account_information(@user, params[:password]) | |
150 | end |
|
162 | end | |
|
163 | ||||
|
164 | respond_to do |format| | |||
|
165 | format.html { | |||
151 | flash[:notice] = l(:notice_successful_update) |
|
166 | flash[:notice] = l(:notice_successful_update) | |
152 | redirect_to :back |
|
167 | redirect_to :back | |
|
168 | } | |||
|
169 | end | |||
153 | else |
|
170 | else | |
154 | @auth_sources = AuthSource.find(:all) |
|
171 | @auth_sources = AuthSource.find(:all) | |
155 | @membership ||= Member.new |
|
172 | @membership ||= Member.new | |
156 |
|
173 | |||
157 | render :action => :edit |
|
174 | respond_to do |format| | |
|
175 | format.html { render :action => :edit } | |||
|
176 | end | |||
158 | end |
|
177 | end | |
159 | rescue ::ActionController::RedirectBackError |
|
178 | rescue ::ActionController::RedirectBackError | |
160 | redirect_to :controller => 'users', :action => 'edit', :id => @user |
|
179 | redirect_to :controller => 'users', :action => 'edit', :id => @user |
General Comments 0
You need to be logged in to leave comments.
Login now