Fonctionnalité tri catégorie et date ok. Nettoyage du code et des commentaires de tous les models

This commit is contained in:
laura.chevillet 2026-02-10 11:23:29 +01:00
parent 3af2e8a056
commit 8ce49943dd
18 changed files with 381 additions and 116 deletions

View file

@ -1,18 +1,18 @@
<?php
/* Smarty version 5.7.0, created on 2026-02-09 15:02:28
/* Smarty version 5.7.0, created on 2026-02-10 08:32:47
from 'file:views/admin.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0',
'unifunc' => 'content_6989f704df71e4_04792390',
'unifunc' => 'content_698aed2fac7079_66630300',
'has_nocache_code' => false,
'file_dependency' =>
array (
'ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb' =>
array (
0 => 'views/admin.tpl',
1 => 1770649348,
1 => 1770712365,
2 => 'file',
),
),
@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
array (
),
))) {
function content_6989f704df71e4_04792390 (\Smarty\Template $_smarty_tpl) {
function content_698aed2fac7079_66630300 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?>
<?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_3881550706989f704ddce33_55904583', "content");
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_701047722698aed2faa98f9_91663021', "content");
$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
}
/* {block "content"} */
class Block_3881550706989f704ddce33_55904583 extends \Smarty\Runtime\Block
class Block_701047722698aed2faa98f9_91663021 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views';
@ -123,12 +123,14 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views';
<!-- 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">
<div class="col-2">
<img src="./assests/img/Logo-Wordmark.svg" alt="" width="100">
</div>
<form method="POST">
<div class="col-4">
<div class="col-6">
<select class="form-select" aria-label="Default select example" name="user_id">
<option value="0">Choisir un utilisateur</option>
<?php
@ -172,11 +174,13 @@ $_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
<!-- 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">Modifier un catégorie existante</option>
<option value="0">Choix de la catégorie</option>
<?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrCategoryToDisplay'), 'category');
$foreach2DoElse = true;
@ -191,7 +195,10 @@ $foreach2DoElse = false;
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
</select>
<br>
<input type="text" class="form-control" id="floatingInput" name="new_name">
<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>
@ -205,7 +212,7 @@ $_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
<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">Créer une nouvelle catégorie</label>
<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>