This is consistent with the way we're providing the main class. Note we're still setting the title using a block in more complex cases.
19 lines
852 B
Plaintext
19 lines
852 B
Plaintext
<% provide :title, t("admin.audits.title") %>
|
|
<%= back_link_to admin_polymorphic_path(@audit.associated || @audit.auditable) %>
|
|
|
|
<h2><%= t("admin.audits.title") %></h2>
|
|
|
|
<p><strong><%= t("admin.audits.edited_at") %></strong> <%= l @audit.created_at.to_date %></p>
|
|
<p><strong><%= t("admin.audits.edited_by") %></strong> <%= @audit.user&.name %></p>
|
|
|
|
<h3><%= t("admin.audits.changes") %></h3>
|
|
|
|
<% @audit.audited_changes.each do |field, (old_value, new_value)| %>
|
|
<strong><%= t("admin.audits.field") %></strong>
|
|
<p><%= sanitize(@audit.auditable.class.human_attribute_name(field)) %></p>
|
|
<strong><%= t("admin.audits.old_value") %></strong>
|
|
<p><%= wysiwyg(audit_value(@audit.auditable, field, old_value)) %></p>
|
|
<strong><%= t("admin.audits.new_value") %></strong>
|
|
<p><%= wysiwyg(audit_value(@audit.auditable, field, new_value)) %></p>
|
|
<% end %>
|