freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/elo.fmt
author Martin Rexa <martin.rexa@centrum.cz>
Wed, 13 Jan 2010 16:57:55 +0100
changeset 218 4633b40ea42f
parent 209 bbb7d4f4e862
child 222 d783bb2a7956
permissions -rw-r--r--
Display debug info about games in list
jaroslav@178
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
jaroslav@178
     2
<html>
jaroslav@178
     3
  <head>
jaroslav@178
     4
    <title>${bundle.ELO_LIST}</title>
jaroslav@178
     5
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
jaroslav@178
     6
  </head>
jaroslav@178
     7
  <body bgcolor="white">
jaroslav@178
     8
      <h3><a href="/">${bundle.TITLE_PLAIN}</a></h3>
martin@218
     9
      <#assign first=toDate[doc.eloList.firstGame?string]/>
martin@218
    10
      <#assign last=toDate[doc.eloList.lastGame?string]/>
martin@218
    11
      <h4>${bundle.ELO_LIST} - ${last?date?string.long}</h4>
martin@218
    12
      <!-- New games: ${first?datetime?string.long} - ${last?datetime?string.long} -->
jaroslav@178
    13
      <table border="1">
jaroslav@178
    14
          <thead>
jaroslav@178
    15
              <tr>
jaroslav@178
    16
                  <th>#</th>
jaroslav@178
    17
                  <th>${bundle.NAME}</th>
jaroslav@178
    18
                  <th>${bundle.ELO}</th>
jaroslav@178
    19
                  <th>${bundle.GAMES}</th>
jaroslav@178
    20
              </tr>
jaroslav@178
    21
          </thead>
jaroslav@178
    22
          <tbody>
jaroslav@178
    23
              <#assign cElo = 10000>
jaroslav@178
    24
              <#assign index = 0>
jaroslav@178
    25
              <#assign cIndex = index>
jaroslav@178
    26
              <#list doc.eloList.elolist.* as item>
jaroslav@178
    27
jaroslav@178
    28
                <#assign index = index + 1>
jaroslav@178
    29
                <#if cElo = item.@elo?number>
jaroslav@178
    30
                <#else>
jaroslav@178
    31
                  <#assign cIndex = index>
jaroslav@178
    32
                </#if>
jaroslav@178
    33
                <#assign cElo = item.@elo?number>
jaroslav@178
    34
jaroslav@178
    35
                <tr>
jaroslav@178
    36
                <td>${cIndex}</td>
jaroslav@178
    37
                <td>${item.@player}</td>
jaroslav@178
    38
                <td>${item.@elo?number}</td>
jaroslav@178
    39
                <td>${item.@games}</td>
jaroslav@178
    40
                </tr>
jaroslav@178
    41
jaroslav@178
    42
              </#list>
jaroslav@178
    43
          </tbody>
jaroslav@178
    44
      </table>
martin@209
    45
      <#if (doc.eloList.originalList='false')>
martin@209
    46
          <h4><a href="/elo?historyId=${historyId?number+1}">${bundle.ELO_PREVIOUS}</a></h4>
martin@209
    47
      </#if>
jaroslav@178
    48
  </body>
jaroslav@178
    49
</html>