Initial commit
This commit is contained in:
29
lib/confient_web/templates/class/index.html.eex
Normal file
29
lib/confient_web/templates/class/index.html.eex
Normal file
@@ -0,0 +1,29 @@
|
||||
<h1>Liste des classes</h1>
|
||||
|
||||
<span><%= link "Ajouter une classe", to: Routes.class_path(@conn, :new) %></span>
|
||||
|
||||
<hr>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Nombre d'élèves</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= for class <- @classes do %>
|
||||
<tr>
|
||||
<td><%= class.name %></td>
|
||||
<td><%= length(class.students) %></td>
|
||||
|
||||
<td>
|
||||
<span><%= link "Voir", to: Routes.class_path(@conn, :show, class) %></span>
|
||||
<span><%= link "Editer", to: Routes.class_path(@conn, :edit, class) %></span>
|
||||
<span><%= link "Supprimer", to: Routes.class_path(@conn, :delete, class), method: :delete, data: [confirm: "Vous êtes sur ?"] %></span>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user