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
a, a:link, a:visited { color: #1864ab; /* oc-blue-9 */ }
a:hover, a:active { color: #c92a2a; /* oc-red-9 */ }
a.wiki-anchor { display: none; }
a.user.user-mention {
padding: 0.1em;
border-radius: 0.1em;
}
a.user.user-mention.user-mentionable {
background-color: #e7f5ff; /* oc-blue-0 */
}
a.user.user-mention.user-current {
background-color: #ffe8cc; /* oc-orange-1 */
}
fieldset.attachments {
border-width: 1px 0 0 0;
border-style: solid;
test/unit/mailer_test.rb
# @dlopper won't receive duplicated notifications
assert_equal 3, ActionMailer::Base.deliveries.size
assert_include User.find(1).mail, recipients
# In the email sent to admin, the mention of admin is marked as the
# current user and both mentioned users are marked as mentionable
mail = ActionMailer::Base.deliveries.find {|m| m.to.include?(User.find(1).mail)}
html = mail.parts.detect {|part| part.content_type.include?('text/html')}.body.encoded
assert_select_in html, 'a.user-mention.user-current.user-mentionable[href$=?]', '/users/1', 1
assert_select_in html, 'a.user-mention.user-mentionable:not(.user-current)[href$=?]', '/users/3', 1
end
def test_issue_add_should_include_enabled_fields
(2-2/2)