diff options
author | 2018-05-30 20:08:47 +0200 | |
---|---|---|
committer | 2018-05-30 20:08:47 +0200 | |
commit | ace632af55b8fadb486510d0377e3cb5cd2aafe1 (patch) | |
tree | db08d797dc30d345d9d3b62ae49c11fe30b87703 | |
parent | Try splitting redirects for threads/messages (diff) | |
download | frontend-ace632af55b8fadb486510d0377e3cb5cd2aafe1.tar.gz frontend-ace632af55b8fadb486510d0377e3cb5cd2aafe1.tar.bz2 frontend-ace632af55b8fadb486510d0377e3cb5cd2aafe1.zip |
listmonth: Do not display (empty) table when no messages
-rw-r--r-- | views/listmonth.erb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/views/listmonth.erb b/views/listmonth.erb index 020c340..337e81e 100644 --- a/views/listmonth.erb +++ b/views/listmonth.erb @@ -16,23 +16,23 @@ There were no threads that started this month, showing you all messages instead. </div> <% end %> -<% 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| %> + <div class="table-responsive"> + <table class="table table-condensed table-hover ag-message-table"> <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> + <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> - <% end %> - </table> -</div> + <% 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 } %> + <%= partial :pagination, locals: { current_page: current_page, max_pages: max_pages } %> +<% end %> |