Better changeset display in the versions pages

This commit is contained in:
echarp 2016-09-11 17:46:28 +02:00
parent e749a62fa2
commit 4192ddcb4a
2 changed files with 7 additions and 4 deletions

View File

@ -7,6 +7,7 @@
%th.event
%th.whodunnit= sort_link @search, :whodunnit
%th.object= sort_link @search, :object_id
%th.changeset= sort_link @search, :changeset
%th.created_at= sort_link @search, :created_at
%th.view/
@ -27,7 +28,7 @@
if key == 'description' && val[0].present? && val[1].present?
changes += Differ.diff(val[1], val[0]).to_s
else
changes += "#{val[0]} -> #{val[1]}"
changes += "#{val[0]} #{val[1]}"
end
changes += '
'
@ -36,9 +37,11 @@
end
%tr
%td{ title: changes }= t ".#{version.event}_html"
%td= t ".#{version.event}_html"
%td= User.find version.whodunnit if version.whodunnit
%td= object
%td
%pre= changes
%td= l version.created_at, format: :short
%td
- unless version.event == 'destroy'
@ -48,7 +51,7 @@
%tfoot
%tr
%th(colspan='5')= paginate @versions
%th(colspan='6')= paginate @versions
.formats
= link_to versions_path(format: :rss) do

View File

@ -63,7 +63,7 @@ xml.rdf :RDF,
if key == 'description' && val[0].present? && val[1].present?
changes += Differ.diff(val[1], val[0]).to_s
else
changes += "#{val[0]} -> #{val[1]}"
changes += "#{val[0]} #{val[1]}"
end
changes += '
'