123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <?php
- /**
- * @var \App\View\AppView $this
- * @var \App\Model\Entity\User[]|\Cake\Collection\CollectionInterface $users
- */
- $this->layout = false;
- ?>
- <!DOCTYPE html>
- <html>
- <?= $this->element('Eprosume/header') ?>
- <body class="hold-transition skin-green sidebar-mini">
- <div class="wrapper">
-
- <?= $this->element('Eprosume/mainHeader') ?>
-
- <!-- Left side column. contains the logo and sidebar -->
- <?= $this->element('Eprosume/leftSideColumn') ?>
-
- <!-- Content Wrapper. Contains page content -->
- <div class="content-wrapper">
- <!-- Content Header (Page header) -->
- <section class="content-header">
- <h1>
- Users
- <small></small>
- </h1>
- <ol class="breadcrumb">
- <li><a href="/"><i class="fa fa-dashboard"></i> <?= $app_name ?></a></li>
- <li class="active">Users</li>
- </ol>
- </section>
-
- <!-- Main content -->
- <section class="content">
- <div class="row">
- <div class="col-xs-12">
- <div class="box">
- <!-- /.box-header -->
- <div class="box-body">
- <nav class="user-nav large-3 medium-4 columns" id="actions-sidebar">
- <ul class="side-nav">
- <li class="heading"><?= __('Actions') ?></li>
- <li><?= $this->Html->link(__('New User'), ['action' => 'add']) ?></li>
- </ul>
- </nav>
- <div class="users index large-9 medium-8 columns content">
- <h3><?= __('Users') ?></h3>
- <table class="table table-striped" cellpadding="0" cellspacing="0">
- <thead>
- <tr>
- <th scope="col"><?= $this->Paginator->sort('id') ?></th>
- <th scope="col"><?= $this->Paginator->sort('username') ?></th>
- <th scope="col"><?= $this->Paginator->sort('emailaddress', 'Email') ?></th>
- <th scope="col"><?= $this->Paginator->sort('role') ?></th>
- <th scope="col"><?= $this->Paginator->sort('meter_id', 'Associated meter') ?></th>
- <th scope="col"><?= $this->Paginator->sort('created') ?></th>
- <th scope="col"><?= $this->Paginator->sort('modified') ?></th>
- <th scope="col" class="actions"><?= __('Actions') ?></th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($users as $user): ?>
- <tr>
- <td><?= $this->Number->format($user->id) ?></td>
- <td><?= h($user->username) ?></td>
- <td><?= h($user->emailaddress) ?></td>
- <td><?= h($user->role) ?></td>
- <td><?= h($meterList[$user->meter_id] ?? "-") ?></td>
- <td><?= h($user->created) ?></td>
- <td><?= h($user->modified) ?></td>
- <td class="actions">
- <?= $this->Html->link(__('View'), ['action' => 'view', $user->id]) ?>
- <?= $this->Html->link(__('Edit'), ['action' => 'edit', $user->id]) ?>
- <?php if($user->role != "admin"): ?>
- <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $user->id], ['confirm' => __('Are you sure you want to delete # {0}?', $user->id)]) ?>
- <?php else: ?>
- <td> </td>
- <?php endif ?>
- </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>
- </div>
- <!-- /.box-body -->
- </div>
- <!-- /.box -->
- </div>
- <!-- /.col -->
- </div>
- <!-- /.row -->
- </section>
- <!-- /.content -->
- </div>
- <!-- /.content-wrapper -->
- <?= $this->element('Eprosume/footer') ?>
- </div>
- <!-- ./wrapper -->
- <?= $this->element('Eprosume/scripts') ?>
- </body>
- </html>
|