Commit ee6c2de7 authored by jplang's avatar jplang

Adds "tracker-[id]" CSS class to issues (#13309).

git-svn-id: https://svn.redmine.org/redmine/trunk@11509 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent dc6e9255
......@@ -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(' ')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment