freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt
branchstatistics-and-elo
changeset 178 4b78d4f028b3
parent 175 4f0795e7fc03
     1.1 --- a/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt	Fri Dec 25 15:58:25 2009 +0100
     1.2 +++ b/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt	Thu Jan 07 22:34:17 2010 +0100
     1.3 @@ -50,6 +50,7 @@
     1.4              if (dir == 'W') r.x = -1;
     1.5              return r;
     1.6          }
     1.7 +        <#if board.currentPlayer??>
     1.8          function paintPlayer() {
     1.9              var fifth = fieldSize / 5;
    1.10              var m1 = deltas(document.getElementById("pdir1").value.charAt(0));
    1.11 @@ -72,7 +73,11 @@
    1.12           var playerPos = {
    1.13               x: ${board.currentPlayer.column}, 
    1.14               y: ${board.currentPlayer.row}
    1.15 -        };
    1.16 +         };
    1.17 +         <#else>
    1.18 +         function paintPlayer() {
    1.19 +         }
    1.20 +         </#if>
    1.21      </script>
    1.22    </head>
    1.23    <body bgcolor="white">
    1.24 @@ -177,7 +182,7 @@
    1.25        </#if>
    1.26        <p>
    1.27        <#if format?? && format = "text">
    1.28 -        <pre>${doc.game.board}</pre>
    1.29 +        <pre>${textPicture}</pre>
    1.30          ${bundle.BOARD_VIEW}
    1.31          <a href="/games/${doc.game.id.@id}?format=small">${bundle.BOARD_SMALL}</a>
    1.32          <a href="/games/${doc.game.id.@id}?format=image">${bundle.BOARD_IMAGE}</a>
    1.33 @@ -227,7 +232,9 @@
    1.34              <a href="/games/${doc.game.id.@id}?move=${item.@index}">${item.@move}</a>
    1.35          </#if>
    1.36        </#macro>
    1.37 -
    1.38 +      <#if (bCode??) >
    1.39 +        <h3><a href="/openings/${bCode}">${bundle.OPENINGS}</a></h3>
    1.40 +      </#if>
    1.41        <h3><a href="/games/${doc.game.id.@id}?move=0">${bundle.MOVES}</a></h3>
    1.42  
    1.43        <table border="0">