43 lines
1.7 KiB
Plaintext
43 lines
1.7 KiB
Plaintext
@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
|