freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/index.fmt
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 12 Sep 2009 09:11:13 +0200
changeset 80 e03f660f0e0a
parent 79 89bca098e14e
child 88 a3be2be0112f
permissions -rw-r--r--
Moving all localized strings into one Bundle
jtulach@41
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
jtulach@41
     2
<html>
jtulach@41
     3
  <head>
jtulach@41
     4
    <title></title>
jtulach@41
     5
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
jtulach@41
     6
  </head>
jtulach@41
     7
  <body>
jaroslav@59
     8
      <h1>${bundle.TITLE}</h1>
jaroslav@56
     9
jtulach@80
    10
      <#macro before t>
jtulach@80
    11
        <#assign seconds = (t / 1000)?int/>
jtulach@80
    12
        <#assign minutes= (seconds / 60)?int/>
jtulach@80
    13
        <#assign hours= (minutes / 60)?int/>
jtulach@80
    14
        <#assign days= (hours / 24)?int/>
jtulach@80
    15
        <!--millis: ${t}, seconds: ${seconds}, minutes: ${minutes} hours: ${hours}, days: ${days} -->
jtulach@80
    16
        ${bundle("LastMove", t?int, seconds?int, minutes?int, hours?int, days?int)}
jtulach@78
    17
      </#macro>
jtulach@78
    18
jaroslav@58
    19
      <#macro game game>
jtulach@78
    20
          ${bundle("gameWhiteBlack", game.@white?string, game.@black?string)} 
jtulach@80
    21
          <a href="/games/${game.@id}/"><@before (now - game.@modified?number)?int/></a>
jaroslav@58
    22
      </#macro>
jaroslav@58
    23
jaroslav@57
    24
      <#if message?? >
jaroslav@57
    25
        <p>
jaroslav@57
    26
            <span style="color: red">${message}</span>
jaroslav@57
    27
        </p>
jaroslav@57
    28
      </#if>
jaroslav@57
    29
jaroslav@59
    30
      <h5>${bundle.GAME_MOVE}</h5>
jaroslav@56
    31
jaroslav@56
    32
      <ol>
jaroslav@56
    33
      <#list doc.gameIds.* as g>
jtulach@77
    34
        <#if (g.@white = user && g.@status = "whiteMove") ||
jtulach@77
    35
             (g.@black = user && g.@status = "blackMove")
jtulach@77
    36
        >
jtulach@77
    37
            <li>
jtulach@77
    38
                <@game g/>
jtulach@77
    39
            </li>
jtulach@77
    40
        </#if>
jtulach@77
    41
      </#list>
jtulach@77
    42
      </ol>
jtulach@77
    43
jtulach@77
    44
      <h5>${bundle.GAME_WAIT}</h5>
jtulach@77
    45
jtulach@77
    46
      <ol>
jtulach@77
    47
      <#list doc.gameIds.* as g>
jtulach@77
    48
        <#if (g.@white = user && g.@status = "blackMove") ||
jtulach@77
    49
             (g.@black = user && g.@status = "whiteMove")
jtulach@77
    50
        >
jaroslav@56
    51
            <li>
jaroslav@58
    52
                <@game g/>
jaroslav@56
    53
            </li>
jaroslav@56
    54
        </#if>
jaroslav@56
    55
      </#list>
jaroslav@56
    56
      </ol>
jaroslav@56
    57
jaroslav@59
    58
      <h5>${bundle.GAME_WON}</h5>
jaroslav@57
    59
jaroslav@57
    60
      <ol>
jaroslav@57
    61
      <#list doc.gameIds.* as g>
jaroslav@57
    62
        <#if 
jtulach@77
    63
            (g.@white = user && g.@status = "whiteWon") ||
jtulach@77
    64
            (g.@black = user && g.@status = "blackWon")
jaroslav@57
    65
        >
jaroslav@57
    66
            <li>
jaroslav@58
    67
                <@game g/>
jaroslav@57
    68
            </li>
jaroslav@57
    69
        </#if>
jaroslav@57
    70
      </#list>
jaroslav@57
    71
      </ol>
jaroslav@57
    72
jaroslav@59
    73
      <h5>${bundle.GAME_LOST}</h5>
jaroslav@57
    74
jaroslav@57
    75
      <ol>
jaroslav@57
    76
      <#list doc.gameIds.* as g>
jaroslav@57
    77
        <#if
jtulach@77
    78
            (g.@white = user && g.@status = "blackWon") ||
jtulach@77
    79
            (g.@black = user && g.@status = "whiteWon")
jaroslav@57
    80
        >
jaroslav@57
    81
            <li>
jaroslav@58
    82
                <@game g/>
jaroslav@57
    83
            </li>
jaroslav@57
    84
        </#if>
jaroslav@57
    85
      </#list>
jaroslav@57
    86
      </ol>
jaroslav@57
    87
jtulach@74
    88
      <form action="/games/create">
jaroslav@59
    89
            ${bundle.WHITE}: <input type="text" name="white" value="" />
jaroslav@59
    90
            ${bundle.BLACK}: <input type="text" name="black" value="" />
jaroslav@71
    91
            <input type="submit" value="${bundle.CREATE}" />
jaroslav@57
    92
      </form>
jaroslav@57
    93
jaroslav@59
    94
      <h5>${bundle.GAME_ALL}</h5>
jaroslav@56
    95
jtulach@41
    96
      <ol>
jtulach@54
    97
      <#list doc.gameIds.* as g>
jtulach@54
    98
        <li>
jaroslav@58
    99
            <@game g/>
jtulach@54
   100
        </li>
jtulach@41
   101
      </#list>
jtulach@41
   102
      </ol>
jtulach@41
   103
  </body>
jtulach@41
   104
</html>