mirror of
https://github.com/redmine/redmine.git
synced 2025-11-05 04:45:57 +01:00
Show open/closed badge in email notifications (#33834).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@19982 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -47,6 +47,26 @@ table, td, th {
|
||||
border: 1px solid #bbb;
|
||||
padding: 4px;
|
||||
}
|
||||
.badge {
|
||||
position:relative;
|
||||
font-weight:bold;
|
||||
font-size: 10px;
|
||||
bottom: 2px;
|
||||
padding: 1px 3px;
|
||||
margin-right: 2px;
|
||||
margin-left: 2px;
|
||||
border-radius: 2px;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
}
|
||||
.badge-status-open {
|
||||
color: #205D86;
|
||||
border: 1px solid #205D86;
|
||||
}
|
||||
.badge-status-closed {
|
||||
color: #1D781D;
|
||||
border: 1px solid #1D781D;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<h1><%= link_to("#{issue.tracker.name} ##{issue.id}: #{issue.subject}", issue_url) %></h1>
|
||||
<h1>
|
||||
<%= link_to("#{issue.tracker.name} ##{issue.id}: #{issue.subject}", issue_url) %>
|
||||
<%= issue_status_type_badge(issue.status) %>
|
||||
</h1>
|
||||
|
||||
<%= render_email_issue_attributes(issue, user, true) %>
|
||||
|
||||
|
||||
@@ -480,6 +480,16 @@ class MailerTest < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_issue_add_should_include_issue_status_type_badge
|
||||
issue = Issue.find(1)
|
||||
Mailer.deliver_issue_add(issue)
|
||||
|
||||
mail = last_email
|
||||
assert_select_email do
|
||||
assert_select 'span.badge.badge-status-open', text: 'open'
|
||||
end
|
||||
end
|
||||
|
||||
def test_issue_edit_subject_should_include_status_changes_if_setting_is_enabled
|
||||
with_settings :show_status_changes_in_mail_subject => 1 do
|
||||
issue = Issue.find(2)
|
||||
|
||||
Reference in New Issue
Block a user