patch-15900-2.diff

Go MAEDA, 2014-06-25 14:23

Download (1.84 KB)

View differences:

app/models/issue.rb (working copy)
1093 1093
    s << ' child' if child?
1094 1094
    s << ' parent' unless leaf?
1095 1095
    s << ' private' if is_private?
1096
    s << ' has_attachments' if attachments.present?
1096 1097
    if user.logged?
1097 1098
      s << ' created-by-me' if author_id == user.id
1098 1099
      s << ' assigned-to-me' if assigned_to_id == user.id
public/stylesheets/application.css (working copy)
168 168
tr.issue.idnt-8 td.subject {padding-left: 11em;}
169 169
tr.issue.idnt-9 td.subject {padding-left: 12.5em;}
170
tr.issue.has_attachments td.subject a:after {content: ''; padding-right: 18px; background: url(../images/attachment.png) no-repeat right;}
171

  
170 172
table.issue-report {table-layout:fixed;}
171 173
tr.entry { border: 1px solid #f8f8f8; }
test/unit/issue_test.rb (working copy)
2279 2279
    assert_include 'assigned-to-me', issue2.css_classes(user)
2280 2280
  end
2281
  def test_css_classes_should_include_attachments
2282
    set_tmp_attachments_directory
2283
    issue = Issue.generate!
2284
    assert_not_include 'has_attachments', issue.css_classes.split(' ')
2285
    issue.save_attachments({
2286
      '1' => {'file' => mock_file_with_options(:original_filename => 'foo')}
2287
    })
2288
    issue.attach_saved_attachments
2289
    assert_include 'has_attachments', issue.css_classes.split(' ')
2290
  end
2291

  
2281 2292
  def test_save_attachments_with_hash_should_save_attachments_in_keys_order
2282 2293
    set_tmp_attachments_directory
2283 2294
    issue = Issue.generate!