cmc-sales/php/app/views/elements/email_table_ajax.ctp

57 lines
1.6 KiB
Plaintext
Raw Normal View History

2010-03-22 19:27:53 -07:00
<?php echo $javascript->link('email_table'); ?>
<? App::import('Sanitize'); ?>
2010-03-22 19:27:53 -07:00
<?php // if (!empty($emails)):?>
<div id="emailDiv">
<table cellpadding = "0" cellspacing = "0" class="emailtable">
<tr>
<th><?php __('Email Date'); ?></th>
<th><?php __('From'); ?></th>
<th><?php __('Subject'); ?></th>
</tr>
<?php
$i = 0;
foreach ($emails as $email):
$class = null;
if ($i % 2 == 0) {
$class = ' class="altrow"';
}
$i++;
?>
2010-03-22 19:27:53 -07:00
<tr<?php echo $class;?>>
2011-03-09 23:18:26 -08:00
<td> <?php echo date('j M Y @ G:i', $email['Email']['udate']); ?></td>
<td><?php
if(!empty($email['User']['first_name']) && !empty($email['User']['last_name'])) {
echo $html->link($email['User']['first_name'].' '.$email['User']['last_name'], array('controller'=>'users','action'=>'view', $email['User']['id']));
}
else {
echo $html->link($email['User']['email'], array('controller'=>'users','action'=>'view', $email['User']['id']));
}
?>
</td>
2011-03-09 23:18:26 -08:00
<td><?php //echo $text->highlight($html->link($email['Email']['subject'], array('controller'=> 'emails', 'action'=>'frame/', $email['Email']['id'])), 'Quotation');
echo $text->highlight($html->link($email['Email']['subject'], '#', array('class'=>'viewLink', 'id'=>$email['Email']['id'])), 'Quotation');?>
<span class='viewLink' id="<? echo $email['Email']['id']?>">(<? echo $email['Email']['id']?>)</span>
</td>
</tr>
<?php endforeach; ?>
2010-03-22 19:27:53 -07:00
</table>
</div>
<?php //endif; ?>
<div id="ViewDialog">
2011-03-09 23:18:26 -08:00
</div>
<?php //debug($emails); ?>