Adds "tracker-[id]" CSS class to issues (#13309).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11509 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
6803d95a32
commit
a140a03a35
|
@ -955,7 +955,7 @@ class Issue < ActiveRecord::Base
|
|||
|
||||
# Returns a string of css classes that apply to the issue
|
||||
def css_classes
|
||||
s = "issue status-#{status_id} #{priority.try(:css_classes)}"
|
||||
s = "issue tracker-#{tracker_id} status-#{status_id} #{priority.try(:css_classes)}"
|
||||
s << ' closed' if closed?
|
||||
s << ' overdue' if overdue?
|
||||
s << ' child' if child?
|
||||
|
|
|
@ -1913,6 +1913,12 @@ class IssueTest < ActiveSupport::TestCase
|
|||
assert_equal [Journal.find(1), Journal.find(2)], Issue.find(1).journals_after('')
|
||||
end
|
||||
|
||||
def test_css_classes_should_include_tracker
|
||||
issue = Issue.new(:tracker => Tracker.find(2))
|
||||
classes = issue.css_classes.split(' ')
|
||||
assert_include 'tracker-2', classes
|
||||
end
|
||||
|
||||
def test_css_classes_should_include_priority
|
||||
issue = Issue.new(:priority => IssuePriority.find(8))
|
||||
classes = issue.css_classes.split(' ')
|
||||
|
|
Loading…
Reference in New Issue