[Agrega] maquetado simple para la gestión de usuarios en administración

This commit is contained in:
Ricardo García Jiménez 2021-09-22 21:10:11 -05:00
parent 2aaf008012
commit ba6d52289a
3 changed files with 50 additions and 0 deletions

View file

50
views/admin/users.php Normal file
View file

@ -0,0 +1,50 @@
<?php defined('NABU') || exit ?>
<?php $head_title = 'Usuarios registrados' ?>
<?php $styles = array(
NABU_DIRECTORY['styles'] . '/admin/users/users.css',
NABU_DIRECTORY['styles'] . '/admin/users/users-desktop.css',
) ?>
<?php require_once 'views/components/head.php' ?>
<?php require_once 'views/components/admin-navbar.php' ?>
<h1>Usuarios registrados</h1>
<?php require_once 'views/components/messages.php' ?>
<form method="POST" action="#">
<input type="hidden" name="csrf" value="<?= $token ?>">
<span>
<input type="text" name="q" minlength="1" maxlength="255" required>
</span>
<span>
<input type="submit" name="users-submit" value="&#x1F50E">
</span>
</form>
<?php if (!empty($users)): ?>
<table>
<tr>
<th>Nombre completo</th>
<th>Apodo</th>
<th>Estatus</th>
<th></th>
<th></th>
</tr>
<?php foreach ($users as $user): ?>
<tr>
<td><?= $user['name'] ?></td>
<td><?= $user['username'] ?></td>
<td><?= $user['status'] ?></td>
<?php if ($user['role'] == 'user'): ?>
<td><a href="#">Cambiar a usuario</a></td>
<?php else: ?>
<td><a href="#">Cambiar a moderador</a></td>
<?php endif ?>
<td><a href="#">Eliminar</a></td>
</tr>
<?php endforeach ?>
</table>
<?php endif ?>
<?php require_once 'views/components/pagination.php' ?>
<?php require_once 'views/components/footer.php' ?>