[TASK] Mail: Add hr, right aligned table, debugging output
This commit is contained in:
parent
e126e674c7
commit
329de2771e
@ -223,6 +223,7 @@ class MailUtility
|
||||
switch($row['type']) {
|
||||
case 'text':
|
||||
case 'table':
|
||||
case 'tablelr':
|
||||
case 'tableLayout':
|
||||
case 'list':
|
||||
case 'textbold':
|
||||
@ -233,6 +234,7 @@ class MailUtility
|
||||
case 'buttonleft':
|
||||
case 'buttoncenter':
|
||||
case 'buttonright':
|
||||
case 'hr':
|
||||
$row['data'] = str_replace(
|
||||
"\\\n",
|
||||
'',
|
||||
@ -457,4 +459,23 @@ class MailUtility
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Debug print
|
||||
*/
|
||||
public static function printMaildata($maildata)
|
||||
{
|
||||
foreach ($maildata as $row) {
|
||||
if (!is_array($row['data'])) {
|
||||
print($row['data']);
|
||||
} else {
|
||||
print($row['data'][0]);
|
||||
print(PHP_EOL);
|
||||
print($row['data'][1]);
|
||||
}
|
||||
print(PHP_EOL);
|
||||
}
|
||||
print(PHP_EOL);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30,6 +30,7 @@
|
||||
|| {row.type} == 'buttonleft'
|
||||
|| {row.type} == 'buttoncenter'
|
||||
|| {row.type} == 'buttonright'
|
||||
|| {row.type} == 'hr'
|
||||
">
|
||||
<!--[if mso | IE]>
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:{width}px;" width="{width}" >
|
||||
@ -101,6 +102,10 @@
|
||||
{row.data -> f:format.nl2br() -> f:format.raw()}
|
||||
</span>
|
||||
</f:case>
|
||||
<f:case value="hr">
|
||||
<p style="border-top:solid 1px #bababa;font-size:1px;margin:13px auto;width:100%;">
|
||||
</p>
|
||||
</f:case>
|
||||
<f:defaultCase>
|
||||
<p>{row.data -> f:format.nl2br() -> f:format.raw()}</p>
|
||||
</f:defaultCase>
|
||||
@ -137,6 +142,9 @@
|
||||
<f:case value="table">
|
||||
<f:variable name="type" value="table" />
|
||||
</f:case>
|
||||
<f:case value="tablelr">
|
||||
<f:variable name="type" value="table" />
|
||||
</f:case>
|
||||
<f:case value="tableLayout">
|
||||
<f:variable name="type" value="table" />
|
||||
</f:case>
|
||||
@ -178,11 +186,19 @@
|
||||
</td>
|
||||
<td class="" style="vertical-align:top;width:{widthTableColumn}px;">
|
||||
<![endif]-->
|
||||
<div class="mj-column-per-50 outlook-group-fix" style="font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
|
||||
<f:switch expression="{row.type}">
|
||||
<f:case value="tablelr">
|
||||
<f:variable name="align" value="right" />
|
||||
</f:case>
|
||||
<f:defaultCase>
|
||||
<f:variable name="align" value="left" />
|
||||
</f:defaultCase>
|
||||
</f:switch>
|
||||
<div class="mj-column-per-50 outlook-group-fix" style="font-size:13px;text-align:{align};direction:ltr;display:inline-block;vertical-align:top;width:100%;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:0px 4px;word-break:break-word;">
|
||||
<div style="font-family:Arial, sans-serif;font-size:16px;line-height:1.4;text-align:left;color:#000000;">
|
||||
<td align="{align}" style="font-size:0px;padding:0px 4px;word-break:break-word;">
|
||||
<div style="font-family:Arial, sans-serif;font-size:16px;line-height:1.4;text-align:{align};color:#000000;">
|
||||
<div>{row.data.1 -> f:format.nl2br() -> f:format.raw()}</div>
|
||||
</div>
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user