training-management-system/templates/training_list.html

41 lines
No EOL
1 KiB
HTML

{{ template "preamble.html" }}
<p><a href="/trainings/add"><button>Add New Training</button></a></p>
<h1>Trainings</h1>
<table>
<thead>
<tr>
<th>Title</th>
<th>Type</th>
<th>Mode</th>
<th>Start</th>
<th>End</th>
<th>Status</th>
<th>Trainers</th>
</tr>
</thead>
<tbody>
{{range .}}
<tr>
<td>{{.Title}}</td>
<td>{{.TrainingType}}</td>
<td>{{.Mode}}</td>
<td>{{.Start.Format "2006-01-02 15:04"}}</td>
<td>{{.End.Format "2006-01-02 15:04"}}</td>
<td>{{.Status}}</td>
<td>
{{if .Trainers}}
{{range .Trainers}}
{{.Name}} ({{.Email}})<br>
{{end}}
{{else}}
No trainers assigned
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
{{template "epilogue.html" }}