Initial commit
This commit is contained in:
50
resources/views/admin/backup/index.edge
Normal file
50
resources/views/admin/backup/index.edge
Normal file
@@ -0,0 +1,50 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<h1 class="text-2xl font-bold mb-6">Sauvegarde et Restauration</h1>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
|
||||
<!-- Export Section -->
|
||||
<div class="bg-white p-6 rounded shadow">
|
||||
<h2 class="text-xl font-semibold mb-4">Exporter les données</h2>
|
||||
<p class="text-gray-600 mb-4">
|
||||
Téléchargez une sauvegarde complète de la base de données au format JSON.
|
||||
<br>
|
||||
<span class="text-sm text-yellow-600">Note : Les fichiers médias (images, musiques) ne sont pas inclus dans ce fichier mais leurs références le sont.</span>
|
||||
</p>
|
||||
<a href="/admin/backup/export" class="bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700 inline-flex items-center">
|
||||
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"></path></svg>
|
||||
Télécharger la sauvegarde
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Import Section -->
|
||||
<div class="bg-white p-6 rounded shadow">
|
||||
<h2 class="text-xl font-semibold mb-4">Importer une sauvegarde</h2>
|
||||
<p class="text-gray-600 mb-4">
|
||||
Restaurez la base de données à partir d'un fichier JSON.
|
||||
<br>
|
||||
<span class="text-sm text-red-600 font-bold">ATTENTION : Cette action supprimera toutes les données actuelles !</span>
|
||||
</p>
|
||||
|
||||
<form action="/admin/backup/import" method="POST" enctype="multipart/form-data" onsubmit="return confirm('Êtes-vous sûr de vouloir écraser toutes les données actuelles ? Cette action est irréversible.');">
|
||||
{{{ csrfField() }}}
|
||||
<div class="mb-4">
|
||||
<input type="file" name="backup_file" accept=".json" required class="block w-full text-sm text-gray-500
|
||||
file:mr-4 file:py-2 file:px-4
|
||||
file:rounded-full file:border-0
|
||||
file:text-sm file:font-semibold
|
||||
file:bg-blue-50 file:text-blue-700
|
||||
hover:file:bg-blue-100
|
||||
"/>
|
||||
</div>
|
||||
<button type="submit" class="bg-red-600 text-white px-4 py-2 rounded hover:bg-red-700 inline-flex items-center">
|
||||
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"></path></svg>
|
||||
Importer et Restaurer
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endslot
|
||||
@end
|
||||
18
resources/views/admin/categories/form.edge
Normal file
18
resources/views/admin/categories/form.edge
Normal file
@@ -0,0 +1,18 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<h1 class="text-2xl font-bold mb-6">{{ category ? 'Modifier la catégorie' : 'Nouvelle catégorie' }}</h1>
|
||||
<form action="{{ category ? `/admin/categories/${category.id}` : '/admin/categories' }}" method="post" class="bg-white p-6 rounded shadow max-w-xl">
|
||||
{{{ csrfField() }}}
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700 mb-1">Nom</label>
|
||||
<input type="text" name="name" id="name" value="{{ category?.name || '' }}" required
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Enregistrer
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@endslot
|
||||
@end
|
||||
40
resources/views/admin/categories/index.edge
Normal file
40
resources/views/admin/categories/index.edge
Normal file
@@ -0,0 +1,40 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h1 class="text-2xl font-bold">Catégories</h1>
|
||||
<a href="/admin/categories/create" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Nouvelle catégorie
|
||||
</a>
|
||||
</div>
|
||||
<div class="bg-white rounded shadow overflow-hidden">
|
||||
<table class="min-w-full divide-y divide-gray-200">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">Nom</th>
|
||||
<th class="px-4 py-2 text-right text-sm font-medium text-gray-700">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@each(c in categories)
|
||||
<tr>
|
||||
<td class="px-4 py-2">{{ c.name }}</td>
|
||||
<td class="px-4 py-2 text-right">
|
||||
<a href="/admin/categories/{{ c.id }}/edit" class="text-blue-600 hover:underline mr-2">Modifier</a>
|
||||
<form action="/admin/categories/{{ c.id }}/delete" method="post" class="inline">
|
||||
{{{ csrfField() }}}
|
||||
<button type="submit" class="text-red-600 hover:underline" onclick="return confirm('Supprimer ?')">
|
||||
Supprimer
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="2" class="px-4 py-6 text-center text-gray-500">Aucune catégorie</td>
|
||||
</tr>
|
||||
@endeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endslot
|
||||
@end
|
||||
35
resources/views/admin/dashboard.edge
Normal file
35
resources/views/admin/dashboard.edge
Normal file
@@ -0,0 +1,35 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<h1 class="text-2xl font-bold mb-6">Dashboard</h1>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
||||
<a href="/admin/information/edit" class="bg-white p-6 rounded shadow hover:shadow-lg">
|
||||
<h2 class="font-semibold text-lg">Informations</h2>
|
||||
<p class="text-gray-600">{{ hasInformation ? 'Configuré' : 'Non configuré' }}</p>
|
||||
</a>
|
||||
<a href="/admin/projects" class="bg-white p-6 rounded shadow hover:shadow-lg">
|
||||
<h2 class="font-semibold text-lg">Projets</h2>
|
||||
<p class="text-gray-600">{{ projectsCount }} projet(s)</p>
|
||||
</a>
|
||||
<a href="/admin/music" class="bg-white p-6 rounded shadow hover:shadow-lg">
|
||||
<h2 class="font-semibold text-lg">Musiques</h2>
|
||||
<p class="text-gray-600">{{ musicsCount }} piste(s)</p>
|
||||
</a>
|
||||
<a href="/admin/categories" class="bg-white p-6 rounded shadow hover:shadow-lg">
|
||||
<h2 class="font-semibold text-lg">Catégories</h2>
|
||||
<p class="text-gray-600">{{ categoriesCount }} catégorie(s)</p>
|
||||
</a>
|
||||
<a href="/admin/tags" class="bg-white p-6 rounded shadow hover:shadow-lg">
|
||||
<h2 class="font-semibold text-lg">Tags</h2>
|
||||
<p class="text-gray-600">{{ tagsCount }} tag(s)</p>
|
||||
</a>
|
||||
<a href="/admin/experiences" class="bg-white p-6 rounded shadow hover:shadow-lg">
|
||||
<h2 class="font-semibold text-lg">Expériences</h2>
|
||||
<p class="text-gray-600">{{ experiencesCount }} expérience(s)</p>
|
||||
</a>
|
||||
<a href="/admin/trainings" class="bg-white p-6 rounded shadow hover:shadow-lg">
|
||||
<h2 class="font-semibold text-lg">Formations</h2>
|
||||
<p class="text-gray-600">{{ trainingsCount }} formation(s)</p>
|
||||
</a>
|
||||
</div>
|
||||
@endslot
|
||||
@end
|
||||
40
resources/views/admin/experiences/form.edge
Normal file
40
resources/views/admin/experiences/form.edge
Normal file
@@ -0,0 +1,40 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<h1 class="text-2xl font-bold mb-6">{{ experience ? 'Modifier l\'expérience' : 'Nouvelle expérience' }}</h1>
|
||||
<form action="{{ experience ? `/admin/experiences/${experience.id}` : '/admin/experiences' }}" method="post" class="bg-white p-6 rounded shadow max-w-2xl">
|
||||
{{{ csrfField() }}}
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700 mb-1">Nom / Titre</label>
|
||||
<input type="text" name="name" id="name" value="{{ experience?.name || '' }}" required
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="place" class="block text-sm font-medium text-gray-700 mb-1">Lieu / Entreprise</label>
|
||||
<input type="text" name="place" id="place" value="{{ experience?.place || '' }}"
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label for="start" class="block text-sm font-medium text-gray-700 mb-1">Date de début</label>
|
||||
<input type="date" name="start" id="start" value="{{ experience?.start ? experience.start.toISODate() : '' }}" required
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="end" class="block text-sm font-medium text-gray-700 mb-1">Date de fin</label>
|
||||
<input type="date" name="end" id="end" value="{{ experience?.end ? experience.end.toISODate() : '' }}"
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
<p class="text-xs text-gray-500 mt-1">Laisser vide pour "En cours"</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="missions" class="block text-sm font-medium text-gray-700 mb-1">Missions / Description</label>
|
||||
<textarea name="missions" id="missions" rows="5" class="w-full px-3 py-2 border rounded">{{ experience?.missions || '' }}</textarea>
|
||||
</div>
|
||||
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Enregistrer
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@endslot
|
||||
@end
|
||||
47
resources/views/admin/experiences/index.edge
Normal file
47
resources/views/admin/experiences/index.edge
Normal file
@@ -0,0 +1,47 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h1 class="text-2xl font-bold">Expériences Professionnelles</h1>
|
||||
<a href="/admin/experiences/create" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Nouvelle expérience
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded shadow overflow-hidden">
|
||||
<table class="w-full">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nom</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Lieu</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Période</th>
|
||||
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@each(experience in experiences)
|
||||
<tr>
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="text-sm font-medium text-gray-900">{{ experience.name }}</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="text-sm text-gray-500">{{ experience.place || '-' }}</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="text-sm text-gray-500">
|
||||
{{ experience.start.toFormat('MM/yyyy') }} - {{ experience.end ? experience.end.toFormat('MM/yyyy') : 'En cours' }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
||||
<a href="/admin/experiences/{{ experience.id }}/edit" class="text-indigo-600 hover:text-indigo-900 mr-4">Modifier</a>
|
||||
<form action="/admin/experiences/{{ experience.id }}/delete" method="POST" class="inline" onsubmit="return confirm('Êtes-vous sûr ?')">
|
||||
{{{ csrfField() }}}
|
||||
<button type="submit" class="text-red-600 hover:text-red-900">Supprimer</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endslot
|
||||
@end
|
||||
76
resources/views/admin/images/index.edge
Normal file
76
resources/views/admin/images/index.edge
Normal file
@@ -0,0 +1,76 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<div class="p-6">
|
||||
<h1 class="text-2xl font-bold mb-6">Gestionnaire d'Images</h1>
|
||||
|
||||
<!-- Upload Form -->
|
||||
<div class="bg-white p-6 rounded-lg shadow-md mb-8">
|
||||
<h2 class="text-lg font-semibold mb-4">Téléverser une nouvelle image</h2>
|
||||
<form action="/admin/images" method="POST" enctype="multipart/form-data" class="flex items-end gap-4">
|
||||
{{ csrfField() }}
|
||||
<div class="flex-1">
|
||||
<label for="image" class="block text-sm font-medium text-gray-700 mb-1">Fichier Image</label>
|
||||
<input
|
||||
type="file"
|
||||
name="image"
|
||||
id="image"
|
||||
accept="image/*"
|
||||
required
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded focus:ring-2 focus:ring-blue-500"
|
||||
>
|
||||
</div>
|
||||
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Téléverser
|
||||
</button>
|
||||
</form>
|
||||
@if(flashMessages.has('error'))
|
||||
<div class="mt-4 p-3 bg-red-100 text-red-700 rounded">
|
||||
{{ flashMessages.get('error') }}
|
||||
</div>
|
||||
@endif
|
||||
@if(flashMessages.has('success'))
|
||||
<div class="mt-4 p-3 bg-green-100 text-green-700 rounded">
|
||||
{{ flashMessages.get('success') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Image Grid -->
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-6">
|
||||
@each(image in images)
|
||||
<div class="bg-white rounded-lg shadow-sm overflow-hidden border border-gray-200 group relative">
|
||||
<div class="aspect-square bg-gray-100 relative">
|
||||
<img
|
||||
src="{{ image.filePath }}"
|
||||
alt="{{ image.originalName }}"
|
||||
class="w-full h-full object-cover"
|
||||
>
|
||||
<div class="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2">
|
||||
<button
|
||||
onclick="navigator.clipboard.writeText('{{ image.filePath }}')"
|
||||
class="bg-white text-gray-800 text-xs px-2 py-1 rounded hover:bg-gray-100"
|
||||
title="Copier le lien"
|
||||
>
|
||||
Copier Lien
|
||||
</button>
|
||||
<form action="/admin/images/{{ image.id }}?_method=DELETE" method="POST" onsubmit="return confirm('Supprimer cette image ?')">
|
||||
{{ csrfField() }}
|
||||
<button type="submit" class="bg-red-500 text-white text-xs px-2 py-1 rounded hover:bg-red-600">
|
||||
Supprimer
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-3 text-xs text-gray-500 truncate" title="{{ image.originalName }}">
|
||||
{{ image.originalName }}
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="col-span-full text-center text-gray-500 py-12">
|
||||
Aucune image trouvée.
|
||||
</div>
|
||||
@endeach
|
||||
</div>
|
||||
</div>
|
||||
@endslot
|
||||
@end
|
||||
44
resources/views/admin/information/form.edge
Normal file
44
resources/views/admin/information/form.edge
Normal file
@@ -0,0 +1,44 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<h1 class="text-2xl font-bold mb-6">Modifier les informations</h1>
|
||||
<form action="/admin/information" method="post" class="bg-white p-6 rounded shadow max-w-xl">
|
||||
{{{ csrfField() }}}
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700 mb-1">Nom</label>
|
||||
<input type="text" name="name" id="name" value="{{ information.name }}" required
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="headline" class="block text-sm font-medium text-gray-700 mb-1">Titre</label>
|
||||
<input type="text" name="headline" id="headline" value="{{ information.headline }}" required
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="contact" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
|
||||
<input type="email" name="contact" id="contact" value="{{ information.contact }}" required
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="linkedin" class="block text-sm font-medium text-gray-700 mb-1">LinkedIn</label>
|
||||
<input type="url" name="linkedin" id="linkedin" value="{{ information.linkedin || '' }}"
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="github" class="block text-sm font-medium text-gray-700 mb-1">GitHub</label>
|
||||
<input type="url" name="github" id="github" value="{{ information.github || '' }}"
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="birthday" class="block text-sm font-medium text-gray-700 mb-1">Date de naissance</label>
|
||||
<input type="date" name="birthday" id="birthday"
|
||||
value="{{ information.birthday ? information.birthday.toISODate() : '' }}"
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Enregistrer
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@endslot
|
||||
@end
|
||||
36
resources/views/admin/layouts/main.edge
Normal file
36
resources/views/admin/layouts/main.edge
Normal file
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Admin - Portfolio</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.13.3/dist/cdn.min.js"></script>
|
||||
</head>
|
||||
<body class="min-h-screen bg-gray-100">
|
||||
<nav class="bg-gray-800 text-white px-4 py-2">
|
||||
<div class="container mx-auto flex items-center justify-between">
|
||||
<a href="/admin" class="font-bold">Admin Portfolio</a>
|
||||
<div class="flex gap-4 flex-wrap">
|
||||
<a href="/admin" class="hover:underline">Dashboard</a>
|
||||
<a href="/admin/information/edit" class="hover:underline">Informations</a>
|
||||
<a href="/admin/projects" class="hover:underline">Projets</a>
|
||||
<a href="/admin/images" class="hover:underline">Images</a>
|
||||
<a href="/admin/music" class="hover:underline">Musiques</a>
|
||||
<a href="/admin/categories" class="hover:underline">Catégories</a>
|
||||
<a href="/admin/tags" class="hover:underline">Tags</a>
|
||||
<a href="/admin/experiences" class="hover:underline">Expériences</a>
|
||||
<a href="/admin/trainings" class="hover:underline">Formations</a>
|
||||
<a href="/admin/backup" class="hover:underline">Sauvegarde</a>
|
||||
<form action="/admin/logout" method="post" class="inline">
|
||||
{{{ csrfField() }}}
|
||||
<button type="submit" class="hover:underline">Déconnexion</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<main class="container mx-auto px-4 py-6">
|
||||
{{{ await $slots.main() }}}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
51
resources/views/admin/login.edge
Normal file
51
resources/views/admin/login.edge
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Connexion Admin - Portfolio</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
<body class="min-h-screen bg-gray-100 flex items-center justify-center">
|
||||
<div class="bg-white p-8 rounded shadow-md w-96">
|
||||
<h1 class="text-xl font-bold mb-6">Connexion Admin</h1>
|
||||
|
||||
@error('error')
|
||||
<div class="mb-4 p-3 bg-red-100 border border-red-400 text-red-700 rounded">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
|
||||
<form action="/admin/login" method="post">
|
||||
{{{ csrfField() }}}
|
||||
<div class="mb-4">
|
||||
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">Identifiant</label>
|
||||
<input
|
||||
type="text"
|
||||
name="email"
|
||||
id="email"
|
||||
value="{{ old('input.email') || '' }}"
|
||||
required
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded focus:ring-2 focus:ring-blue-500"
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-6">
|
||||
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">Mot de passe</label>
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
id="password"
|
||||
required
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded focus:ring-2 focus:ring-blue-500"
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
type="submit"
|
||||
class="w-full bg-blue-600 text-white py-2 rounded hover:bg-blue-700"
|
||||
>
|
||||
Se connecter
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
29
resources/views/admin/music/form.edge
Normal file
29
resources/views/admin/music/form.edge
Normal file
@@ -0,0 +1,29 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<h1 class="text-2xl font-bold mb-6">{{ music ? 'Modifier la musique' : 'Nouvelle musique' }}</h1>
|
||||
<form action="{{ music ? `/admin/music/${music.id}` : '/admin/music' }}?_method={{ music ? 'PUT' : 'POST' }}" method="post" enctype="multipart/form-data" class="bg-white p-6 rounded shadow max-w-xl">
|
||||
{{{ csrfField() }}}
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700 mb-1">Nom</label>
|
||||
<input type="text" name="name" id="name" value="{{ music?.name || '' }}" required
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="file" class="block text-sm font-medium text-gray-700 mb-1">Fichier Audio (MP3)</label>
|
||||
@if(music && music.url)
|
||||
<div class="mb-2 text-sm text-gray-600">
|
||||
Fichier actuel: <a href="{{ music.url }}" target="_blank" class="text-blue-600 hover:underline">{{ music.url }}</a>
|
||||
<audio controls src="{{ music.url }}" class="mt-2 w-full"></audio>
|
||||
</div>
|
||||
@endif
|
||||
<input type="file" name="file" id="file" accept=".mp3,.wav,.ogg" {{ music ? '' : 'required' }}
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Enregistrer
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@endslot
|
||||
@end
|
||||
42
resources/views/admin/music/index.edge
Normal file
42
resources/views/admin/music/index.edge
Normal file
@@ -0,0 +1,42 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h1 class="text-2xl font-bold">Musiques</h1>
|
||||
<a href="/admin/music/create" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Nouvelle piste
|
||||
</a>
|
||||
</div>
|
||||
<div class="bg-white rounded shadow overflow-hidden">
|
||||
<table class="min-w-full divide-y divide-gray-200">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">Nom</th>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">URL</th>
|
||||
<th class="px-4 py-2 text-right text-sm font-medium text-gray-700">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@each(m in musics)
|
||||
<tr>
|
||||
<td class="px-4 py-2">{{ m.name }}</td>
|
||||
<td class="px-4 py-2">{{ m.url }}</td>
|
||||
<td class="px-4 py-2 text-right">
|
||||
<a href="/admin/music/{{ m.id }}/edit" class="text-blue-600 hover:underline mr-2">Modifier</a>
|
||||
<form action="/admin/music/{{ m.id }}/delete" method="post" class="inline">
|
||||
{{{ csrfField() }}}
|
||||
<button type="submit" class="text-red-600 hover:underline" onclick="return confirm('Supprimer ?')">
|
||||
Supprimer
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="3" class="px-4 py-6 text-center text-gray-500">Aucune musique</td>
|
||||
</tr>
|
||||
@endeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endslot
|
||||
@end
|
||||
120
resources/views/admin/projects/form.edge
Normal file
120
resources/views/admin/projects/form.edge
Normal file
@@ -0,0 +1,120 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<h1 class="text-2xl font-bold mb-6">{{ project ? 'Modifier le projet' : 'Nouveau projet' }}</h1>
|
||||
<form action="{{ project ? `/admin/projects/${project.id}` : '/admin/projects' }}" method="post" class="bg-white p-6 rounded shadow max-w-2xl">
|
||||
{{{ csrfField() }}}
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label for="title" class="block text-sm font-medium text-gray-700 mb-1">Titre</label>
|
||||
<input type="text" name="title" id="title" value="{{ project?.title || '' }}" required
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="content" class="block text-sm font-medium text-gray-700 mb-1">Contenu (Markdown)</label>
|
||||
<textarea name="content" id="content" rows="8" class="w-full px-3 py-2 border rounded">{{ project?.content || '' }}</textarea>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label for="start" class="block text-sm font-medium text-gray-700 mb-1">Début</label>
|
||||
<input type="date" name="start" id="start" value="{{ project?.start ? project.start.toISODate() : '' }}"
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="end" class="block text-sm font-medium text-gray-700 mb-1">Fin</label>
|
||||
<input type="date" name="end" id="end" value="{{ project?.end ? project.end.toISODate() : '' }}"
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="thumbnailUrl" class="block text-sm font-medium text-gray-700 mb-1">Image miniature</label>
|
||||
<div x-data="{ open: false, selected: '{{ project?.thumbnailUrl || '' }}' }" class="relative">
|
||||
<input type="hidden" name="thumbnailUrl" x-model="selected">
|
||||
|
||||
<button type="button" @click="open = !open" class="w-full px-3 py-2 border rounded text-left flex items-center justify-between bg-white">
|
||||
<span x-text="selected ? selected.split('/').pop() : 'Sélectionner une image'"></span>
|
||||
<svg class="w-4 h-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
|
||||
</button>
|
||||
|
||||
<div x-show="open" @click.away="open = false" class="absolute z-10 w-full mt-1 bg-white border rounded shadow-lg max-h-60 overflow-y-auto grid grid-cols-3 gap-2 p-2">
|
||||
<div @click="selected = ''; open = false" class="col-span-3 p-2 hover:bg-gray-100 cursor-pointer text-sm text-gray-500 text-center border-b mb-2">
|
||||
Aucune image
|
||||
</div>
|
||||
@each(image in images)
|
||||
<div @click="selected = '{{ image.filePath }}'; open = false" class="cursor-pointer group relative aspect-square border rounded overflow-hidden hover:border-blue-500" :class="{'ring-2 ring-blue-500': selected === '{{ image.filePath }}'}">
|
||||
<img src="{{ image.filePath }}" alt="{{ image.originalName }}" class="w-full h-full object-cover">
|
||||
<div class="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 flex items-center justify-center text-white text-xs p-1 text-center transition-opacity">
|
||||
{{ image.originalName }}
|
||||
</div>
|
||||
</div>
|
||||
@endeach
|
||||
</div>
|
||||
|
||||
<!-- Preview of selected image -->
|
||||
<template x-if="selected">
|
||||
<div class="mt-2">
|
||||
<p class="text-xs text-gray-500 mb-1">Aperçu:</p>
|
||||
<img :src="selected" class="h-24 w-auto object-contain border rounded bg-gray-50">
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="categoryId" class="block text-sm font-medium text-gray-700 mb-1">Catégorie</label>
|
||||
<select name="categoryId" id="categoryId" class="w-full px-3 py-2 border rounded">
|
||||
<option value="">—</option>
|
||||
@each(cat in categories)
|
||||
<option value="{{ cat.id }}" {{ project?.categoryId === cat.id ? 'selected' : '' }}>{{ cat.name }}</option>
|
||||
@endeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
<!-- Tags Selection -->
|
||||
<div class="bg-gray-50 p-4 rounded border" x-data="{ search: '' }">
|
||||
<label class="block text-sm font-bold text-gray-700 mb-2 border-b pb-1">Tags</label>
|
||||
<input type="text" x-model="search" placeholder="Rechercher..." class="w-full px-2 py-1 mb-2 border rounded text-sm mb-2">
|
||||
<div class="max-h-60 overflow-y-auto space-y-2 pr-2">
|
||||
@each(tag in tags)
|
||||
<label class="flex items-center hover:bg-gray-100 p-1 rounded cursor-pointer transition-colors" x-show="'{{ tag.name.toLowerCase() }}'.includes(search.toLowerCase())">
|
||||
<input type="checkbox" name="tagIds" value="{{ tag.id }}" class="mr-2 h-4 w-4 text-blue-600 rounded border-gray-300 focus:ring-blue-500"
|
||||
{{ project?.tags?.find(t => t.id === tag.id) ? 'checked' : '' }} />
|
||||
<span class="text-sm text-gray-700" style="color: {{ tag.color }}">{{ tag.name }}</span>
|
||||
</label>
|
||||
@endeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Trainings Selection -->
|
||||
<div class="bg-gray-50 p-4 rounded border">
|
||||
<label class="block text-sm font-bold text-gray-700 mb-2 border-b pb-1">Formations</label>
|
||||
<div class="max-h-60 overflow-y-auto space-y-2 pr-2">
|
||||
@each(t in trainings)
|
||||
<label class="flex items-center hover:bg-gray-100 p-1 rounded cursor-pointer transition-colors">
|
||||
<input type="checkbox" name="trainingIds" value="{{ t.id }}" class="mr-2 h-4 w-4 text-blue-600 rounded border-gray-300 focus:ring-blue-500"
|
||||
{{ project?.trainings?.find(tr => tr.id === t.id) ? 'checked' : '' }} />
|
||||
<span class="text-sm text-gray-700">{{ t.name }}</span>
|
||||
</label>
|
||||
@endeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Experiences Selection -->
|
||||
<div class="bg-gray-50 p-4 rounded border">
|
||||
<label class="block text-sm font-bold text-gray-700 mb-2 border-b pb-1">Expériences</label>
|
||||
<div class="max-h-60 overflow-y-auto space-y-2 pr-2">
|
||||
@each(e in experiences)
|
||||
<label class="flex items-center hover:bg-gray-100 p-1 rounded cursor-pointer transition-colors">
|
||||
<input type="checkbox" name="experienceIds" value="{{ e.id }}" class="mr-2 h-4 w-4 text-blue-600 rounded border-gray-300 focus:ring-blue-500"
|
||||
{{ project?.experiences?.find(exp => exp.id === e.id) ? 'checked' : '' }} />
|
||||
<span class="text-sm text-gray-700">{{ e.name }} - {{e.place }}</span>
|
||||
</label>
|
||||
@endeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Enregistrer
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@endslot
|
||||
@end
|
||||
44
resources/views/admin/projects/index.edge
Normal file
44
resources/views/admin/projects/index.edge
Normal file
@@ -0,0 +1,44 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h1 class="text-2xl font-bold">Projets</h1>
|
||||
<a href="/admin/projects/create" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Nouveau projet
|
||||
</a>
|
||||
</div>
|
||||
<div class="bg-white rounded shadow overflow-hidden">
|
||||
<table class="min-w-full divide-y divide-gray-200">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">Titre</th>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">Catégorie</th>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">Début</th>
|
||||
<th class="px-4 py-2 text-right text-sm font-medium text-gray-700">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@each(p in projects)
|
||||
<tr>
|
||||
<td class="px-4 py-2">{{ p.title }}</td>
|
||||
<td class="px-4 py-2">{{ p.category?.name || '-' }}</td>
|
||||
<td class="px-4 py-2">{{ p.start ? p.start.toISODate() : '-' }}</td>
|
||||
<td class="px-4 py-2 text-right">
|
||||
<a href="/admin/projects/{{ p.id }}/edit" class="text-blue-600 hover:underline mr-2">Modifier</a>
|
||||
<form action="/admin/projects/{{ p.id }}/delete" method="post" class="inline">
|
||||
{{{ csrfField() }}}
|
||||
<button type="submit" class="text-red-600 hover:underline" onclick="return confirm('Supprimer ?')">
|
||||
Supprimer
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="4" class="px-4 py-6 text-center text-gray-500">Aucun projet</td>
|
||||
</tr>
|
||||
@endeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endslot
|
||||
@end
|
||||
34
resources/views/admin/tags/form.edge
Normal file
34
resources/views/admin/tags/form.edge
Normal file
@@ -0,0 +1,34 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h1 class="text-2xl font-bold">{{ tag ? 'Modifier le tag' : 'Nouveau tag' }}</h1>
|
||||
</div>
|
||||
|
||||
<form action="{{ tag ? `/admin/tags/${tag.id}` : '/admin/tags' }}" method="POST" class="bg-white rounded shadow p-6 max-w-lg">
|
||||
{{{ csrfField() }}}
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="name" class="block text-gray-700 text-sm font-bold mb-2">Nom</label>
|
||||
<input type="text" name="name" id="name" value="{{ tag?.name || '' }}" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="color" class="block text-gray-700 text-sm font-bold mb-2">Couleur (Hex/Nom)</label>
|
||||
<div class="flex gap-2">
|
||||
<input type="text" name="color" id="color" value="{{ tag?.color || defaultColor || '#000000' }}" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" placeholder="#000000">
|
||||
<input type="color" onchange="document.getElementById('color').value = this.value" value="{{ tag?.color || defaultColor || '#000000' }}" class="h-10 w-10 border rounded cursor-pointer">
|
||||
</div>
|
||||
<p class="text-xs text-gray-500 mt-1">Optionnel. Utilisé pour l'affichage.</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between">
|
||||
<button type="submit" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
|
||||
Enregistrer
|
||||
</button>
|
||||
<a href="/admin/tags" class="inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800">
|
||||
Annuler
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
@endslot
|
||||
@end
|
||||
42
resources/views/admin/tags/index.edge
Normal file
42
resources/views/admin/tags/index.edge
Normal file
@@ -0,0 +1,42 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h1 class="text-2xl font-bold">Tags</h1>
|
||||
<a href="/admin/tags/create" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Nouveau tag
|
||||
</a>
|
||||
</div>
|
||||
<div class="bg-white rounded shadow overflow-hidden">
|
||||
<table class="min-w-full divide-y divide-gray-200">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">Nom</th>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">Couleur</th>
|
||||
<th class="px-4 py-2 text-right text-sm font-medium text-gray-700">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@each(t in tags)
|
||||
<tr>
|
||||
<td class="px-4 py-2">{{ t.name }}</td>
|
||||
<td class="px-4 py-2">{{ t.color || '-' }}</td>
|
||||
<td class="px-4 py-2 text-right">
|
||||
<a href="/admin/tags/{{ t.id }}/edit" class="text-blue-600 hover:underline mr-2">Modifier</a>
|
||||
<form action="/admin/tags/{{ t.id }}/delete" method="post" class="inline">
|
||||
{{{ csrfField() }}}
|
||||
<button type="submit" class="text-red-600 hover:underline" onclick="return confirm('Supprimer ?')">
|
||||
Supprimer
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="3" class="px-4 py-6 text-center text-gray-500">Aucun tag</td>
|
||||
</tr>
|
||||
@endeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endslot
|
||||
@end
|
||||
39
resources/views/admin/trainings/form.edge
Normal file
39
resources/views/admin/trainings/form.edge
Normal file
@@ -0,0 +1,39 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<h1 class="text-2xl font-bold mb-6">{{ training ? 'Modifier la formation' : 'Nouvelle formation' }}</h1>
|
||||
<form action="{{ training ? `/admin/trainings/${training.id}` : '/admin/trainings' }}" method="post" class="bg-white p-6 rounded shadow max-w-xl">
|
||||
{{{ csrfField() }}}
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700 mb-1">Nom</label>
|
||||
<input type="text" name="name" id="name" value="{{ training?.name || '' }}" required
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label for="start" class="block text-sm font-medium text-gray-700 mb-1">Début</label>
|
||||
<input type="date" name="start" id="start" value="{{ training?.start ? training.start.toISODate() : '' }}"
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="end" class="block text-sm font-medium text-gray-700 mb-1">Fin</label>
|
||||
<input type="date" name="end" id="end" value="{{ training?.end ? training.end.toISODate() : '' }}"
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="skill" class="block text-sm font-medium text-gray-700 mb-1">Compétence</label>
|
||||
<textarea name="skill" id="skill" class="w-full px-3 py-2 border rounded">{{ training?.skill || '' }}</textarea>
|
||||
</div>
|
||||
<div>
|
||||
<label for="place" class="block text-sm font-medium text-gray-700 mb-1">Lieu</label>
|
||||
<input type="text" name="place" id="place" value="{{ training?.place || '' }}"
|
||||
class="w-full px-3 py-2 border rounded" />
|
||||
</div>
|
||||
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Enregistrer
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@endslot
|
||||
@end
|
||||
46
resources/views/admin/trainings/index.edge
Normal file
46
resources/views/admin/trainings/index.edge
Normal file
@@ -0,0 +1,46 @@
|
||||
@component('admin/layouts/main')
|
||||
@slot('main')
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h1 class="text-2xl font-bold">Formations</h1>
|
||||
<a href="/admin/trainings/create" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
Nouvelle formation
|
||||
</a>
|
||||
</div>
|
||||
<div class="bg-white rounded shadow overflow-hidden">
|
||||
<table class="min-w-full divide-y divide-gray-200">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">Nom</th>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">Début</th>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">Fin</th>
|
||||
<th class="px-4 py-2 text-left text-sm font-medium text-gray-700">Compétence</th>
|
||||
<th class="px-4 py-2 text-right text-sm font-medium text-gray-700">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@each(t in trainings)
|
||||
<tr>
|
||||
<td class="px-4 py-2">{{ t.name }}</td>
|
||||
<td class="px-4 py-2">{{ t.start ? t.start.toISODate() : '-' }}</td>
|
||||
<td class="px-4 py-2">{{ t.end ? t.end.toISODate() : '-' }}</td>
|
||||
<td class="px-4 py-2">{{ t.skill || '-' }}</td>
|
||||
<td class="px-4 py-2 text-right">
|
||||
<a href="/admin/trainings/{{ t.id }}/edit" class="text-blue-600 hover:underline mr-2">Modifier</a>
|
||||
<form action="/admin/trainings/{{ t.id }}/delete" method="post" class="inline">
|
||||
{{{ csrfField() }}}
|
||||
<button type="submit" class="text-red-600 hover:underline" onclick="return confirm('Supprimer ?')">
|
||||
Supprimer
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="5" class="px-4 py-6 text-center text-gray-500">Aucune formation</td>
|
||||
</tr>
|
||||
@endeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endslot
|
||||
@end
|
||||
Reference in New Issue
Block a user