From f5dc04a72085ab245b2a7d8e6bc4eaecb6f983ef Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Tue, 16 Apr 2019 23:39:04 +0200 Subject: [PATCH] Added better formatting and links for team listings in course entity page. --- .../model/people/Person.java | 4 +++ .../model/people/teams/Team.java | 4 +++ .../resources/templates/courses/entity.html | 26 ++++++++++++++++--- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/Person.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/Person.java index ba88962..47cef1d 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/Person.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/Person.java @@ -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; } diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/teams/Team.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/teams/Team.java index 669aa83..255883f 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/teams/Team.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/teams/Team.java @@ -75,6 +75,10 @@ public abstract class Team

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

getMembers() { return this.members; } diff --git a/src/main/resources/templates/courses/entity.html b/src/main/resources/templates/courses/entity.html index 5ef36b7..4f71dc5 100644 --- a/src/main/resources/templates/courses/entity.html +++ b/src/main/resources/templates/courses/entity.html @@ -10,18 +10,36 @@

(Code: )

Created on:


+

Teaching Assistant Groups ():

- - + +
+ + TA Team + + + +
+

Student Groups ():

- - + +
+ + Student Team + + + +