summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-04-25 11:28:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-04-25 11:28:48 +0000
commit32c09fd5cfe4a5973cc52b298d7cd193e3981240 (patch)
treedb0304969d7d9009e2d53db1b62bed773a3c208f /app/models
parent8887b6f3d3359c5e20ad4691dd6cfaddc4e9a4a5 (diff)
downloadredmine-32c09fd5cfe4a5973cc52b298d7cd193e3981240.tar.gz
redmine-32c09fd5cfe4a5973cc52b298d7cd193e3981240.zip
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
Diffstat (limited to 'app/models')
-rw-r--r--app/models/issue.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index c3627ddb2..23035b927 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -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