Added better formatting and links for team listings in course entity page.
This commit is contained in:
parent
7322436ab1
commit
f5dc04a720
|
@ -74,6 +74,10 @@ public abstract class Person extends BasicEntity {
|
|||
return this.lastName;
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return this.getFirstName() + ' ' + this.getLastName();
|
||||
}
|
||||
|
||||
public String getEmailAddress() {
|
||||
return this.emailAddress;
|
||||
}
|
||||
|
|
|
@ -75,6 +75,10 @@ public abstract class Team<P extends Person> extends BasicEntity {
|
|||
this.course = course;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of all members of this team.
|
||||
* @return A list of all the members in this team.
|
||||
*/
|
||||
public List<P> getMembers() {
|
||||
return this.members;
|
||||
}
|
||||
|
|
|
@ -10,18 +10,36 @@
|
|||
<h1><span th:text="${course.getName()}"></span> (Code: <span th:text="${course.getCode()}"></span>)</h1>
|
||||
<h2>Created on: <span th:text="${course.getCreatedOn()}"></span></h2>
|
||||
<hr>
|
||||
|
||||
<h3>Teaching Assistant Groups (<span th:text="${course.getTeachingAssistantTeams().size()}"></span>):</h3>
|
||||
<table>
|
||||
<tr th:each="teachingAssistantTeam: ${course.getTeachingAssistantTeams()}">
|
||||
<td th:text="${teachingAssistantTeam.getId()}"></td>
|
||||
<td th:text="${teachingAssistantTeam.toString()}"></td>
|
||||
<td>
|
||||
<a
|
||||
th:href="@{/courses/{code}/ta_teams/{team_id}
|
||||
(code=${course.getCode()}, team_id=${teachingAssistantTeam.getId()})}">
|
||||
TA Team <span th:text="${teachingAssistantTeam.getId()}"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td th:each="teachingAssistant: ${teachingAssistantTeam.getMembers()}">
|
||||
<span th:text="${teachingAssistant.getFullName()}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Student Groups (<span th:text="${course.getStudentTeams().size()}"></span>):</h3>
|
||||
<table>
|
||||
<tr th:each="studentTeam: ${course.getStudentTeams()}">
|
||||
<td th:text="${studentTeam.getId()}"></td>
|
||||
<td th:text="${studentTeam.toString()}"></td>
|
||||
<td>
|
||||
<a
|
||||
th:href="@{/courses/{code}/student_teams/{team_id}
|
||||
(code=${course.getCode()}, team_id=${studentTeam.getId()})}">
|
||||
Student Team <span th:text="${studentTeam.getId()}"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td th:each="student: ${studentTeam.getMembers()}">
|
||||
<span th:text="${student.getFullName()}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue