<%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %> <% dialog_id = "show_audits" heading_text = "#{t('audit_lookup.' + @audit.AuditLookup.area.gsub(' ','_').downcase)}" key_value = "#{heading_text} (#{h @audit.AuditLookup.key_value})" audit_type = @audit.auditable_type %>

<%= t_label('.record') %>

<%= key_value %>

<%= t_label('.type') %>

<% if @audit.auditable_type == 'Note' %> <%= @audit.AuditLookup.area %> <%= @audit.translation_key %>

<% else %> <%= @audit.translation_key %>

<% end %>

<%= t_label('.action') %>

<%= t('audits.action.' + @audit.action.downcase) %>

<%= t_label('.modified_by') %>

<%= h(@audit.username) %> on <%= format_timestamp(@audit.created_at) %>

<% if (@audit.action == 'create' || @audit.action == 'destroy') %> <% else %> <% end %> <% @audit.changes.keys.each do |key|%> <% changes = @audit.changes[key] %> <% if (changes && changes.is_a?(Array)) %> <% displayfields = translateField(@audit, key, changes) %> <% displayfields.each do |change|%> <%= "" %> <%= "" %> <%= "" %> <% end %> <% else %> <% displayfields = translateField(@audit, key, [changes]) %> <% displayfields.each do |change|%> <%= "" %> <%= "" %> <%= "" %> <% end %> <% end %> <% end %>
<%=t ".field_header" %> <%=t ".value_header" %>
<%=t ".field_header" %> <%=t ".original_header" %> <%=t ".new_header" %>
#{change[:field].to_s.downcase}
#{h change[:values][0].to_s}
#{h change[:values][1].to_s}
#{ change[:field].to_s.downcase}
#{h change[:values][0].to_s}