freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt
changeset 66 d8dfa8972c4f
parent 61 517faddf1320
child 69 90de58894949
     1.1 --- a/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt	Sat Sep 05 15:52:31 2009 +0200
     1.2 +++ b/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt	Mon Sep 07 17:02:59 2009 +0200
     1.3 @@ -3,6 +3,9 @@
     1.4    <head>
     1.5      <title></title>
     1.6      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     1.7 +    <#if user != doc.game.@currentPlayer >
     1.8 +        <meta http-equiv="REFRESH" content="60;URL=/games/${doc.game.id.@id}">
     1.9 +    </#if>
    1.10    </head>
    1.11    <body>
    1.12        <h1>${bundle.GAME}</h1>
    1.13 @@ -19,8 +22,19 @@
    1.14          </p>
    1.15        </#if>
    1.16  
    1.17 -      ${bundle.MOVE_WHO} ${doc.game.@currentPlayer}
    1.18 -      <#if user = doc.game.@currentPlayer >
    1.19 +      <#assign play = false>
    1.20 +
    1.21 +      <#if doc.game.id.@result = "IN_PROGRESS" >
    1.22 +          ${bundle.MOVE_WHO} ${doc.game.@currentPlayer}
    1.23 +          <#assign play = user = doc.game.@currentPlayer>
    1.24 +      <#else>
    1.25 +        <#if doc.game.id.@result = "WHITE_WON">
    1.26 +          ${doc.game.id.@white} ${bundle.WON}
    1.27 +        <#else>
    1.28 +          ${doc.game.id.@black} ${bundle.WON}
    1.29 +        </#if>
    1.30 +      </#if>
    1.31 +      <#if  play>
    1.32            <form action="/games/${doc.game.id.@id}/move">
    1.33                <input type="hidden" name="type" value="fence" readonly="readonly"/>
    1.34                <select name="column">