Commit b7e87be3 authored by metzlerd's avatar metzlerd
Browse files

Added mail merge report template.

parent 4563e802
......@@ -37,6 +37,7 @@ class FrxControls {
public function templates() {
$templates = array('table' => 'table',
'vertical_list' => 'list',
'email_merge' => 'email merge',
);
return $templates;
......@@ -267,4 +268,39 @@ class FrxControls {
return $xml;
}
public function email_merge($columns, $data_block, $clause) {
if ($clause) $clause = 'frx:clause ="'. $clause .'"';
$xml = '<div frx:block="'. $data_block .'" '. $clause .' frx:foreach="*">';
$xml .='<div class="email-document">';
$xml .='<div class="email-header">
<table>
<tbody>
<tr>
<th>From</th>
<td class="email-header-from">metzlerd@evergreen.edu</td>
</tr>
<tr>
<th>To</th>
<td class="email-header-to">{email}</td>
</tr>
<tr>
<th>Subject</th>
<td class="email-header-subject"></td>
</tr>
</tbody>
</table>
</div>';
$xml .= '<div class="email-body"><p>';
foreach ($columns as $column) {
$xml .= '{' . $column . '} ';
}
$xml .= '</p></div>';
$xml .= '</div>';
$xml .= '</div>';
return $xml;
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@
<body>
<div frx:block="drupal/active_users" id="forena-1" frx:foreach="*">
<div class="email-document">
<div class="email-header">
<div >
<table>
<tbody>
<tr>
......@@ -28,7 +28,7 @@
</tr>
<tr>
<th>Subject</th>
<td class="email-header-subject">Sample Active User Email</td>
<td class="email-header-subject">Sample Email</td>
</tr>
</tbody>
</table>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment