diff options
-rw-r--r-- | app/views/admin_request/show.rhtml | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/app/views/admin_request/show.rhtml b/app/views/admin_request/show.rhtml index eec9092b3..398fe9984 100644 --- a/app/views/admin_request/show.rhtml +++ b/app/views/admin_request/show.rhtml @@ -31,8 +31,16 @@ <% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %> <tr class="<%= cycle('odd', 'even') %>"> <td><%=h info_request_event.id %></td> - <% for column in InfoRequestEvent.content_columns.map { |c| c.name } %> - <td><%=h info_request_event.send(column) %></td> + <% for column in InfoRequestEvent.content_columns %> + <td> + <% if column.name == 'params_yaml' %> + <pre><%= info_request_event.params_yaml %></pre> + <% elsif column.text? %> + <%=h (info_request_event.send(column.name) || '').gsub(/_/,' ') %> + <% else %> + <%=h info_request_event.send(column.name) %> + <% end %> + </td> <% end %> </tr> <% end %> @@ -42,18 +50,18 @@ <table> <tr> - <th>Id</th> - <% for column in OutgoingMessage.content_columns %> - <th><%= column.human_name %></th> - <% end %> - <th>Actions</th> + <th>Id</th> + <% for column in OutgoingMessage.content_columns %> + <th><%= column.human_name %></th> + <% end %> + <th>Actions</th> </tr> <% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %> <tr class="<%= cycle('odd', 'even') %>"> <td><%=h outgoing_message.id %></td> <% for column in OutgoingMessage.content_columns.map { |c| c.name } %> - <td><%=h outgoing_message.send(column) %></td> + <td><%= simple_format( outgoing_message.send(column) ) %></td> <% end %> <td> <% form_tag '../resend' do %> @@ -83,12 +91,11 @@ <tr class="<%= cycle('odd', 'even') %>" id="incoming-<%=incoming_message.id.to_s%>"> <td><%=h incoming_message.id %></td> <% for column in IncomingMessage.content_columns.map { |c| c.name } %> - <td><%=h incoming_message.send(column) %></td> + <td><%= simple_format( incoming_message.send(column) ) %></td> <% end %> <td> <% if !incoming_message.raw_email_id.nil? %> <p> - <%= link_to "View raw email", "../show_raw_email/" + incoming_message.raw_email_id.to_s %> </p> <% end %> |