summaryrefslogtreecommitdiff
blob: b0f32a8272c06c20508d8601bf1e82661efa5c01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<h1 class="first-header">Gentoo Archives: <%= list %></h1>

<table class="table table-condensed ag-header-table">
  <tr>
    <th class="ag-header-name-col">From:</th>
    <td colspan="3"><%= h strip_email_domain(message['_source']['from']) %></td>
  </tr>
  <tr>
    <th>To:</th>
    <td colspan="3"><%= h strip_email_domain(message['_source']['to']) %></td>
  </tr>
  <tr>
    <th>Cc:</th>
    <td colspan="3"><%= h strip_email_domain(message['_source']['cc']) %></td>
  </tr>
  <tr>
    <th>Subject:</th>
    <td colspan="3"><strong><%= h message['_source']['subject'] %></strong></td>
  </tr>
  <tr>
    <th>Date:</th>
    <td><%= date_format message['_source']['date'] %></td>
    <th class="ag-header-name-col">Message-Id:</th>
    <td><%= message['_source']['raw_message_id'] %></td>
  </tr>
  <% unless parent == nil %>
  <tr>
    <th>In Reply to:</th>
    <td colspan="3"><a href="<%= parent['_id'] %>"><%= parent['_source']['subject'] %></a> by <%= parent['_source']['from'] %></td>
  </tr>
  <% end %>
</table>
<!-- Message-Id: <%= message['_source']['raw_message_id'] %> -->

<pre class="ag-message-content">
<%= linkize(strip_email(message['_source']['content'])) %>
</pre>

<% if message['_source']['attachments'] and not message['_source']['attachments'].empty? %>
<h3>Attachments</h3>

<table class="table table-condensed ag-attachment-table">
  <tr>
    <th>File name</th>
    <th>MIME type</th>
  </tr>
  <% message['_source']['attachments'].each do |attachment| %>
    <tr>
      <td><%= h attachment['filename'] %></td>
      <td><%= h attachment['mime'] %></td>
    </tr>
  <% end %>
</table>
<% end %>

<% unless children == nil %>
<h3>Replies</h3>

<table class="table table-condensed ag-replies-table">
  <tr>
    <th>Subject</th>
    <th>Author</th>
  </tr>
  <% children.each do |child| %>
    <tr>
      <td><a href="<%= child['_id'] %>"><%= h child['_source']['subject'] %></a></td>
      <td><%= h strip_email_domain(child['_source']['from']) %></td>
    </tr>
  <% end %>
</table>
<% end %>

<div class="btn-group btn-group-xs" role="group" aria-label="Message Actions">
  <a href="/<%= h list %>/report/<%= message['_id'] %>" class="btn btn-danger"><span class="fa fa-fw fa-ban"></span> Report Message</a>
  <a href="http://news.gmane.org/find-root.php?message_id=<%= u(message['_source']['raw_message_id']) %>" class="btn btn-default"><span class="fa fa-fw fa-share-square"></span>Find on GMANE</a>
</div>