index.ctp
2.9 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
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* @var \App\View\AppView $this
* @var \App\Model\Entity\Stat[]|\Cake\Collection\CollectionInterface $stats
*/
?>
<nav class="large-3 medium-4 columns" id="actions-sidebar">
<ul class="side-nav">
<li class="heading"><?= __('Actions') ?></li>
<li><?= $this->Html->link(__('New Stat'), ['action' => 'add']) ?></li>
<li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
<li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
</ul>
</nav>
<div class="stats index large-9 medium-8 columns content">
<h3><?= __('Stats') ?></h3>
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th scope="col"><?= $this->Paginator->sort('year') ?></th>
<th scope="col"><?= $this->Paginator->sort('user_id') ?></th>
<th scope="col"><?= $this->Paginator->sort('last_login_time') ?></th>
<th scope="col"><?= $this->Paginator->sort('last_logout_time') ?></th>
<th scope="col"><?= $this->Paginator->sort('connex_nb') ?></th>
<th scope="col"><?= $this->Paginator->sort('connex_dur') ?></th>
<th scope="col" class="actions"><?= __('Actions') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($stats as $stat): ?>
<tr>
<td><?= h($stat->year) ?></td>
<td><?= $stat->has('user') ? $this->Html->link($stat->user->nom, ['controller' => 'Users', 'action' => 'view', $stat->user->id]) : '' ?></td>
<td><?= h($stat->last_login_time) ?></td>
<td><?= h($stat->last_logout_time) ?></td>
<td><?= $this->Number->format($stat->connex_nb) ?></td>
<td><?= $this->Number->format($stat->connex_dur) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['action' => 'view', $stat->year,$stat->user_id]) ?>
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $stat->year,$stat->user_id]) ?>
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $stat->year,$stat->user_id], ['confirm' => __('Are you sure you want to delete # {0}?', $stat->year)]) ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div class="paginator">
<ul class="pagination">
<?= $this->Paginator->first('<< ' . __('first')) ?>
<?= $this->Paginator->prev('< ' . __('previous')) ?>
<?= $this->Paginator->numbers() ?>
<?= $this->Paginator->next(__('next') . ' >') ?>
<?= $this->Paginator->last(__('last') . ' >>') ?>
</ul>
<p><?= $this->Paginator->counter(['format' => __('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')]) ?></p>
</div>
</div>