Change #<%= version.id %>
<%= version.created_at.strftime('%Y-%m-%d') %>
<%= version.created_at.strftime('%H:%M:%S') %>

<%= version.event %> <%= version.item_type %> <%= version.item_id %> <%= change_item_link(version) %> <% if PaperTrailManager.whodunnit_class && version.whodunnit %> <% if user = PaperTrailManager.whodunnit_class.find(version.whodunnit) rescue nil %> by <%= link_to(h(user.send(PaperTrailManager.whodunnit_name_method)), user_path(user)) %> <% end %> <% end %> <% if change_revert_allowed?(version) %> <%= link_to 'Roll back', change_path(version), :method => 'put', :confirm => 'Are you sure?', :class => 'rollback' %> <% end %>

<% if version.event == 'update' or version.event == 'create' %> <% changes = changes_for(version) %> <% changes.keys.sort.each_with_index do |key, i| %> '> <% end %>
<%= key %> <%= text_or_nil(changes[key][:previous]) %> <%= text_or_nil(changes[key][:current]) %>
<% end %>