freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/index.fmt
author Jaroslav Tulach <jtulach@netbeans.org>
Fri, 11 Sep 2009 20:32:15 +0200
changeset 77 d574ac6e44cc
parent 74 b2af4da1cbbe
child 78 5ea4172dcf8b
permissions -rw-r--r--
Displaying who is supposed to move on a given board in the index page
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
jaroslav@58
    10
      <#macro game game>
jaroslav@69
    11
          ${bundle("gameWhiteBlack", game.@white?string, game.@black?string)} <a href="/games/${game.@id}/">${bundle.BOARD}</a>
jaroslav@58
    12
      </#macro>
jaroslav@58
    13
jaroslav@57
    14
      <#if message?? >
jaroslav@57
    15
        <p>
jaroslav@57
    16
            <span style="color: red">${message}</span>
jaroslav@57
    17
        </p>
jaroslav@57
    18
      </#if>
jaroslav@57
    19
jaroslav@59
    20
      <h5>${bundle.GAME_MOVE}</h5>
jaroslav@56
    21
jaroslav@56
    22
      <ol>
jaroslav@56
    23
      <#list doc.gameIds.* as g>
jtulach@77
    24
        <#if (g.@white = user && g.@status = "whiteMove") ||
jtulach@77
    25
             (g.@black = user && g.@status = "blackMove")
jtulach@77
    26
        >
jtulach@77
    27
            <li>
jtulach@77
    28
                <@game g/>
jtulach@77
    29
            </li>
jtulach@77
    30
        </#if>
jtulach@77
    31
      </#list>
jtulach@77
    32
      </ol>
jtulach@77
    33
jtulach@77
    34
      <h5>${bundle.GAME_WAIT}</h5>
jtulach@77
    35
jtulach@77
    36
      <ol>
jtulach@77
    37
      <#list doc.gameIds.* as g>
jtulach@77
    38
        <#if (g.@white = user && g.@status = "blackMove") ||
jtulach@77
    39
             (g.@black = user && g.@status = "whiteMove")
jtulach@77
    40
        >
jaroslav@56
    41
            <li>
jaroslav@58
    42
                <@game g/>
jaroslav@56
    43
            </li>
jaroslav@56
    44
        </#if>
jaroslav@56
    45
      </#list>
jaroslav@56
    46
      </ol>
jaroslav@56
    47
jaroslav@59
    48
      <h5>${bundle.GAME_WON}</h5>
jaroslav@57
    49
jaroslav@57
    50
      <ol>
jaroslav@57
    51
      <#list doc.gameIds.* as g>
jaroslav@57
    52
        <#if 
jtulach@77
    53
            (g.@white = user && g.@status = "whiteWon") ||
jtulach@77
    54
            (g.@black = user && g.@status = "blackWon")
jaroslav@57
    55
        >
jaroslav@57
    56
            <li>
jaroslav@58
    57
                <@game g/>
jaroslav@57
    58
            </li>
jaroslav@57
    59
        </#if>
jaroslav@57
    60
      </#list>
jaroslav@57
    61
      </ol>
jaroslav@57
    62
jaroslav@59
    63
      <h5>${bundle.GAME_LOST}</h5>
jaroslav@57
    64
jaroslav@57
    65
      <ol>
jaroslav@57
    66
      <#list doc.gameIds.* as g>
jaroslav@57
    67
        <#if
jtulach@77
    68
            (g.@white = user && g.@status = "blackWon") ||
jtulach@77
    69
            (g.@black = user && g.@status = "whiteWon")
jaroslav@57
    70
        >
jaroslav@57
    71
            <li>
jaroslav@58
    72
                <@game g/>
jaroslav@57
    73
            </li>
jaroslav@57
    74
        </#if>
jaroslav@57
    75
      </#list>
jaroslav@57
    76
      </ol>
jaroslav@57
    77
jtulach@74
    78
      <form action="/games/create">
jaroslav@59
    79
            ${bundle.WHITE}: <input type="text" name="white" value="" />
jaroslav@59
    80
            ${bundle.BLACK}: <input type="text" name="black" value="" />
jaroslav@71
    81
            <input type="submit" value="${bundle.CREATE}" />
jaroslav@57
    82
      </form>
jaroslav@57
    83
jaroslav@59
    84
      <h5>${bundle.GAME_ALL}</h5>
jaroslav@56
    85
jtulach@41
    86
      <ol>
jtulach@54
    87
      <#list doc.gameIds.* as g>
jtulach@54
    88
        <li>
jaroslav@58
    89
            <@game g/>
jtulach@54
    90
        </li>
jtulach@41
    91
      </#list>
jtulach@41
    92
      </ol>
jtulach@41
    93
  </body>
jtulach@41
    94
</html>