Adds more css classes to the roadmap issues (#3214).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2694 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-04-25 11:28:48 +00:00
parent 8887b6f3d3
commit 32c09fd5cf
7 changed files with 15 additions and 17 deletions
+10
View File
@@ -269,6 +269,16 @@ class Issue < ActiveRecord::Base
"#{tracker} ##{id}: #{subject}"
end
# Returns a string of css classes that apply to the issue
def css_classes
s = "issue status-#{status.position} priority-#{priority.position}"
s << ' closed' if closed?
s << ' overdue' if overdue?
s << ' created-by-me' if User.current.logged? && author_id == User.current.id
s << ' assigned-to-me' if User.current.logged? && assigned_to_id == User.current.id
s
end
private
# Callback on attachment deletion