forked from CakeDC/users
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ctp
More file actions
46 lines (44 loc) · 1.47 KB
/
Copy pathindex.ctp
File metadata and controls
46 lines (44 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
* Copyright 2010 - 2013, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2010 - 2013, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
?>
<div class="users index">
<h2><?php echo __d('users', 'Users'); ?></h2>
<p><?php
echo $this->Paginator->counter(array(
'format' => __d('users', 'Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%')
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
<th><?php echo $this->Paginator->sort('username'); ?></th>
<th><?php echo $this->Paginator->sort('created'); ?></th>
<th class="actions"><?php echo __d('users', 'Actions'); ?></th>
</tr>
<?php
$i = 0;
foreach ($users as $user):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class; ?>>
<td><?php echo $this->Html->link($user[$model]['username'], array('action' => 'view', $user[$model]['id'])); ?></td>
<td><?php echo $user[$model]['created']; ?></td>
<td class="actions">
<?php echo $this->Html->link(__d('users', 'View'), array('action' => 'view', $user[$model]['id'])); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php echo $this->element('Users.pagination'); ?>
</div>
<?php echo $this->element('Users.Users/sidebar'); ?>