Initial commit
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user