diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-03-20 08:02:21 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-03-20 08:02:21 +0000 |
commit | e63bf1d5970cec0e63029dd1deb36539fc844dae (patch) | |
tree | 90b2502251ac4afb433f74f11c8502593d186cad /app/models/version.rb | |
parent | 09197a22e2f6305c8115be959eb87323697d6ec2 (diff) | |
download | redmine-e63bf1d5970cec0e63029dd1deb36539fc844dae.tar.gz redmine-e63bf1d5970cec0e63029dd1deb36539fc844dae.zip |
Additional CSS class for version status (#21434).
git-svn-id: http://svn.redmine.org/redmine/trunk@15270 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version.rb')
-rw-r--r-- | app/models/version.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index dfa8af1ee..ad3d816fb 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -197,6 +197,13 @@ class Version < ActiveRecord::Base end end + def css_classes + [ + completed? ? 'version-completed' : 'version-incompleted', + "version-#{status}" + ].join(' ') + end + def self.fields_for_order_statement(table=nil) table ||= table_name ["(CASE WHEN #{table}.effective_date IS NULL THEN 1 ELSE 0 END)", "#{table}.effective_date", "#{table}.name", "#{table}.id"] |