Display users then groups on project memberships view (#4389).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3161 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
72ceefd36e
commit
21b52d2fd9
|
@ -33,6 +33,11 @@ class Principal < ActiveRecord::Base
|
|||
}
|
||||
|
||||
def <=>(principal)
|
||||
self.to_s.downcase <=> principal.to_s.downcase
|
||||
if self.class.name == principal.class.name
|
||||
self.to_s.downcase <=> principal.to_s.downcase
|
||||
else
|
||||
# groups after users
|
||||
principal.class.name <=> self.class.name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -214,11 +214,6 @@ class User < Principal
|
|||
def self.find_by_mail(mail)
|
||||
find(:first, :conditions => ["LOWER(mail) = ?", mail.to_s.downcase])
|
||||
end
|
||||
|
||||
# Sort users by their display names
|
||||
def <=>(user)
|
||||
self.to_s.downcase <=> user.to_s.downcase
|
||||
end
|
||||
|
||||
def to_s
|
||||
name
|
||||
|
|
Loading…
Reference in New Issue