|
<div class="active-scaffold-header">
|
|
<h2 style="border-bottom-style:none;" ><%= auditable_type_column(@audit) %> </h2>
|
|
</div>
|
|
|
|
<div>
|
|
<table class="list" width="100%">
|
|
<caption><%= "#{@audit.action.camelize} #{auditable(@audit)}" %></caption>
|
|
<th>What</th><th>Old</th><th>New</th>
|
|
<% @audit.changes.each do |name,change| -%>
|
|
<% next if change.nil? or change.to_s.empty? -%>
|
|
<tr class="<%= cycle("even", "odd") -%>">
|
|
<td><%= h name.humanize %></td>
|
|
<% record = true if name =~ /.*_id$/ -%>
|
|
<% if change.is_a?(Array) %>
|
|
<% change.each do |v| -%>
|
|
<% v = id_to_label(name,v) if record -%>
|
|
<td><%= h v %></td>
|
|
<% end -%>
|
|
<% else -%>
|
|
<% change = id_to_label(name,change) if record -%>
|
|
<%= change_order(@audit.action, change).map {|v| "<td>#{h v}</td>"} -%>
|
|
<% end -%>
|
|
</tr>
|
|
<% end -%>
|
|
</table>
|
|
</div>
|
|
|
|
<%= link_to 'Back', :back %> or
|
|
<%# link_to "Other change", reports_host_path(@report.host) %>
|