Improved Students listing with additional context links

This commit is contained in:
Andrew Lalis 2019-04-21 20:55:48 +02:00 committed by andrewlalis
parent 22eb695e97
commit 9c6dec0473
1 changed files with 20 additions and 0 deletions

View File

@ -10,6 +10,13 @@
<h1>All Students</h1> <h1>All Students</h1>
<table> <table>
<tr>
<th>Student</th>
<th>Student Number</th>
<th>Email</th>
<th>Github Username</th>
<th>Teams</th>
</tr>
<tr th:each="student: ${students}"> <tr th:each="student: ${students}">
<td> <td>
<a th:href="@{/students/{id}(id=${student.getId()})}"><span th:text="${student.getFullName()}"></span></a> <a th:href="@{/students/{id}(id=${student.getId()})}"><span th:text="${student.getFullName()}"></span></a>
@ -17,6 +24,19 @@
<td th:text="${student.getStudentNumber()}"></td> <td th:text="${student.getStudentNumber()}"></td>
<td th:text="${student.getEmailAddress()}"></td> <td th:text="${student.getEmailAddress()}"></td>
<td th:text="${student.getGithubUsername()}"></td> <td th:text="${student.getGithubUsername()}"></td>
<td>
<div th:each="team: ${student.getTeams()}">
<a
th:href="@{/courses/{code}/student_teams/{id}(code=${team.getCourse().getCode()}, id=${team.getId()})}"
th:text="${'Student Team ' + team.getId()}"
></a>
<span> from </span>
<a
th:href="@{/courses/{code}(code=${team.getCourse().getCode()})}"
th:text="${team.getCourse().getName()}"
></a>
</div>
</td>
</tr> </tr>
</table> </table>
</div> </div>