diff --git a/app/assets/stylesheets/user-mailer.scss b/app/assets/stylesheets/user-mailer.scss index 30a3fe1..af6e781 100644 --- a/app/assets/stylesheets/user-mailer.scss +++ b/app/assets/stylesheets/user-mailer.scss @@ -207,17 +207,21 @@ pre { display: inline-block; padding: 0.5em; margin: 0; - background-color: lighten($colour-3, 33%); - border: 2px solid #DDD; - white-space: nowrap; + border-bottom: 1px solid #DDD; + //white-space: nowrap; &:nth-child(odd) { margin-right: -3px; float: left; + clear: left; } - &:nth-child(even) { - background-color: lighten($colour-5 , 33%); + ins { + color: #080;//lighten($colour-3, 33%); + } + + del { + color: #800; } } } diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 19d755b..b02b8c8 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -88,13 +88,6 @@ class UserMailer < ActionMailer::Base @subject = (_'email.subject.workshop_translated', "The #{@locale_name} translation for #{@workshop.title} has been modified", vars: {language: @language_name, workshop_title: @workshop.title}) - @data.each do |field, values| - diff = Diffy::Diff.new(values[:old], values[:new]) - @data[field][:diff] = { - text: diff.to_s(:text), - html: diff.to_s(:html) - } - end @wrapper_id = :full_width diff --git a/app/views/user_mailer/workshop_original_content_changed.html.haml b/app/views/user_mailer/workshop_original_content_changed.html.haml index 566bc61..e541e62 100644 --- a/app/views/user_mailer/workshop_original_content_changed.html.haml +++ b/app/views/user_mailer/workshop_original_content_changed.html.haml @@ -5,9 +5,8 @@ %b=_'email.translations.headings.new_value' %blockquote=_!values[:new].html_safe %b=_'email.translations.headings.old_value' - %blockquote=_!values[:old].html_safe - %b=_'email.translations.headings.diff' - =_!(values[:diff][:html].html_safe) + - if values[:old].present? + %blockquote=_!values[:old].html_safe %p =_'email.workshop.paragraph.view_workshop',"You can view the workshop here: " diff --git a/app/views/user_mailer/workshop_translated.html.haml b/app/views/user_mailer/workshop_translated.html.haml index 269cbda..6d93bb3 100644 --- a/app/views/user_mailer/workshop_translated.html.haml +++ b/app/views/user_mailer/workshop_translated.html.haml @@ -5,9 +5,8 @@ %b=_'email.translations.headings.new_value' %blockquote=_!values[:new].html_safe %b=_'email.translations.headings.old_value' - %blockquote=_!values[:old].html_safe - %b=_'email.translations.headings.diff' - =_!(values[:diff][:html].html_safe) + - if values[:old].present? + %blockquote=_!values[:old].html_safe %p =_'email.workshop.paragraph.view_workshop',"You can view the workshop here: "