Fixed translation notification emails

This commit is contained in:
Godwin 2016-07-18 22:32:54 -07:00
parent 1b95a5eb3d
commit e57eba4157
4 changed files with 13 additions and 18 deletions

View File

@ -207,17 +207,21 @@ pre {
display: inline-block; display: inline-block;
padding: 0.5em; padding: 0.5em;
margin: 0; margin: 0;
background-color: lighten($colour-3, 33%); border-bottom: 1px solid #DDD;
border: 2px solid #DDD; //white-space: nowrap;
white-space: nowrap;
&:nth-child(odd) { &:nth-child(odd) {
margin-right: -3px; margin-right: -3px;
float: left; float: left;
clear: left;
} }
&:nth-child(even) { ins {
background-color: lighten($colour-5 , 33%); color: #080;//lighten($colour-3, 33%);
}
del {
color: #800;
} }
} }
} }

View File

@ -88,13 +88,6 @@ class UserMailer < ActionMailer::Base
@subject = (_'email.subject.workshop_translated', @subject = (_'email.subject.workshop_translated',
"The #{@locale_name} translation for #{@workshop.title} has been modified", "The #{@locale_name} translation for #{@workshop.title} has been modified",
vars: {language: @language_name, workshop_title: @workshop.title}) 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 @wrapper_id = :full_width

View File

@ -5,9 +5,8 @@
%b=_'email.translations.headings.new_value' %b=_'email.translations.headings.new_value'
%blockquote=_!values[:new].html_safe %blockquote=_!values[:new].html_safe
%b=_'email.translations.headings.old_value' %b=_'email.translations.headings.old_value'
%blockquote=_!values[:old].html_safe - if values[:old].present?
%b=_'email.translations.headings.diff' %blockquote=_!values[:old].html_safe
=_!(values[:diff][:html].html_safe)
%p %p
=_'email.workshop.paragraph.view_workshop',"You can view the workshop here: " =_'email.workshop.paragraph.view_workshop',"You can view the workshop here: "

View File

@ -5,9 +5,8 @@
%b=_'email.translations.headings.new_value' %b=_'email.translations.headings.new_value'
%blockquote=_!values[:new].html_safe %blockquote=_!values[:new].html_safe
%b=_'email.translations.headings.old_value' %b=_'email.translations.headings.old_value'
%blockquote=_!values[:old].html_safe - if values[:old].present?
%b=_'email.translations.headings.diff' %blockquote=_!values[:old].html_safe
=_!(values[:diff][:html].html_safe)
%p %p
=_'email.workshop.paragraph.view_workshop',"You can view the workshop here: " =_'email.workshop.paragraph.view_workshop',"You can view the workshop here: "