From 4192ddcb4aa935d75690eaeddca96897ad7fa270 Mon Sep 17 00:00:00 2001 From: echarp Date: Sun, 11 Sep 2016 17:46:28 +0200 Subject: [PATCH] Better changeset display in the versions pages --- app/views/versions/index.haml | 9 ++++++--- app/views/versions/index.rss.builder | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/versions/index.haml b/app/views/versions/index.haml index 49b1ba55..a84ea999 100644 --- a/app/views/versions/index.haml +++ b/app/views/versions/index.haml @@ -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 diff --git a/app/views/versions/index.rss.builder b/app/views/versions/index.rss.builder index 1d7a964e..967d5acf 100644 --- a/app/views/versions/index.rss.builder +++ b/app/views/versions/index.rss.builder @@ -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 += ' '