Commit 71335721 authored by Matúš Valko's avatar Matúš Valko
Browse files

updated frontend team view

parent db13bd61
Pipeline #141748 passed with stage
in 1 minute and 11 seconds
......@@ -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";
}
......
......@@ -5,27 +5,33 @@
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<my:pagetemplate title="Team Administration">
<jsp:attribute name="body">
<my:pagetemplate>
<c:out value="${team.name}"/>
</my:pagetemplate/>
<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