Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Matúš Valko
Online Gaming Management System
Commits
7dc2108e
Commit
7dc2108e
authored
May 20, 2022
by
Dominik Kozubík
Browse files
Merge remote-tracking branch 'origin/team_frontend' into frontend_match
parents
2de3023c
6b62d89c
Pipeline
#141768
passed with stage
in 1 minute and 2 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gaming-spring-mvc/src/main/java/cz/muni/fi/pa165/mvc/controllers/TeamController.java
View file @
7dc2108e
...
...
@@ -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"
;
}
...
...
gaming-spring-mvc/src/main/webapp/WEB-INF/jsp/team/view.jsp
View file @
7dc2108e
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment