#483 Added placeholders for the notifications: html(caselog), head_html(caselog), html(linkset). The HTML can be customized. Fixes the issue about lines being wrapped in a curious way (root cause: swift mailer).

SVN:trunk[3167]
This commit is contained in:
Romain Quetiez
2014-05-23 12:32:08 +00:00
parent 43130aef71
commit 92b2131d3b
2 changed files with 83 additions and 1 deletions

View File

@@ -2088,7 +2088,10 @@ abstract class DBObject implements iDisplay
{
$oCaseLog = $this->Get($sAttCode);
$aScalarArgs[$sArgName.'->'.$sAttCode] = $oCaseLog->GetText();
$aScalarArgs[$sArgName.'->head('.$sAttCode.')'] = $oCaseLog->GetLatestEntry();
$sHead = $oCaseLog->GetLatestEntry();
$aScalarArgs[$sArgName.'->head('.$sAttCode.')'] = $sHead;
$aScalarArgs[$sArgName.'->head_html('.$sAttCode.')'] = '<div class="caselog_entry">'.str_replace(array("\r\n", "\n", "\r"), "<br/>", htmlentities($sHead, ENT_QUOTES, 'UTF-8')).'</div>';
$aScalarArgs[$sArgName.'->html('.$sAttCode.')'] = $oCaseLog->GetAsEmailHtml();
}
elseif ($oAttDef->IsScalar())
{
@@ -2119,6 +2122,7 @@ abstract class DBObject implements iDisplay
}
$sNames = implode("\n", $aNames);
$aScalarArgs[$sArgName.'->'.$sAttCode] = $sNames;
$aScalarArgs[$sArgName.'->html('.$sAttCode.')'] = '<ul><li>'.implode("</li><li>", $aNames).'</li></ul>';
}
}