Commit 5a9a782e authored by Adrián Piaček's avatar Adrián Piaček
Browse files

Merge remote-tracking branch 'origin/frontend_match' into frontend_match

parents ae648e24 7dc2108e
Pipeline #141773 passed with stage
in 1 minute and 1 second
......@@ -45,6 +45,7 @@ public class TeamController {
@RequestMapping(value = "/view/{id}", method = RequestMethod.GET)
public String view(@PathVariable String id, Model model) {
model.addAttribute("team", teamFacade.getTeamById(id));
model.addAttribute("teamPlayers", teamFacade.getTeamById(id).getPlayerList());
return "team/view";
}
......
......@@ -6,26 +6,30 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<my:pagetemplate title="Team Administration">
<jsp:attribute name="body">
<td><c:out value="${team.name}"/></td>
<jsp:attribute name="body">
<table class="tablePlayers">
<thead>
<tr>
<th>id</th>
<th>name</th>
<th>country</th>
</tr>
</thead>
<tbody>
<table class="table">
<thead>
<tr>
<th>id</th>
<th>name</th>
<th>country</th>
</tr>
</thead>
<tbody>
<c:forEach items="${teamPlayers}" var="player">
<tr>
<td><c:out value="${team.id}"/></td>
<td><c:out value="${team.name}"/></td>
<td><c:out value="${player.id}"/></td>
<td><c:out value="${player.name}"/></td>
<td><c:out value="${player.country}"/></td>
<td>
<my:a href="/team/view/${team.id}" class="btn btn-primary">View</my:a>
</td>
</tr>
</tbody>
</table>
</c:forEach>
</tbody>
</table>
</jsp:attribute>
</my:pagetemplate>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment