1.1 --- a/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/index.fmt Fri Sep 04 20:26:48 2009 +0200
1.2 +++ b/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/index.fmt Fri Sep 04 21:14:33 2009 +0200
1.3 @@ -7,31 +7,68 @@
1.4 <body>
1.5 <h1>Quoridor Community Server</h1>
1.6
1.7 + <#if message?? >
1.8 + <p>
1.9 + <span style="color: red">${message}</span>
1.10 + </p>
1.11 + </#if>
1.12 +
1.13 <h5>Games where you are expected to move</h5>
1.14
1.15 <ol>
1.16 <#list doc.gameIds.* as g>
1.17 <#if (g.@white = user || g.@black = user) && g.@result = "IN_PROGRESS" >
1.18 <li>
1.19 - ${g.@white} vs. ${g.@black} <a href="games/${g.@id}/">board</a>
1.20 + ${g.@white} vs. ${g.@black} <a href="/games/${g.@id}/">board</a>
1.21 </li>
1.22 </#if>
1.23 </#list>
1.24 </ol>
1.25
1.26 + <h5>Won games</h5>
1.27 +
1.28 + <ol>
1.29 + <#list doc.gameIds.* as g>
1.30 + <#if
1.31 + (g.@white = user && g.@result = "WHITE_WON") ||
1.32 + (g.@black = user && g.@result = "BLACK_WON")
1.33 + >
1.34 + <li>
1.35 + ${g.@white} vs. ${g.@black} <a href="/games/${g.@id}/">board</a>
1.36 + </li>
1.37 + </#if>
1.38 + </#list>
1.39 + </ol>
1.40 +
1.41 + <h5>Lost games</h5>
1.42 +
1.43 + <ol>
1.44 + <#list doc.gameIds.* as g>
1.45 + <#if
1.46 + (g.@white = user && g.@result = "BLACK_WON") ||
1.47 + (g.@black = user && g.@result = "WHITE_WON")
1.48 + >
1.49 + <li>
1.50 + ${g.@white} vs. ${g.@black} <a href="/games/${g.@id}/">board</a>
1.51 + </li>
1.52 + </#if>
1.53 + </#list>
1.54 + </ol>
1.55 +
1.56 + <form action="games/create">
1.57 + White: <input type="text" name="white" value="" />
1.58 + Black: <input type="text" name="black" value="" />
1.59 + <input type="submit" value="Create!" />
1.60 + </form>
1.61 +
1.62 <h5>All Games</h5>
1.63
1.64 <ol>
1.65 <#list doc.gameIds.* as g>
1.66 <li>
1.67 - ${g.@white} vs. ${g.@black} <a href="games/${g.@id}/">board</a>
1.68 + ${g.@white} vs. ${g.@black} <a href="/games/${g.@id}/">board</a>
1.69 </li>
1.70 </#list>
1.71 </ol>
1.72 - <form action="games/create">
1.73 - White: <input type="text" name="white" value="" />
1.74 - Black: <input type="text" name="black" value="" />
1.75 - <input type="submit" value="Create!" />
1.76 - </form>
1.77 </body>
1.78 </html>
1.79 \ No newline at end of file