khanat-opennel-code/code/web/public_php/webtt/app/views/users/index.ctp
2015-03-07 17:01:14 +01:00

71 lines
3.1 KiB
PHP

<div class="grid_3">
<div class="box menubox">
<h2><a href="#" id="toggle-admin-actions">Actions</a></h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Users', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('action' => 'index')); ?> </li>
</ul>
<h5><?php echo __('Translations', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List all %s', true), __('Translations', true)), array('controller' => 'translations', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add')); ?> </li>
</ul>
<h5><?php echo __('Votes', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List all %s', true), __('Votes', true)), array('controller' => 'votes', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Vote', true)), array('controller' => 'votes', 'action' => 'add')); ?> </li>
</ul>
<h5><?php echo __('Comments', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List all %s', true), __('Comments', true)), array('controller' => 'comments', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Comment', true)), array('controller' => 'comments', 'action' => 'add')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php __('Users');?></h2>
<table cellpadding="0" cellspacing="0"> <?php $tableHeaders = $html->tableHeaders(array($paginator->sort('id'),$paginator->sort('name'),$paginator->sort('email'),$paginator->sort('username'),$paginator->sort('role'),__('Actions', true),));
echo '<thead>'.$tableHeaders.'</thead>'; ?>
<?php
$i = 0;
foreach ($users as $user):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td><?php echo $user['User']['id']; ?></td>
<td><?php echo $user['User']['name']; ?></td>
<td><?php echo $user['User']['email']; ?></td>
<td><?php echo $user['User']['username']; ?></td>
<td><?php echo $user['User']['role']; ?></td>
<td class="actions">
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $user['User']['id'])); ?>
</td>
</tr>
<?php endforeach; ?>
<?php echo '<tfoot class=\'dark\'>'.$tableHeaders.'</tfoot>'; ?>
</table>
<p>
<?php
echo $this->Paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?> </p>
<div class="paging">
<?php echo $this->Paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
| <?php echo $this->Paginator->numbers();?> |
<?php echo $this->Paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
</div>
</div>
<div class="clear"></div>