Initial commit
This commit is contained in:
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