freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/opening_games.fmt
branchstatistics-and-elo
changeset 178 4b78d4f028b3
child 193 9b414aae2aa9
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/opening_games.fmt	Thu Jan 07 22:34:17 2010 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
     1.5 +<html>
     1.6 +  <head>
     1.7 +    <title>${bundle.OPENINGS} - ${bundle.GAMES}</title>
     1.8 +    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     1.9 +  </head>
    1.10 +  <body bgcolor="white">
    1.11 +      <h3><a href="/">${bundle.TITLE_PLAIN}</a></h3>
    1.12 +      <h4>${bundle.OPENINGS} - ${bundle.GAMES}</h4>
    1.13 +
    1.14 +      <#macro before t>
    1.15 +        <#assign seconds = (t / 1000)?long/>
    1.16 +        <#assign minutes= (seconds / 60)?long/>
    1.17 +        <#assign hours= (minutes / 60)?long/>
    1.18 +        <#assign days= (hours / 24)?long/>
    1.19 +        <!--millis: ${t}, seconds: ${seconds}, minutes: ${minutes} hours: ${hours}, days: ${days} -->
    1.20 +        ${bundle("LastMove", t?int, seconds?int, minutes?int, hours?int, days?int)}
    1.21 +      </#macro>
    1.22 +      <#macro game game>
    1.23 +          ${bundle("gameWhiteBlack", game.@white?string, game.@black?string)}
    1.24 +          <a href="/games/${game.@id}/"><@before (now - game.@modified?number)?long/></a>
    1.25 +          <#if game.@comments?number != 0>
    1.26 +            ${bundle("comments", game.@comments?number)}
    1.27 +          </#if>
    1.28 +      </#macro>
    1.29 +
    1.30 +      <ol>
    1.31 +      <#list doc.gameIds.* as g>
    1.32 +            <li>
    1.33 +                <@game g/>
    1.34 +            </li>
    1.35 +      </#list>
    1.36 +      </ol>
    1.37 +      <h4><a href="/openings/${code}">${bundle.OPENINGS}</a></h4>
    1.38 +  </body>
    1.39 +</html>
    1.40 \ No newline at end of file