diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 33176298..55d38ad7 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -3,8 +3,7 @@ class UsersController < ApplicationController
skip_before_filter :login_required, :only => [ :new, :create ]
prepend_before_filter :login_optional, :only => [ :new, :create ]
- # GET /users
- # GET /users.xml
+ # GET /users GET /users.xml
def index
@users = User.find(:all, :order => 'login')
respond_to do |format|
@@ -12,18 +11,17 @@ class UsersController < ApplicationController
@page_title = "TRACKS::Manage Users"
@users = User.paginate :page => params[:page], :order => 'login ASC'
@total_users = User.count
- # When we call users/signup from the admin page
- # we store the URL so that we get returned here when signup is successful
+ # When we call users/signup from the admin page we store the URL so that
+ # we get returned here when signup is successful
store_location
end
format.xml { render :xml => @users.to_xml(:except => [ :password ]) }
end
end
- # GET /users/somelogin
- # GET /users/somelogin.xml
+ # GET /users/id GET /users/id.xml
def show
- @user = User.find_by_login(params[:id])
+ @user = User.find_by_id(params[:id])
render :xml => @user.to_xml(:except => [ :password ])
end
@@ -46,13 +44,13 @@ class UsersController < ApplicationController
render :layout => "login"
end
- # Example usage: curl -H 'Accept: application/xml' -H 'Content-Type: application/xml'
+ # Example usage: curl -H 'Accept: application/xml' -H 'Content-Type:
+ # application/xml'
# -u admin:up2n0g00d
# -d '
You have a total of <%= @total_users %> users
-| Login | -Full name | -Authorization type | -Open ID URL | -Total actions | -Total contexts | -Total projects | -Total notes | -+ | Login | +Full name | +Authorization type | +Open ID URL | +Total actions | +Total contexts | +Total projects | +Total notes | +|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%=h user.login %> | -<%=h user.last_name? ? user.display_name : '-' %> | -<%= h user.auth_type %> | -<%= h user.open_id_url || '-' %> | -<%= h user.todos.size %> | -<%= h user.contexts.size %> | -<%= h user.projects.size %> | -<%= h user.notes.size %> | -<%= !user.is_admin? ? link_to_remote( image_tag("blank.png", :title =>"Destroy user", :class=>"delete_item"), {:url => user_path(user), :method => :delete, :confirm => "Warning: this will delete user \'#{user.login}\', all their actions, contexts, project and notes. Are you sure that you want to continue?" }, { :class => "icon" } ) : " " %> | -
- <%= will_paginate @users %> -
- -<%= link_to 'Signup new user', signup_path %>
\ No newline at end of file ++ <%= will_paginate @users %> +
+ +<%= link_to 'Signup new user', signup_path %>
\ No newline at end of file