refonte arborescence + correction des chemins

This commit is contained in:
ben
2025-12-09 17:14:35 +01:00
parent f0fbae505f
commit f79ee1e7b6
40 changed files with 185 additions and 144 deletions

View File

@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ajouter une paire avant/après</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<style>
body {
background: #f4f6f9;
padding: 30px;
}
.container {
max-width: 800px;
margin-top: 100px;
}
.img-preview {
max-width: 150px;
border-radius: 8px;
display: none; /* cachée tant qu'il n'y a pas d'image */
}
</style>
</head>
<body>
<div class="container">
<h2 class="mb-5 text-center">Ajouter une paire avant/après</h2>
<!-- Message succès -->
<div id="successMsg" class="alert alert-success d-none">
Nouvelle paire ajoutée avec succès !
</div>
<!-- Message erreur -->
<div id="errorMsg" class="alert alert-danger d-none">
Merci de remplir tous les champs obligatoires.
</div>
<form id="addPairForm">
<!-- Titre / label -->
<div class="mb-3">
<label class="form-label">Titre de la paire *</label>
<input type="text" id="pairTitle" class="form-control" required>
</div>
<!-- Type -->
<div class="mb-3">
<label class="form-label">Type *</label>
<select id="pairType" class="form-select" required>
<option value="">-- Choisir --</option>
<option value="Chien">Chien</option>
<option value="Chat">Chat</option>
<option value="Autre">Autre</option>
</select>
</div>
<!-- Image AVANT -->
<div class="mb-4">
<label class="form-label">Image AVANT *</label>
<input type="file" id="beforeImage" class="form-control" accept="image/*">
<img id="beforePreview" class="img-preview border mt-2">
</div>
<!-- Image APRÈS -->
<div class="mb-4">
<label class="form-label">Image APRÈS *</label>
<input type="file" id="afterImage" class="form-control" accept="image/*">
<img id="afterPreview" class="img-preview border mt-2">
</div>
<!-- Boutons -->
<div class="d-flex justify-content-between">
<a href="../liste_avant_apres/liste_avant_apres.html" class="btn btn-secondary">Annuler</a>
<button type="submit" class="btn btn-primary">Ajouter</button>
</div>
</form>
</div>
<script src="ajouter_avant_apres.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ajouter une catégorie</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<style>
body {
background: #f4f6f981;
}
.container {
max-width: 600px;
margin-top: 50px;
}
</style>
</head>
<body>
<div class="container">
<h1 class="mb-5 text-center">Ajouter une prestation</h2>
<!--Erreur champ vide -->
<div id="errorEmpty" class="alert alert-danger d-none">Le titre est obligatoire.</div>
<!--Erreur nom deja existant -->
<div id="errorExists" class="alert alert-danger d-none">Cette prestation existe déjà. Veuillez en choisir
une autre.</div>
<!--Succès ajout catégorie -->
<div id="successMessage" class="alert alert-success d-none">Prestation ajoutée avec succès !</div>
<form id="addCategoryForm">
<div class="mb-4">
<label class="form-label fw-bold">Titre de la prestation (obligatoire)</label>
<input type="text" id="categoryName" class="form-control" required>
</div>
<div class="mb-3">
<label class="form-label fw-bold">Type de prestation</label>
<select id="prestationType" class="form-select">
<option value="chien" selected>Chien</option>
<option value="chat">Chat</option>
</select>
</div>
<!--Description (liste à puces)-->
<div class="mb-3">
<label class="form-label fw-bold">Description de la prestation</label>
<textarea id="prestationDescription" class="form-control" rows="5">
</textarea>
</div>
<!--Tariffs-->
<div class="mb-3">
<label class="form-label fw-bold">Tarif (fourchette)</label>
<div class="d-flex gap-3">
<input type="number" id="priceMin" class="form-control" placeholder="Prix min (€)" value="35">
<input type="number" id="priceMax" class="form-control" placeholder="Prix max (€)" value="60">
</div>
</div>
<div class="d-flex gap-3 mt-4">
<a href="../../prestations/liste_prestation/liste_prestation.html" class="btn btn-secondary w-50">Annuler</a>
<button type="submit" class="btn btn-primary w-50">Ajouter</button>
</div>
</form>
</div>
<script src="ajouter_prestation.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,74 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ajouter un slide</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background: #f4f6f9;
padding: 40px;
}
.container {
max-width: 600px;
}
</style>
</head>
<body>
<div class="container">
<h2 class="text-center mb-4">Ajouter une image au slider</h2>
<!-- Erreur : image manquante -->
<div id="errorEmpty" class="alert alert-danger d-none">
Merci de sélectionner une image.
</div>
<!-- Erreur : format invalide -->
<div id="errorFormat" class="alert alert-danger d-none">
Format d'image invalide. Formats acceptés : JPG, PNG, WEBP.
</div>
<!-- Succès -->
<div id="successMsg" class="alert alert-success d-none">
Slide ajouté avec succès !
</div>
<form id="addSlideForm">
<!-- Image -->
<div class="mb-3">
<label class="form-label fw-bold">Image du slide (obligatoire)</label>
<input type="file" id="slideImage" class="form-control" accept="image/*">
</div>
<!-- ALT -->
<div class="mb-3">
<label class="form-label fw-bold">Texte ALT (obligatoire)</label>
<input type="text" id="slideAlt" class="form-control" placeholder="Description de limage">
</div>
<!-- Titre -->
<div class="mb-3">
<label class="form-label fw-bold">Titre (optionnel)</label>
<input type="text" id="slideTitle" class="form-control">
</div>
<!-- Boutons -->
<div class="d-flex gap-3 mt-4">
<a href="../../../slider/liste_slider/liste_slider.html" class="btn btn-secondary w-50">Annuler</a>
<button type="submit" class="btn btn-primary w-50">Ajouter</button>
</div>
</form>
</div>
<script src="ajouter_slider.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Liste des paires avant/apres</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<style>
body {
background: #f4f6f9;
padding: 30px;
}
.container {
margin-top: 100px;
}
.action-btns button,
.action-btns a {
margin-right: 100px;
}
</style>
</head>
<body>
<div class="container">
<h2 class="mb-5 text-center">Liste des paires avant/apres</h2>
<!--Message succès-->
<div id="succesDeleteMsg" class="alert alert-success d-none">Paire supprimée avec succès !</div>
<div class="d-flex justify-content-end mb-4">
<a href="../ajouter_avant_apres/ajouter_avant_apres.html" class="btn btn-primary">Ajouter une paire</a>
</div>
<table class="table table-striped table-hover align-middle">
<thead class="table-dark">
<tr>
<th>Titre paire</th>
<th>Type</th>
<th>Avant</th>
<th>Apres</th>
<th class="text-center">Actions</th>
</tr>
</thead>
<tbody id="prestationTableBody">
<!--JS-->
</tbody>
</table>
</div>
<script src="liste_avant_apres.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Liste des prestations</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<style>
body {
background: #f4f6f9;
padding: 30px;
}
.container {
margin-top: 100px;
}
.action-btns button,
.action-btns a {
margin-right: 100px;
}
</style>
</head>
<body>
<div class="container">
<h2 class="mb-5 text-center">Liste des prestations</h2>
<!--Message succès-->
<div id="succesDeleteMsg" class="alert alert-success d-none">Prestation supprimée avec succès !</div>
<div class="d-flex justify-content-end mb-4">
<a href="../ajouter_prestation/ajouter_prestation.html" class="btn btn-primary">Ajouter une prestation</a>
</div>
<table class="table table-striped table-hover align-middle">
<thead class="table-dark">
<tr>
<th>Titre</th>
<th>Type</th>
<th>Description</th>
<th>Tarif</th>
<th class="text-center">Actions</th>
</tr>
</thead>
<tbody id="prestationTableBody">
<!--Rempli en JS-->
</tbody>
</table>
</div>
<script src="../../prestations/liste_prestation/liste_prestation.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Liste des slides</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background: #f4f6f9;
padding: 40px;
}
.container {
max-width: 900px;
}
.miniature {
width: 90px;
height: 60px;
object-fit: cover;
border-radius: 5px;
}
.action-buttons button,
.action-buttons a {
margin-right: 8px;
}
</style>
</head>
<body>
<div class="container">
<h2 class="text-center mb-4">Slider Liste des images</h2>
<!-- Message succès (suppression / ordre) -->
<div id="successMsg" class="alert alert-success d-none"></div>
<!-- Bouton ajouter -->
<div class="d-flex justify-content-end mb-4">
<a href="../../slider/ajouter_slider/ajouter_slider.html" class="btn btn-primary">Ajouter une image au slider</a>
</div>
<table class="table table-striped table-hover align-middle">
<thead class="table-dark">
<tr>
<th>Image</th>
<th>Texte ALT</th>
<th>Titre</th>
<th>Ordre</th>
<th class="text-center">Actions</th>
</tr>
</thead>
<tbody id="sliderTableBody">
<!-- rempli en JS -->
</tbody>
</table>
</div>
<script src="liste_slider.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,104 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modifier une paire avant/après</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<style>
body {
background: #f4f6f9;
padding: 30px;
}
.container {
margin-top: 100px;
max-width: 800px;
}
.img-preview {
max-width: 150px;
border-radius: 8px;
}
</style>
</head>
<body>
<div class="container">
<h2 class="mb-5 text-center">Modifier une paire avant/après</h2>
<!-- Messages -->
<div id="successMsg" class="alert alert-success d-none">
La paire avant/après a été modifiée avec succès.
</div>
<div id="errorMsg" class="alert alert-danger d-none">
Une erreur est survenue. Merci de vérifier le formulaire.
</div>
<!-- Formulaire de modification -->
<form id="editPairForm">
<!-- ID caché -->
<input type="hidden" id="pairId">
<!-- Titre / label -->
<div class="mb-3">
<label for="pairTitle" class="form-label">Titre / label de la paire *</label>
<input type="text" class="form-control" id="pairTitle" required>
</div>
<!-- Type -->
<div class="mb-3">
<label for="pairType" class="form-label">Type</label>
<select id="pairType" class="form-select">
<option value="Chien">Chien</option>
<option value="Chat">Chat</option>
<option value="Autre">Autre</option>
</select>
</div>
<!-- Image AVANT -->
<div class="mb-4 row">
<div class="col-md-6">
<label class="form-label" for="beforeImage">Image AVANT</label>
<input type="file" class="form-control" id="beforeImage" accept="image/*">
<div class="form-text">
Laisser vide pour conserver l'image actuelle.
</div>
</div>
<div class="col-md-6 text-center">
<p class="mb-1">Aperçu actuel AVANT</p>
<img id="beforePreview" src="" alt="Image avant" class="img-preview border">
</div>
</div>
<!-- Image APRES -->
<div class="mb-4 row">
<div class="col-md-6">
<label class="form-label" for="afterImage">Image APRÈS</label>
<input type="file" class="form-control" id="afterImage" accept="image/*">
<div class="form-text">
Laisser vide pour conserver l'image actuelle.
</div>
</div>
<div class="col-md-6 text-center">
<p class="mb-1">Aperçu actuel APRÈS</p>
<img id="afterPreview" src="" alt="Image après" class="img-preview border">
</div>
</div>
<!-- Boutons -->
<div class="d-flex justify-content-between">
<a href="../liste_avant_apres/liste_avant_apres.html" class="btn btn-secondary">
Annuler
</a>
<button type="submit" class="btn btn-primary">
Enregistrer les modifications
</button>
</div>
</form>
</div>
<script src="modifier_avant_apres.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modifier une prestation</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<style>
body {
background: #f4f6f9;
}
.container {
max-width: 700px;
margin-top: 40px;
}
</style>
</head>
<body>
<div class="container">
<h2 class="mb-4 text-center">Modifier une prestation</h2>
<!--Erreur-->
<div id="errorEmpty" class="alert alert-danger d-none">Le titre est obligatoire.</div>
<div id="errorTechnical" class="alert alert-danger d-none">Une erreur est survenue. Veuillez réessayer plus tard.</div>
<!--Succès-->
<div id="successMsg" class="alert alert-success d-none">Prestation modifiée avec succès !</div>
<form id="editPrestationForm">
<!--Titre-->
<div class="mb-3">
<label class="form-label fw-bold">Titre de la prestation (obligatoire)</label>
<input type="text" id="prestationTitle" class="form-control" value="Toilettage complet pour chien">
</div>
<!--Type-->
<div class="mb-3">
<label class="form-label fw-bold">Type de prestation</label>
<select id="prestationType" class="form-select">
<option value="chien" selected>Chien</option>
<option value="chat">Chat</option>
</select>
</div>
<!--Description (liste à puces)-->
<div class="mb-3">
<label class="form-label fw-bold">Description de la prestation</label>
<textarea id="prestationDescription" class="form-control" rows="5">
• Bain complet
• Séchage
• Coupe aux ciseaux
• Nettoyage des oreilles</textarea>
</div>
<!--Tariffs-->
<div class="mb-3">
<label class="form-label fw-bold">Tarif (fourchette)</label>
<div class="d-flex gap-3">
<input type="number" id="priceMin" class="form-control" placeholder="Prix min (€)" value="35">
<input type="number" id="priceMax" class="form-control" placeholder="Prix max (€)" value="60">
</div>
</div>
<!-- Boutons -->
<div class="d-flex gap-3 mt-4">
<a href="../../prestations/liste_prestation/liste_prestation.html" class="btn btn-secondary w-50">Annuler</a>
<button type="submit" class="btn btn-primary w-50">Enregistrer les modifications</button>
</div>
</form>
</div>
<script src="modifier_prestation.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modifier un slide</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background: #f4f6f9;
}
.container {
max-width: 600px;
margin-top: 40px;
}
.miniature {
width: 150px;
height: 90px;
object-fit: cover;
border-radius: 5px;
margin-bottom: 15px;
}
</style>
</head>
<body>
<div class="container">
<h2 class="text-center mb-5">Modifier une image du slider</h2>
<!-- Messages -->
<div id="errorMsg" class="alert alert-danger d-none"></div>
<div id="successMsg" class="alert alert-success d-none">Slide modifié avec succès !</div>
<form id="editSlideForm">
<!-- Image actuelle -->
<div class="mb-5">
<label class="form-label fw-bold">Image actuelle :</label><br>
<img id="currentImage" src="#" alt="Image actuelle" class="miniature">
</div>
<!-- Remplacer limage -->
<div class="mb-3">
<label class="form-label fw-bold">Nouvelle image (optionnel) :</label>
<input type="file" id="newImage" class="form-control" accept="image/*">
</div>
<!-- Texte ALT -->
<div class="mb-3">
<label class="form-label fw-bold">Texte alternatif (obligatoire)</label>
<input type="text" id="slideAlt" class="form-control">
</div>
<!-- Titre -->
<div class="mb-3">
<label class="form-label fw-bold">Titre du slide (optionnel)</label>
<input type="text" id="slideTitle" class="form-control">
</div>
<!-- Boutons -->
<div class="d-flex gap-3 mt-4">
<a href="../liste_slider/liste_slider.html" class="btn btn-secondary w-50">Annuler</a>
<button type="submit" class="btn btn-primary w-50">Enregistrer</button>
</div>
</form>
</div>
<script src="modifier_slider.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,74 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin - Prestations</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background: #f4f6f9;
padding: 40px;
}
.menu-card {
transition: 0.2s;
cursor: pointer;
}
.menu-card:hover {
transform: scale(1.03);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}
.menu-icon {
font-size: 40px;
}
</style>
</head>
<body>
<div class="container text-center">
<h2 class="mb-5">Gestion des prestations</h2>
<div class="row g-4">
<!-- Prestations -->
<div class="col-md-4">
<a href="../liste_prestation/liste_prestation.html" class="text-decoration-none">
<div class="card p-4 menu-card">
<div class="menu-icon">💼</div>
<h4 class="mt-3 text-dark">Gérer les prestations</h4>
<p class="text-muted">Ajouter, modifier, supprimer les prestations.</p>
</div>
</a>
</div>
<!-- Slider -->
<div class="col-md-4">
<a href="../slider/liste_slider/liste_slider.html" class="text-decoration-none">
<div class="card p-4 menu-card">
<div class="menu-icon">🎞️</div>
<h4 class="mt-3 text-dark">Gérer le slider</h4>
<p class="text-muted">Images du slider de la page Prestations chiens.</p>
</div>
</a>
</div>
<!-- Avant / Après -->
<div class="col-md-4">
<a href="../avant_apres/liste_avant_apres/liste_avant_apres.html" class="text-decoration-none">
<div class="card p-4 menu-card">
<div class="menu-icon">🖼️</div>
<h4 class="mt-3 text-dark">Galerie Avant / Après</h4>
<p class="text-muted">Ajouter, modifier ou supprimer les photos.</p>
</div>
</a>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,70 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Voir la paire avant/après</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<style>
body {
background: #f4f6f9;
padding: 30px;
}
.container {
max-width: 800px;
margin-top: 100px;
}
.img-preview {
max-width: 250px;
border-radius: 10px;
}
</style>
</head>
<body>
<div class="container">
<h2 class="mb-5 text-center">Détails de la paire avant/après</h2>
<!-- Message erreur -->
<div id="errorMsg" class="alert alert-danger d-none">
Impossible d'afficher cette paire.
</div>
<div id="detailsSection">
<!-- Titre -->
<h4 id="pairTitle" class="text-center mb-4"></h4>
<div class="d-flex justify-content-around align-items-center mb-4">
<div class="text-center">
<p class="fw-bold">AVANT</p>
<img id="beforePreview" class="img-preview border" src="">
</div>
<div class="text-center">
<p class="fw-bold">APRÈS</p>
<img id="afterPreview" class="img-preview border" src="">
</div>
</div>
<!-- Bouton retour -->
<div class="text-center mt-4">
<a href="../liste_avant_apres/liste_avant_apres.html" class="btn btn-secondary">
Retour à la liste
</a>
</div>
</div>
</div>
<script src="voir_avant_apres.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>