Ajout de la vue index pour afficher les tâches avec leurs niveaux et états
This commit is contained in:
47
laravel/resources/views/index.blade.php
Normal file
47
laravel/resources/views/index.blade.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Tasks !</title>
|
||||
<style>
|
||||
.termine { color: green; font-weight: bold; }
|
||||
.encours { color: red; font-weight: bold; }
|
||||
</style>
|
||||
{{-- <link rel="stylesheet" href="https://cdn.datatables.net/2.3.2/css/dataTables.dataTables.min.css"> --}}
|
||||
</head>
|
||||
<body>
|
||||
<div id="contenu">
|
||||
<table id="tasks">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Priority</th>
|
||||
<th>Titre</th>
|
||||
<th>Detail</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($tasks as $task)
|
||||
<tr>
|
||||
<td>{{ $task->level->name }}</td>
|
||||
<td>{{ $task->title }}</td>
|
||||
<td>{{ $task->details }} €</td>
|
||||
<td>
|
||||
@if($task->state)
|
||||
<span class="termine">Terminé</span>
|
||||
@else
|
||||
<span class="encours">En cours</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/2.3.2/js/dataTables.min.js"></script>
|
||||
<script>
|
||||
new DataTable("#tasks")
|
||||
</script> --}}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user