freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/index.fmt
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Fri, 04 Sep 2009 21:14:33 +0200
changeset 57 fa12b02023a0
parent 56 7c3794f5baa1
child 58 e00be634746c
permissions -rw-r--r--
Separating games by their current state
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
     2 <html>
     3   <head>
     4     <title></title>
     5     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     6   </head>
     7   <body>
     8       <h1>Quoridor Community Server</h1>
     9 
    10       <#if message?? >
    11         <p>
    12             <span style="color: red">${message}</span>
    13         </p>
    14       </#if>
    15 
    16       <h5>Games where you are expected to move</h5>
    17 
    18       <ol>
    19       <#list doc.gameIds.* as g>
    20         <#if (g.@white = user || g.@black = user) && g.@result = "IN_PROGRESS" >
    21             <li>
    22                 ${g.@white} vs. ${g.@black} <a href="/games/${g.@id}/">board</a>
    23             </li>
    24         </#if>
    25       </#list>
    26       </ol>
    27 
    28       <h5>Won games</h5>
    29 
    30       <ol>
    31       <#list doc.gameIds.* as g>
    32         <#if 
    33             (g.@white = user && g.@result = "WHITE_WON") ||
    34             (g.@black = user && g.@result = "BLACK_WON")
    35         >
    36             <li>
    37                 ${g.@white} vs. ${g.@black} <a href="/games/${g.@id}/">board</a>
    38             </li>
    39         </#if>
    40       </#list>
    41       </ol>
    42 
    43       <h5>Lost games</h5>
    44 
    45       <ol>
    46       <#list doc.gameIds.* as g>
    47         <#if
    48             (g.@white = user && g.@result = "BLACK_WON") ||
    49             (g.@black = user && g.@result = "WHITE_WON")
    50         >
    51             <li>
    52                 ${g.@white} vs. ${g.@black} <a href="/games/${g.@id}/">board</a>
    53             </li>
    54         </#if>
    55       </#list>
    56       </ol>
    57 
    58       <form action="games/create">
    59             White: <input type="text" name="white" value="" />
    60             Black: <input type="text" name="black" value="" />
    61             <input type="submit" value="Create!" />
    62       </form>
    63 
    64       <h5>All Games</h5>
    65 
    66       <ol>
    67       <#list doc.gameIds.* as g>
    68         <li>
    69             ${g.@white} vs. ${g.@black} <a href="/games/${g.@id}/">board</a>
    70         </li>
    71       </#list>
    72       </ol>
    73   </body>
    74 </html>