Fixed broken links in tasks-module. Translated some views into german.

This commit is contained in:
Benjamin Meichsner 2009-02-06 20:51:14 +01:00
parent 85eb27079f
commit 96442477d1
24 changed files with 141 additions and 274 deletions

View file

@ -20,7 +20,8 @@ class Task < ActiveRecord::Base
has_many :users, :through => :assignments
belongs_to :workgroup
named_scope :non_group, :conditions => { :workgroup_id => nil, :done => false }, :order => "due_date ASC"
named_scope :non_group, :conditions => { :workgroup_id => nil, :done => false }
named_scope :done, :conditions => {:done => true}, :order => "due_date ASC"
# form will send user in string. responsibilities will added later
attr_protected :users

View file

@ -181,8 +181,8 @@ class User < ActiveRecord::Base
end
# returns true if user is a member of a given group
def is_member_of(group)
return true if group.users.detect {|user| user == self}
def member_of?(group)
group.users.exists?(self.id)
end
#Returns an array with the users groups (but without the Ordergroups -> because tpye=>"")