44
55<c:choose >
66 <c:when test =" ${ not empty movie } " >
7- <h2 >${ movie. title } (${ movie. year } ) has ${ movie. stars } Stars</h2 >
8-
9- <c:if test =" ${ not empty user } " >
10- <div >
11- <form method =" post" action =" /movies/${ movie. id } " >
12- <div >
13- <input type =" image" src =" /images/star.png" name =" rated" value =" 1" />
14- <input type =" image" src =" /images/star.png" name =" rated" value =" 2" />
15- <input type =" image" src =" /images/star.png" name =" rated" value =" 3" />
16- <input type =" image" src =" /images/star.png" name =" rated" value =" 4" />
17- <input type =" image" src =" /images/star.png" name =" rated" value =" 5" />
18- </div >
19- <textarea rows =" 3" cols =" 60" name =" comment" ></textarea >
20- </form >
7+ <div class =" span-5" >
8+ <div class =" profile-header" >
9+ <div class =" profile-image" ><img src =" <c:url value=" /images /movie-placeholder.png " />" /></div >
10+ <div class =" profile-header-details" >
11+ <h2 >${ movie. title } (${ movie. year } )</h2 >
12+ <ul class =" rating" >
13+ <!-- Add a loop here -->
14+ <li class =" active" ></li >
15+ <li class =" active" ></li >
16+ <li class =" active" ></li >
17+ <li class =" disabled" ></li >
18+ <li class =" disabled" ></li >
19+ </ul >
20+ </div >
21+ <div class =" break" ></div >
2122 </div >
22- </c:if >
23- <c:if test =" ${ not empty movie. roles } " >
24- <ul >
25- <c:forEach items =" ${ movie. roles } " var =" role" >
23+
24+ <div class =" span-half" >
25+ <h3 >Movie facts</h3 >
26+
27+ <table >
28+ <tr >
29+ <th >Status</th >
30+ <td >Released</td >
31+ </tr >
32+ <tr >
33+ <th >Runtime</th >
34+ <td >2h 12m</td >
35+ </tr >
36+ <tr >
37+ <th >Etc</th >
38+ <td >etc</td >
39+ </tr >
40+ </table >
41+ </div >
42+
43+ <div class =" span-half last" >
44+ <h3 >Trailers</h3 >
45+
46+ <ul >
47+ <li ><a href =" #" >Some trailer</a ></li >
48+ </ul >
49+ </div >
50+
51+ <div class =" span-half" >
52+ <h3 >Release info</h3 >
53+
54+ <ul >
2655 <li >
27- <a href =" /actors/${ role. actor. id } " ><c:out value =" ${ role. actor. name } " /> as <c:out value =" ${ role. name } " /></a ><br />
56+ <h4 >USA</h4 >
57+ <table >
58+ <tr >
59+ <th >Released</th >
60+ <td >1994-06-23</td >
61+ </tr >
62+ <tr >
63+ <th >Runtime</th >
64+ <td >2h 12m</td >
65+ </tr >
66+ <tr >
67+ <th >Etc</th >
68+ <td >etc</td >
69+ </tr >
70+ </table >
2871 </li >
29- </c:forEach >
30- </ul >
31- </c:if >
32- <c:if test =" ${ not empty movie. ratings } " >
33- <dl >
34- <c:forEach items =" ${ movie. ratings } " var =" rating" >
35- <dt >${ rating. stars } Stars by ${ rating. user. name } </dt >
36- <dd >Comment: ${ rating. comment } </dd >
37- </c:forEach >
38- </dl >
39- </c:if >
72+ </ul >
73+ </div >
74+
75+ </div >
76+ <div class =" span-7 last" >
77+ <div class =" movie-content-outer" >
78+ <div class =" movie-content" >
79+ <h2 >Overview</h2 >
80+ <p >Lorem ipsum dolor sit amet.</p >
81+
82+ <h2 >Cast</h2 >
83+ <c:if test =" ${ not empty movie. roles } " >
84+ <ul class =" actors-list" >
85+ <c:forEach items =" ${ movie. roles } " var =" role" >
86+ <li >
87+ <a class =" actor-image" href =" <c:url value=" /actors /${role.actor.id} " />" ><img src =" <c:url value=" /images /profile-placeholder-small.png " />" /></a >
88+ <a href =" <c:url value=" /actors /${role.actor.id} " />" ><c:out value =" ${ role. actor. name } " /> as <c:out value =" ${ role. name } " /></a >
89+ </li >
90+ </c:forEach >
91+ </ul >
92+ <div class =" break" ></div >
93+ </c:if >
94+
95+ <h2 >Reviews</h2 >
96+ <c:if test =" ${ not empty movie. ratings } " >
97+ <ul >
98+ <c:forEach items =" ${ movie. ratings } " var =" rating" >
99+ <li >
100+ <h4 >${ rating. stars } stars by <a href =" <c:url value=" /user /${rating.user.login} " />" >${ rating. user. name } </a ></h4 >
101+ <p >${ rating. comment } </p >
102+ </li >
103+ </c:forEach >
104+ </ul >
105+ </c:if >
106+
107+ <c:if test =" ${ not empty user } " >
108+ <form method =" post" action =" <c:url value=" /movies /${movie.id} " />" >
109+ <ul class =" rating-input" >
110+ <lh >My rating</lh >
111+ <li >
112+ <input id =" rating-one" type =" radio" name =" rated" value =" 1" />
113+ <label class =" button-label" for =" rating-one" >1</label >
114+ </li >
115+ <li >
116+ <input id =" rating-two" type =" radio" name =" rated" value =" 2" />
117+ <label class =" button-label" for =" rating-two" >2</label >
118+ </li >
119+ <li >
120+ <input id =" rating-three" type =" radio" name =" rated" value =" 3" selected =" selected" />
121+ <label class =" button-label" for =" rating-three" >3</label >
122+ </li >
123+ <li >
124+ <input id =" rating-four" type =" radio" name =" rated" value =" 4" />
125+ <label class =" button-label" for =" rating-four" >4</label >
126+ </li >
127+ <li >
128+ <input id =" rating-five" type =" radio" name =" rated" value =" 5" />
129+ <label class =" button-label" for =" rating-five" >5</label >
130+ </li >
131+ </ul >
132+ <textarea rows =" 3" cols =" 60" name =" comment" ></textarea >
133+ <div class =" break" ></div >
134+ <input type =" submit" value =" Submit review" />
135+ </form >
136+ </c:if >
137+ </div >
138+ </div >
139+ </div >
40140 </c:when >
41141 <c:otherwise >
42- No Movie with id ${ id } found!
142+ <h2 >No movie found</h2 >
143+ <p >The movie you were looking for could not be found.</p >
43144 </c:otherwise >
44- </c:choose >
145+ </c:choose >
0 commit comments