Better changeset display in the versions pages
This commit is contained in:
parent
e749a62fa2
commit
4192ddcb4a
@ -7,6 +7,7 @@
|
|||||||
%th.event
|
%th.event
|
||||||
%th.whodunnit= sort_link @search, :whodunnit
|
%th.whodunnit= sort_link @search, :whodunnit
|
||||||
%th.object= sort_link @search, :object_id
|
%th.object= sort_link @search, :object_id
|
||||||
|
%th.changeset= sort_link @search, :changeset
|
||||||
%th.created_at= sort_link @search, :created_at
|
%th.created_at= sort_link @search, :created_at
|
||||||
%th.view/
|
%th.view/
|
||||||
|
|
||||||
@ -27,7 +28,7 @@
|
|||||||
if key == 'description' && val[0].present? && val[1].present?
|
if key == 'description' && val[0].present? && val[1].present?
|
||||||
changes += Differ.diff(val[1], val[0]).to_s
|
changes += Differ.diff(val[1], val[0]).to_s
|
||||||
else
|
else
|
||||||
changes += "#{val[0]} -> #{val[1]}"
|
changes += "#{val[0]} → #{val[1]}"
|
||||||
end
|
end
|
||||||
changes += '
|
changes += '
|
||||||
'
|
'
|
||||||
@ -36,9 +37,11 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
%tr
|
%tr
|
||||||
%td{ title: changes }= t ".#{version.event}_html"
|
%td= t ".#{version.event}_html"
|
||||||
%td= User.find version.whodunnit if version.whodunnit
|
%td= User.find version.whodunnit if version.whodunnit
|
||||||
%td= object
|
%td= object
|
||||||
|
%td
|
||||||
|
%pre= changes
|
||||||
%td= l version.created_at, format: :short
|
%td= l version.created_at, format: :short
|
||||||
%td
|
%td
|
||||||
- unless version.event == 'destroy'
|
- unless version.event == 'destroy'
|
||||||
@ -48,7 +51,7 @@
|
|||||||
|
|
||||||
%tfoot
|
%tfoot
|
||||||
%tr
|
%tr
|
||||||
%th(colspan='5')= paginate @versions
|
%th(colspan='6')= paginate @versions
|
||||||
|
|
||||||
.formats
|
.formats
|
||||||
= link_to versions_path(format: :rss) do
|
= link_to versions_path(format: :rss) do
|
||||||
|
@ -63,7 +63,7 @@ xml.rdf :RDF,
|
|||||||
if key == 'description' && val[0].present? && val[1].present?
|
if key == 'description' && val[0].present? && val[1].present?
|
||||||
changes += Differ.diff(val[1], val[0]).to_s
|
changes += Differ.diff(val[1], val[0]).to_s
|
||||||
else
|
else
|
||||||
changes += "#{val[0]} -> #{val[1]}"
|
changes += "#{val[0]} → #{val[1]}"
|
||||||
end
|
end
|
||||||
changes += '
|
changes += '
|
||||||
'
|
'
|
||||||
|
Loading…
Reference in New Issue
Block a user