freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/elo.fmt
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 07 Jan 2010 22:34:17 +0100
branchstatistics-and-elo
changeset 178 4b78d4f028b3
child 196 7c4da0dc55a4
permissions -rw-r--r--
Initial version of statistics and ELO rating. Donated by Martin Rexa
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
     2 <html>
     3   <head>
     4     <title>${bundle.ELO_LIST}</title>
     5     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     6   </head>
     7   <body bgcolor="white">
     8       <h3><a href="/">${bundle.TITLE_PLAIN}</a></h3>
     9       <h4>${bundle.ELO_LIST}</h4>
    10       <table border="1">
    11           <thead>
    12               <tr>
    13                   <th>#</th>
    14                   <th>${bundle.NAME}</th>
    15                   <th>${bundle.ELO}</th>
    16                   <th>${bundle.GAMES}</th>
    17               </tr>
    18           </thead>
    19           <tbody>
    20               <#assign cElo = 10000>
    21               <#assign index = 0>
    22               <#assign cIndex = index>
    23               <#list doc.eloList.elolist.* as item>
    24 
    25                 <#assign index = index + 1>
    26                 <#if cElo = item.@elo?number>
    27                 <#else>
    28                   <#assign cIndex = index>
    29                 </#if>
    30                 <#assign cElo = item.@elo?number>
    31 
    32                 <tr>
    33                 <td>${cIndex}</td>
    34                 <td>${item.@player}</td>
    35                 <td>${item.@elo?number}</td>
    36                 <td>${item.@games}</td>
    37                 </tr>
    38 
    39               </#list>
    40           </tbody>
    41       </table>
    42   </body>
    43 </html>