Project

General

Profile

Feature #15900 » patch-15900-2.diff

Go MAEDA, 2014-06-25 14:23

View differences:

app/models/issue.rb (working copy)
s << ' child' if child?
s << ' parent' unless leaf?
s << ' private' if is_private?
s << ' has_attachments' if attachments.present?
if user.logged?
s << ' created-by-me' if author_id == user.id
s << ' assigned-to-me' if assigned_to_id == user.id
public/stylesheets/application.css (working copy)
tr.issue.idnt-8 td.subject {padding-left: 11em;}
tr.issue.idnt-9 td.subject {padding-left: 12.5em;}
tr.issue.has_attachments td.subject a:after {content: ''; padding-right: 18px; background: url(../images/attachment.png) no-repeat right;}
table.issue-report {table-layout:fixed;}
tr.entry { border: 1px solid #f8f8f8; }
test/unit/issue_test.rb (working copy)
assert_include 'assigned-to-me', issue2.css_classes(user)
end
def test_css_classes_should_include_attachments
set_tmp_attachments_directory
issue = Issue.generate!
assert_not_include 'has_attachments', issue.css_classes.split(' ')
issue.save_attachments({
'1' => {'file' => mock_file_with_options(:original_filename => 'foo')}
})
issue.attach_saved_attachments
assert_include 'has_attachments', issue.css_classes.split(' ')
end
def test_save_attachments_with_hash_should_save_attachments_in_keys_order
set_tmp_attachments_directory
issue = Issue.generate!
(5-5/7)