diff --git a/app/models/issue.rb b/app/models/issue.rb index 507574de7..4396fa8a0 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1360,6 +1360,7 @@ class Issue < ActiveRecord::Base s << ' child' if child? s << ' parent' unless leaf? s << ' private' if is_private? + s << ' behind-schedule' if behind_schedule? if user.logged? s << ' created-by-me' if author_id == user.id s << ' assigned-to-me' if assigned_to_id == user.id diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 58f413964..e288526ee 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -234,6 +234,7 @@ table.list td.buttons img, div.buttons img {vertical-align:middle;} table.list td.reorder {width:15%; white-space:nowrap; text-align:center; } table.list table.progress td {padding-right:0px;} table.list caption { text-align: left; padding: 0.5em 0.5em 0.5em 0; } +table.list tr.behind-schedule td.due_date { color: #f66914; } table.list tr.overdue td.due_date { color: #c22; } #role-permissions-trackers table.list th {white-space:normal;} @@ -504,6 +505,7 @@ div.issue .attributes {margin-top: 2em;} div.issue .attributes .attribute {padding-left:180px; clear:left; min-height: 1.8em;} div.issue .attributes .attribute .label {width: 170px; margin-left:-180px; font-weight:bold; float:left; overflow:hidden; text-overflow: ellipsis;} div.issue .attribute .value {overflow:auto; text-overflow: ellipsis;} +div.issue.behind-schedule .due-date .value { color: #f66b14; } div.issue.overdue .due-date .value { color: #c22; } #issue_tree table.issues, #relations table.issues { border: 0; } diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index c05e1152f..91138766b 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -2950,6 +2950,11 @@ class IssueTest < ActiveSupport::TestCase assert_include 'assigned-to-me', issue2.css_classes(user) end + def test_css_classes_behind_schedule + assert_include 'behind-schedule', Issue.find(1).css_classes.split(' ') + assert_not_include 'behind-schedule', Issue.find(2).css_classes.split(' ') + end + def test_save_attachments_with_hash_should_save_attachments_in_keys_order set_tmp_attachments_directory issue = Issue.generate!