Add a view to show movies of a given user (or all movies if no user is specified).

This commit is contained in:
Camille31
2016-11-13 23:16:03 +01:00
parent b1dd0dd0bb
commit 5284966d4a
5 changed files with 116 additions and 1 deletions

View File

@ -0,0 +1,33 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Films</title>
</head>
<body>
<h1>
<c:choose>
<c:when test="${userId==null}">
Tous les films
</c:when>
<c:otherwise>
Films de l'utilisateur ${userId}
</c:otherwise>
</c:choose>
</h1>
<ul>
<c:forEach items="${movies}" var="movie">
<li>
${movie.title}
<ul>
<c:forEach items="${movie.genres}" var="genre">
<li>
${genre.name}
</li>
</c:forEach>
</ul>
</li>
</c:forEach>
</ul>
</body>
</html>