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