aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-02-25 16:15:10 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-02-25 16:35:16 +1100
commitdbd868f349baf5a1c6f580678296253643c06def (patch)
tree4bd4656bf4347b0550ada5491e0f207957eea60c
parent24a5e757d1073f1d3df24e55550e5b99cf1b71fd (diff)
Add more information about matched request in admin interface to make checking easier
-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>