#* @vtlvariable name="changelog" type="org.ofbiz.core.entity.GenericValue" *# #disable_html_escaping() #if ($changelog)
#text("template.change.by"): | #if ($changelogauthor) #authorlinkkey($changelogauthor.key $linkstyle) #elseif ($changelogmetadata.actor) #emailHistoryMetadataParticipant($changelogmetadata.actor, true) #else #text("common.words.anonymous") #end |
---|---|
$textutils.htmlEncode($velocityhelper.getFieldName($changeitem, $i18n)): |
#if ($changeitem.getString("field") == "Comment") #set ($oldstringKey = "oldvalue") #set ($newstringKey = "newvalue")
#else #set ($oldstringKey = "oldstring") #set ($newstringKey = "newstring")
#end
#set ($oldText = "") #set ($newText = "")
#if ($changeitem.getString($newstringKey).contains("") || $changeitem.getString($oldstringKey).contains(""))
#if ($changeitem.getString($newstringKey)) $changeitem.getString($newstringKey)
#end
#else
#set ($oldText = $velocityhelper.getPrettyFieldString($changeitem.getString("field"), $changeitem.getString($oldstringKey), $i18n, ""))
#set ($newText = $velocityhelper.getPrettyFieldString($changeitem.getString("field"), $changeitem.getString($newstringKey), $i18n, ""))
$!diffutils.diff($oldText, "background-color:${auiErrorBackgroundColour};text-decoration:line-through;", $newText, "background-color:${auiSuccessBackgroundColour};")
#end
|