88 lines
5.1 KiB
Smarty
88 lines
5.1 KiB
Smarty
{extends file="views/layout.tpl"}
|
|
|
|
{block name="content"}
|
|
|
|
<section>
|
|
<div id="layoutSidenav_content">
|
|
<div class="container-fluid px-4">
|
|
<h1 class="mt-4">Dashboard</h1>
|
|
<div class="container-fluid px-4">
|
|
<!-- USER MODIF -->
|
|
<div class="p-3 mt-2 text-primary-emphasis bg-primary-subtle border border-primary-subtle rounded-3">
|
|
<div class="container-fluid pt-2">
|
|
<h2>Gestion de l'utilsateur</h2>
|
|
<p>Changer le statut ou supprimer un utilisateur</p>
|
|
<div class="row">
|
|
<form method="POST">
|
|
<div class="col-6">
|
|
<select class="form-select" aria-label="Default select example" name="user_id">
|
|
<option value="0">Choisir un utilisateur</option>
|
|
{foreach from=$arrUserToDisplay item=user}
|
|
<option value="{$user->getId()}">{$user->getName()} {$user->getFirstname()}</option>
|
|
{/foreach}
|
|
</select>
|
|
<br>
|
|
<select class="form-select" aria-label="Default select example" name="new_status">
|
|
<option value="0" selected>Modifier le statut de l'Utilisateur...</option>
|
|
{foreach from=$arrAuthorisationToDisplay item=arrDetAuthorisation}
|
|
<option value="{$arrDetAuthorisation->getId()}">{$arrDetAuthorisation->getName()}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
<br>
|
|
<div class="col-2">
|
|
<button type="submit" name="action" value="update_status" class="btn bg-success text-light"> Valider</button>
|
|
<button type="submit" name="action" value="delete_user" class="btn bg-danger text-light" onclick="return confirm('Attention ! Êtes-vous sûr de vouloir supprimer cet utilisateur ? Cette action est irréversible.');">Supprimer l'utilisateur</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- catégorie modif -->
|
|
<div class="p-3 mt-2 text-primary-emphasis bg-primary-subtle border border-primary-subtle rounded-3">
|
|
<div class="container-fluid pt-2">
|
|
<h2>Gestion des catégories</h2>
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<form method="post">
|
|
<p>Modifier une catégorie existante</p>
|
|
<select class="form-select" aria-label="Default select example" name="id_to_edit">
|
|
<option value="0">Choix de la catégorie</option>
|
|
{foreach from=$arrCategoryToDisplay item=category}
|
|
<option value="{$category->getId()}">{$category->getName()}</option>
|
|
{/foreach}
|
|
</select>
|
|
<br>
|
|
<div class="form-floating mb-3">
|
|
<input type="text" class="form-control" id="floatingInput" name="new_name">
|
|
<label for="floatingInput">Nouveau nom de la catégorie</label>
|
|
</div>
|
|
<button type="submit" class="btn bg-success text-light rounded-circle"> ✓</button>
|
|
</form>
|
|
<div>
|
|
</div>
|
|
<br>
|
|
<div class="row">
|
|
<!-- creation cat-->
|
|
<div class="col-6">
|
|
<form method="POST">
|
|
<p>Créer une nouvelle catégorie</p>
|
|
<div class="form-floating mb-3">
|
|
<input type="text" class="form-control" id="floatingInput" name="new_category">
|
|
<label for="floatingInput">Nom de la nouvelle catégorie</label>
|
|
</div>
|
|
<div class="col-2">
|
|
<button type="submit" class="btn bg-success text-light rounded-circle"> ✓</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="small">Connecté avec le compte : {$smarty.session.user.user_name} {$smarty.session.user.user_firstname}
|
|
</section>
|
|
|
|
{/block} |