cmc-sales/views/emails/index.ctp
2011-03-10 18:18:26 +11:00

52 lines
1.5 KiB
PHP
Executable file

<div class="emails index">
<h2><?php __('Emails');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
<th><?php echo $paginator->sort('Date');?></th>
<th><?php echo $paginator->sort('From');?></th>
<th><?php echo $paginator->sort('Subject');?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($emails as $email):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td>
<?php echo date('j M Y', $email['Email']['udate']); ?>
</td>
<td>
<?php echo $html->link($email['User']['email'], array('controller'=>'users','action'=>'view', $email['User']['id'])); ?>
</td>
<td>
<?php echo $email['Email']['subject']; ?>
</td>
<td class="actions">
<?php echo $html->link(__('View', true), array('action'=>'view', $email['Email']['id'])); ?>
<?php echo $html->link(__('Delete', true), array('action'=>'delete', $email['Email']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $email['Email']['id'])); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
| <?php echo $paginator->numbers();?>
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled'));?>
</div>