2009-01-12 21:13:18 -08:00
|
|
|
<div class="users index">
|
|
|
|
|
<h2><?php __('Users');?></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('id');?></th>
|
|
|
|
|
<th><?php echo $paginator->sort('username');?></th>
|
|
|
|
|
<th><?php echo $paginator->sort('first_name');?></th>
|
|
|
|
|
<th><?php echo $paginator->sort('last_name');?></th>
|
|
|
|
|
<th><?php echo $paginator->sort('email');?></th>
|
|
|
|
|
<th><?php echo $paginator->sort('job_title');?></th>
|
2013-03-25 05:35:17 -07:00
|
|
|
<th><?php echo $paginator->sort('archived');?></th>
|
2009-01-12 21:13:18 -08:00
|
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php
|
|
|
|
|
$i = 0;
|
|
|
|
|
foreach ($users as $user):
|
|
|
|
|
$class = null;
|
|
|
|
|
if ($i++ % 2 == 0) {
|
2013-03-25 05:35:17 -07:00
|
|
|
$class = 'altrow';
|
|
|
|
|
}
|
|
|
|
|
if($user['User']['archived']) {
|
|
|
|
|
$class .= ' archived';
|
|
|
|
|
$archived = 'archived';
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$archived = '';
|
2009-01-12 21:13:18 -08:00
|
|
|
}
|
|
|
|
|
?>
|
2013-03-25 05:35:17 -07:00
|
|
|
<tr class="<?php echo $class;?>">
|
2009-01-12 21:13:18 -08:00
|
|
|
<td>
|
|
|
|
|
<?php echo $user['User']['id']; ?>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<?php echo $user['User']['username']; ?>
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
|
|
|
|
<?php echo $user['User']['first_name']; ?>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<?php echo $user['User']['last_name']; ?>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<?php echo $html->link($user['User']['email'], 'mailto:'. $user['User']['email']); ?>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<?php echo $user['User']['job_title']; ?>
|
|
|
|
|
</td>
|
2013-03-25 05:35:17 -07:00
|
|
|
<td>
|
|
|
|
|
<?php echo $archived; ?>
|
|
|
|
|
</td>
|
2009-01-12 21:13:18 -08:00
|
|
|
<td class="actions">
|
|
|
|
|
<?php echo $html->link(__('View', true), array('action'=>'view', $user['User']['id'])); ?>
|
|
|
|
|
<?php echo $html->link(__('Edit', true), array('action'=>'edit', $user['User']['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>
|
|
|
|
|
<div class="actions">
|
|
|
|
|
<ul>
|
|
|
|
|
<li><?php echo $html->link(__('New User', true), array('action'=>'add')); ?></li>
|
|
|
|
|
<li><?php echo $html->link(__('List Enquiries', true), array('controller'=> 'enquiries', 'action'=>'index')); ?> </li>
|
|
|
|
|
<li><?php echo $html->link(__('New Enquiry', true), array('controller'=> 'enquiries', 'action'=>'add')); ?> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|