Project

General

Profile

Feature #44448 » 0001-Apply-user-current-and-user-mentionable-styles-to-us.patch

Go MAEDA, 2026-09-13 09:44

View differences:

app/views/layouts/mailer.html.erb
13 13
a, a:link, a:visited { color: #1864ab; /* oc-blue-9 */ }
14 14
a:hover, a:active { color: #c92a2a; /* oc-red-9 */ }
15 15
a.wiki-anchor { display: none; }
16
a.user.user-mention {
17
  padding: 0.1em;
18
  border-radius: 0.1em;
19
}
20
a.user.user-mention.user-mentionable {
21
  background-color: #e7f5ff; /* oc-blue-0 */
22
}
23
a.user.user-mention.user-current {
24
  background-color: #ffe8cc; /* oc-orange-1 */
25
}
16 26
fieldset.attachments {
17 27
  border-width: 1px 0 0 0;
18 28
  border-style: solid;
test/unit/mailer_test.rb
513 513
    # @dlopper won't receive duplicated notifications
514 514
    assert_equal 3, ActionMailer::Base.deliveries.size
515 515
    assert_include User.find(1).mail, recipients
516

  
517
    # In the email sent to admin, the mention of admin is marked as the
518
    # current user and both mentioned users are marked as mentionable
519
    mail = ActionMailer::Base.deliveries.find {|m| m.to.include?(User.find(1).mail)}
520
    html = mail.parts.detect {|part| part.content_type.include?('text/html')}.body.encoded
521
    assert_select_in html, 'a.user-mention.user-current.user-mentionable[href$=?]', '/users/1', 1
522
    assert_select_in html, 'a.user-mention.user-mentionable:not(.user-current)[href$=?]', '/users/3', 1
516 523
  end
517 524
  def test_issue_add_should_include_enabled_fields
(2-2/2)