Project

General

Profile

Feature #15900 » patch-15900-3.diff

patch against r14624 - Go MAEDA, 2015-09-28 11:32

View differences:

app/models/issue.rb (working copy)
1223 1223
    s << ' child' if child?
1224 1224
    s << ' parent' unless leaf?
1225 1225
    s << ' private' if is_private?
1226
    s << ' has_attachments' if attachments.present?
1226 1227
    if user.logged?
1227 1228
      s << ' created-by-me' if author_id == user.id
1228 1229
      s << ' assigned-to-me' if assigned_to_id == user.id
public/stylesheets/application.css (working copy)
171 171
tr.issue.idnt-8 td.subject {padding-left: 11em;}
172 172
tr.issue.idnt-9 td.subject {padding-left: 12.5em;}
173 173

  
174
tr.issue.has_attachments td.subject a:after {content: ''; padding-right: 18px; background: url(../images/attachment.png) no-repeat right;}
175

  
174 176
table.issue-report {table-layout:fixed;}
175 177

  
176 178
tr.entry { border: 1px solid #f8f8f8; }
test/unit/issue_test.rb (working copy)
2484 2484
    assert_include 'assigned-to-me', issue2.css_classes(user)
2485 2485
  end
2486 2486

  
2487
  def test_css_classes_should_include_attachments
2488
    set_tmp_attachments_directory
2489
    issue = Issue.generate!
2490
    assert_not_include 'has_attachments', issue.css_classes.split(' ')
2491
    issue.save_attachments({
2492
      '1' => {'file' => mock_file_with_options(:original_filename => 'foo')}
2493
    })
2494
    issue.attach_saved_attachments
2495
    assert_include 'has_attachments', issue.css_classes.split(' ')
2496
  end
2497

  
2487 2498
  def test_save_attachments_with_hash_should_save_attachments_in_keys_order
2488 2499
    set_tmp_attachments_directory
2489 2500
    issue = Issue.generate!
(6-6/7)