cmc-sales/app/views/emails/print.ctp
2013-03-23 16:25:52 +11:00

53 lines
1.3 KiB
PHP
Executable file

<? App::import('Sanitize'); ?>
<div id="viewemail">
Enquiry Number: <?php echo $email['Enquiry']['title']; ?> <br>
Date: <?php echo $email['Email']['date']; ?> <br>
Subject: <?php echo $email['Email']['subject']; ?> <br>
To: <?php echo $email['Email']['to']; ?> <br>
From: <?php echo $email['Email']['from']; ?> <br>
CC: <?php echo $email['Email']['cc']; ?> <br>
<div id="emailbody">
<?php
/* strip out thinks messing up my link styles! */
$cleanbody = Sanitize::html($email['Email']['body']);
?>
<?php echo $cleanbody; ?>
</div>
<div class="related">
<h3><?php __('Attachments');?></h3>
<?php if (!empty($email['EmailAttachment'])):?>
<table cellpadding = "0" cellspacing = "0">
<tr>
<th><?php __('Name'); ?></th>
<th><?php __('Type'); ?></th>
<th><?php __('Size'); ?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($email['EmailAttachment'] as $emailAttachment):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td><?php echo $emailAttachment['name'];?></td>
<td><?php echo $emailAttachment['type'];?></td>
<td><?php echo $number->toReadableSize($emailAttachment['size']);?></td>
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
</div>
</div>