summaryrefslogtreecommitdiff
blob: 337e81e72ef27e3012ba5cdd3ff1e009abdfd335 (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
<h1 class="first-header">Gentoo Archives: <%= h list %> in <%= to_month(params[:year], params[:month]) %></h1>

<div class="hidden-xs">
<%= partial :pagination, locals: { current_page: current_page, max_pages: max_pages } %>
</div>

<%= partial :views, locals: { list: list, mode: mode } %>

<% if results['hits']['total'] == 0 %>
<div class="alert alert-warning">
  There are no messages in the archive for the requested month.
</div>
<% else %>
  <% if no_threads %>
  <div class="alert alert-info">
    There were no threads that started this month, showing you all messages instead.
  </div>
  <% end %>

  <div class="table-responsive">
    <table class="table table-condensed table-hover ag-message-table">
      <tr>
        <th class="ag-message-table-subject">Subject</th>
        <th class="ag-message-table-from">From</th>
        <th class="ag-message-table-date">Date</th>
      </tr>
      <% results['hits']['hits'].each do |message| %>
        <tr>
          <td><a href="../../message/<%= message['_id'] %>"><%= h message['_source']['subject'] %></a></td>
          <td><%= h strip_email_headers(message['_source']['from_realname']).first %></td>
          <td><span class="ag-date"><%= date_format message['_source']['date'] %></span></td>
        </tr>
      <% end %>
    </table>
  </div>

  <%= partial :pagination, locals: { current_page: current_page, max_pages: max_pages } %>
<% end %>