aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/admin_request/show_raw_email.rhtml38
1 files changed, 33 insertions, 5 deletions
diff --git a/app/views/admin_request/show_raw_email.rhtml b/app/views/admin_request/show_raw_email.rhtml
index 50899da49..9d0870e39 100644
--- a/app/views/admin_request/show_raw_email.rhtml
+++ b/app/views/admin_request/show_raw_email.rhtml
@@ -14,11 +14,39 @@
(based on From: email domain)
<% end %>
<% if @info_requests.size > 0 %>
- <br>Guessed request:
- <% @info_requests.each do |info_request| %>
- <%=request_both_links(info_request)%>
- <% end %>
- (based on id, not hash, in To/Cc email)
+ <div class="accordion" id="guessed-requests">
+ Guessed request:
+ <% @info_requests.each do |info_request| %>
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <a href="#info_request_<%= info_request.id %>" data-toggle="collapse"><i class="icon-chevron-right"></i></a>
+ <%=request_both_links(info_request)%>
+ </div>
+ <div class="accordion-body collapse" id="info_request_<%= info_request.id %>">
+ <table class="table table-striped table-condensed">
+ <tr>
+ <td><strong>Last outgoing message:</strong></td>
+ <td><%= info_request.outgoing_messages.last.body %></td>
+ </tr>
+ <tr>
+ <td><strong>Created by:</strong></td>
+ <td><%= user_admin_link_for_request(info_request) %></td>
+ </tr>
+ <tr>
+ <td><strong>Authority:</strong></td>
+ <td>
+ <%= link_to(info_request.public_body.name, public_body_admin_url(info_request.public_body)) %>
+ </td>
+ </tr>
+ </table>
+ <p>
+ This request was guessed because it has an incoming email address of <strong><%= info_request.incoming_email %></strong> and this incoming message was sent to <strong><%= @raw_email.incoming_message.mail.to %></strong>.
+ </p>
+ </div>
+ </div>
+ <% end %>
+ (based on id, not hash, in To/Cc email)
+ </div>
<% end %>
<% end %>
</p>