Initial commit
This commit is contained in:
52
lib/confient_web/templates/student/show.html.eex
Normal file
52
lib/confient_web/templates/student/show.html.eex
Normal file
@@ -0,0 +1,52 @@
|
||||
<h1><%= @student.lastname %> - <%= @student.firstname %></h1>
|
||||
|
||||
<span><%= link "Editer", to: Routes.student_path(@conn, :edit, @student) %></span>
|
||||
<span><%= link "Retour", to: Routes.student_path(@conn, :index) %></span>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Informations générales</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<strong>Nom:</strong>
|
||||
<%= @student.lastname %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Prénom:</strong>
|
||||
<%= @student.firstname %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Classe:</strong>
|
||||
<%= @student.class.name %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Rendus</h2>
|
||||
|
||||
<%= if length(@student.students_works) > 0 do %>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Titre</th>
|
||||
<th>Date</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= for work <- @student.students_works do %>
|
||||
<tr>
|
||||
<td><%= work.assignment.title %></td>
|
||||
<td><%= work.inserted_at %></td>
|
||||
<td><%= link "Télécharger", to: Path.join([ConfientWeb.Endpoint.url(), "uploads", @student.class.name, work.assignment.slug, work.path]), target: "_blank" %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p>Aucun devoir rendu</p>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user