Various changes on views. On project summary, members are now grouped by role and subprojects are listed inline.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@434 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -26,6 +26,10 @@ class Role < ActiveRecord::Base
|
||||
validates_uniqueness_of :name
|
||||
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
|
||||
|
||||
def <=>(role)
|
||||
position <=> role.position
|
||||
end
|
||||
|
||||
private
|
||||
def check_integrity
|
||||
raise "Can't delete role" if Member.find(:first, :conditions =>["role_id=?", self.id])
|
||||
|
||||
+5
-1
@@ -141,7 +141,11 @@ class User < ActiveRecord::Base
|
||||
token = Token.find_by_value(key)
|
||||
token && token.user.active? ? token.user : nil
|
||||
end
|
||||
|
||||
|
||||
def <=>(user)
|
||||
lastname <=> user.lastname
|
||||
end
|
||||
|
||||
private
|
||||
# Return password digest
|
||||
def self.hash_password(clear_password)
|
||||
|
||||
Reference in New Issue
Block a user