[Muestra] correo institucional en admin
This commit is contained in:
parent
a9aa4a9edc
commit
c553d2f529
|
@ -49,7 +49,7 @@ class adminModel extends dbConnection {
|
|||
|
||||
// @return un array con los artículos en espera de aprobación.
|
||||
public function get_sent(int $limit, int $accumulation, string $pattern) {
|
||||
$query = 'SELECT a.title, a.slug, u.username AS author ' .
|
||||
$query = 'SELECT a.title, a.slug, u.username AS author, u.email ' .
|
||||
'FROM articles AS a INNER JOIN users AS u ON a.user_id = u.id ' .
|
||||
'WHERE a.authorized = FALSE ';
|
||||
|
||||
|
@ -226,7 +226,7 @@ class adminModel extends dbConnection {
|
|||
|
||||
// @return un array con los artículos publicados.
|
||||
public function get_published(int $limit, int $accumulation, string $pattern) {
|
||||
$query = 'SELECT a.title, a.slug, u.username AS author ' .
|
||||
$query = 'SELECT a.title, a.slug, u.username AS author, u.email ' .
|
||||
'FROM articles AS a INNER JOIN users AS u ON a.user_id = u.id ' .
|
||||
'WHERE a.authorized = TRUE ';
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<tr>
|
||||
<th>Título</th>
|
||||
<th>Autor</th>
|
||||
<th>Correo institucional</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
|
@ -37,6 +38,7 @@
|
|||
<tr>
|
||||
<td><?= utils::escape($article['title']) ?></td>
|
||||
<td><a href="<?= NABU_ROUTES['profile'] . '&user=' . urlencode($article['author']) ?>"><?= utils::escape($article['author']) ?></a></td>
|
||||
<td><?= utils::escape($article['email']) ?></td>
|
||||
<td><a href="<?= NABU_ROUTES['review-article'] . '&slug=' . $article['slug'] ?>">Editar</a></td>
|
||||
<td><a href="<?= NABU_ROUTES['delete-article'] . '&slug=' . $article['slug'] ?>">Eliminar</a></td>
|
||||
<td><a href="<?= NABU_ROUTES['authorize-article'] . '&slug=' . $article['slug'] ?>">Publicar</a></td>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<tr>
|
||||
<th>Título</th>
|
||||
<th>Autor</th>
|
||||
<th>Correo institucional</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
@ -36,6 +37,7 @@
|
|||
<tr>
|
||||
<td><?= utils::escape($article['title']) ?></td>
|
||||
<td><a href="<?= NABU_ROUTES['profile'] . '&user=' . urlencode($article['author']) ?>"><?= utils::escape($article['author']) ?></a></td>
|
||||
<td><?= utils::escape($article['email']) ?></td>
|
||||
<td><a href="<?= NABU_ROUTES['review-article'] . '&slug=' . $article['slug'] ?>">Editar</a></td>
|
||||
<td><a href="<?= NABU_ROUTES['delete-article'] . '&slug=' . $article['slug'] ?>">Eliminar</a></td>
|
||||
</tr>
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
<th>Apodo</th>
|
||||
<th>Correo institucional</th>
|
||||
<th>Rol</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($users as $user): ?>
|
||||
<tr>
|
||||
|
@ -38,6 +40,8 @@
|
|||
<td><?= utils::escape($user['username']) ?></td>
|
||||
<td><?= utils::escape($user['email']) ?></td>
|
||||
<td><?= $user['role'] ?></td>
|
||||
<td>Eliminar</td>
|
||||
<td>Cambiar rol</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue