Initial commit
This commit is contained in:
67
lib/confient_web/templates/assignment/show.html.eex
Normal file
67
lib/confient_web/templates/assignment/show.html.eex
Normal file
@@ -0,0 +1,67 @@
|
||||
<h1>Devoir : <%= @assignment.title %> | Classe : <%= @assignment.class.name %></h1>
|
||||
|
||||
<span><%= link "Editer", to: Routes.assignment_path(@conn, :edit, @assignment) %></span>
|
||||
<span><%= link "Retour", to: Routes.assignment_path(@conn, :index) %></span>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Informations générales</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<strong>Classe:</strong>
|
||||
<%= @assignment.class.name %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Echéance:</strong>
|
||||
<%= @assignment.due %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Dénominateur:</strong>
|
||||
<%= @assignment.slug %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Liste des rendus pour ce devoir</h2>
|
||||
|
||||
<%= if length(@assignment.students_works) > 0 do %>
|
||||
<%= link "Générer une archive de tous les rendus", to: Routes.assignment_path(@conn, :archive, @assignment.id), target: "_blank" %>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Elève</th>
|
||||
<th>Date</th>
|
||||
<th>Action</th>
|
||||
<tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= for work <- @assignment.students_works do %>
|
||||
<tr>
|
||||
<td><%= link "#{work.student.lastname} #{work.student.firstname}", to: Routes.student_path(@conn, :show, work.student.id) %></td>
|
||||
<td><%= work.inserted_at %></td>
|
||||
<td><%= link "Télécharger", to: Path.join([Application.fetch_env!(:confient, :domain), "uploads", @assignment.class.name, @assignment.slug, work.path]), target: "_blank" %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p>Aucun rendu</p>
|
||||
<% end %>
|
||||
|
||||
<%= if length(@assignment.students_works) > 0 do %>
|
||||
|
||||
<h2>Liste des élèves n'ayant pas rendu ce devoir</h2>
|
||||
|
||||
<ul>
|
||||
<%= for stud <- @missing do %>
|
||||
<li><%= link "#{stud.lastname} #{stud.firstname}", to: Routes.student_path(@conn, :show, stud.id) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user