dgroup/lazylead

View on GitHub
lib/messages/created_recently.erb

Summary

Maintainability
Test Coverage
<!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;
    line-height: 20px;
  }

  #summary, #labels {
    text-align: left;
  }

  .auto {
    min-width: auto;
    white-space: nowrap;
  }

  a {
    color: #275a90;
    text-decoration: none
  }

  a:hover {
    text-decoration: underline
  }

  * {
    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;
  }

  html, body {
    width: 100%
  }

  html {
    height: 100%
  }

  body {
    background: #fff;
    color: #1a1919;
    padding: 36px
  }
  </style>
  <title>Created recently</title>
</head>
<body>
<p>Hi,</p>
<p>The followed tickets created recently:</p>
<table summary="recent tickets">
  <tr>
    <th id="key">Key</th>
    <th id="duedate">Due date</th>
    <th id="priority">Priority</th>
    <th id="reporter">Reporter</th>
    <th id="summary">Summary</th>
    <th id="labels">Labels</th>
  </tr>
  <% tickets.sort_by { |s| s.fields["priority"]["id"].to_i }.each do |t| %>
    <tr>
      <td>
        <div class="auto">
          <a href="<%= t.url %>"><%= t.key %></a>
        </div>
      </td>
      <td>
        <div class="auto"><%= t.duedate %></div>
      </td>
      <td><%= t.priority %></td>
      <td>
        <div class="auto">
          <%= t.reporter.name %>
        </div>
      </td>
      <td><%= t.summary %></td>
      <td><%= t.labels.join ", " %></td>
    </tr>
  <% end %>
</table>
<p>Posted by
  <a href="https://github.com/dgroup/lazylead">lazylead v<%= version %></a>.
</p>
</body>
</html>