lib/messages/missing_comment.erb
<!DOCTYPE html>
<html lang="en">
<head>
<style> /* CSS styles taken from https://github.com/yegor256/tacit */
th {
font-weight: 600
}
table tr {
border-bottom-width: 2.16px
}
table tr th {
border-bottom-width: 2.16px
}
table tr td, table tr th {
overflow: hidden;
padding: 5.4px 3.6px
}
td:nth-child(1), td:nth-child(2), td:nth-child(4), td:nth-child(5) {
width: 100px;
min-width: 30px;
}
pre, code, kbd, samp, var, output {
font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;
font-size: 14.4px
}
pre code {
background: none;
border: 0;
line-height: 29.7px;
padding: 0
}
code, kbd {
background: #daf1e0;
border-radius: 3.6px;
color: #2a6f3b;
display: inline-block;
line-height: 18px;
padding: 3.6px 6.3px 2.7px;
text-align: left;
}
a {
color: #275a90;
text-decoration: none
}
a:hover {
text-decoration: underline
}
td {
vertical-align: top;
}
* {
border: 0;
border-collapse: separate;
border-spacing: 0;
box-sizing: border-box;
margin: 0;
max-width: 100%;
padding: 0;
vertical-align: baseline;
font-family: system-ui, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
font-size: 13px;
font-stretch: normal;
font-style: normal;
font-weight: 400;
line-height: 29.7px
}
html, body {
width: 100%
}
html {
height: 100%
}
body {
background: #fff;
color: #1a1919;
padding: 36px
}
</style>
<title>Missing comments</title>
</head>
<body>
<p>Hi <%= addressee %>,</p>
<p>The following ticket(s) has missing <%= details %>:</p>
<table summary="ticket(s) without expected comment">
<tr>
<th id="key">Key</th>
<th id="duedate">Due date</th>
<th id="priority">Priority</th>
<th id="assignee">Assignee</th>
<th id="reporter">Reporter</th>
<th id="summary">Summary</th>
<th id="comments">Last comments</th>
</tr>
<% comments.each do |comment| %>
<tr>
<td><a href="<%= comment.issue.url %>"><%= comment.issue.key %></a></td>
<td><%= comment.issue.duedate %></td>
<td><%= comment.issue.priority %></td>
<td><%= comment.issue.assignee.name %></td>
<td><%= comment.issue.reporter.name %></td>
<td><%= comment.issue.summary %></td>
<td>
<% comment.last(5).each do |c| %>
<code><%= c.split("\r\n").map(&:strip).reject(&:blank?).join("<br/>") %></code>
<% end %>
</td>
</tr>
<% end %>
</table>
<p>Posted by
<a href="https://github.com/dgroup/lazylead">lazylead v<%= version %></a>.
</p>
</body>
</html>