@users = scope.order(sort_clause).limit(@limit).offset(@offset).to_a
respond_to do |format|
- format.html {
+ format.html do
@groups = Group.givable.sort
render :layout => !request.xhr?
- }
- format.csv {
+ end
+ format.csv do
send_data(users_to_csv(scope.order(sort_clause)), :type => 'text/csv; header=present', :filename => 'users.csv')
- }
+ end
format.api
end
end
}
respond_to do |format|
- format.html {
+ format.html do
events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
@events_by_day = events.group_by {|event| User.current.time_to_date(event.event_datetime)}
render :layout => 'base'
- }
+ end
format.api
end
end
Mailer.deliver_account_information(@user, @user.password) if params[:send_information]
respond_to do |format|
- format.html {
+ format.html do
flash[:notice] = l(:notice_user_successful_create, :id => view_context.link_to(@user.login, user_path(@user)))
if params[:continue]
attrs = {:generate_password => @user.generate_password }
else
redirect_to edit_user_path(@user)
end
- }
+ end
format.api { render :action => 'show', :status => :created, :location => user_url(@user) }
end
else
end
respond_to do |format|
- format.html {
+ format.html do
flash[:notice] = l(:notice_successful_update)
redirect_to_referer_or edit_user_path(@user)
- }
+ end
format.api { render_api_ok }
end
else