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
71335721
Commit
71335721
authored
May 20, 2022
by
Matúš Valko
Browse files
updated frontend team view
parent
db13bd61
Pipeline
#141748
passed with stage
in 1 minute and 11 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 @
71335721
...
...
@@ -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 @
71335721
...
...
@@ -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
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