1.1 --- a/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/index.fmt Sun Sep 20 11:00:36 2009 +0200
1.2 +++ b/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/index.fmt Mon Oct 05 10:23:27 2009 +0200
1.3 @@ -4,6 +4,10 @@
1.4 <#assign toWait = 0/>
1.5 <#assign toWon = 0/>
1.6 <#assign toLost = 0/>
1.7 + <#if ! maxItems??>
1.8 + <#assign maxItems = 10/>
1.9 + </#if>
1.10 + <#assign seeAll = false/>
1.11 <#list doc.gameIds.* as g>
1.12 <#if (g.@white = user && g.@status = "whiteMove") ||
1.13 (g.@black = user && g.@status = "blackMove")
1.14 @@ -51,6 +55,7 @@
1.15 <#macro game game>
1.16 ${bundle("gameWhiteBlack", game.@white?string, game.@black?string)}
1.17 <a href="/games/${game.@id}/"><@before (now - game.@modified?number)?int/></a>
1.18 + <#assign printed = printed + 1/>
1.19 </#macro>
1.20
1.21 <#if message?? >
1.22 @@ -63,6 +68,7 @@
1.23 <h5>${bundle.GAME_MOVE}</h5>
1.24
1.25 <ol>
1.26 + <#assign printed = 0/>
1.27 <#list doc.gameIds.* as g>
1.28 <#if (g.@white = user && g.@status = "whiteMove") ||
1.29 (g.@black = user && g.@status = "blackMove")
1.30 @@ -70,6 +76,7 @@
1.31 <li>
1.32 <@game g/>
1.33 </li>
1.34 + <#if printed = maxItems><#assign seeAll=true/><#break/></#if>
1.35 </#if>
1.36 </#list>
1.37 </ol>
1.38 @@ -78,6 +85,7 @@
1.39 <#if (toWait > 0)>
1.40 <h5>${bundle.GAME_WAIT}</h5>
1.41 <ol>
1.42 + <#assign printed = 0/>
1.43 <#list doc.gameIds.* as g>
1.44 <#if (g.@white = user && g.@status = "blackMove") ||
1.45 (g.@black = user && g.@status = "whiteMove")
1.46 @@ -85,6 +93,7 @@
1.47 <li>
1.48 <@game g/>
1.49 </li>
1.50 + <#if printed = maxItems><#assign seeAll=true/><#break/></#if>
1.51 </#if>
1.52 </#list>
1.53 </ol>
1.54 @@ -94,6 +103,7 @@
1.55 <h5>${bundle.GAME_WON}</h5>
1.56
1.57 <ol>
1.58 + <#assign printed = 0/>
1.59 <#list doc.gameIds.* as g>
1.60 <#if
1.61 (g.@white = user && g.@status = "whiteWon") ||
1.62 @@ -102,6 +112,7 @@
1.63 <li>
1.64 <@game g/>
1.65 </li>
1.66 + <#if printed = maxItems><#assign seeAll=true/><#break/></#if>
1.67 </#if>
1.68 </#list>
1.69 </ol>
1.70 @@ -111,6 +122,7 @@
1.71 <h5>${bundle.GAME_LOST}</h5>
1.72
1.73 <ol>
1.74 + <#assign printed = 0/>
1.75 <#list doc.gameIds.* as g>
1.76 <#if
1.77 (g.@white = user && g.@status = "blackWon") ||
1.78 @@ -119,6 +131,7 @@
1.79 <li>
1.80 <@game g/>
1.81 </li>
1.82 + <#if printed = maxItems><#assign seeAll=true/><#break/></#if>
1.83 </#if>
1.84 </#list>
1.85 </ol>
1.86 @@ -133,12 +146,21 @@
1.87 <h5>${bundle.GAME_ALL}</h5>
1.88
1.89 <ol>
1.90 + <#assign printed = 0/>
1.91 <#list doc.gameIds.* as g>
1.92 <li>
1.93 <@game g/>
1.94 </li>
1.95 + <#if printed = maxItems><#assign seeAll=true/><#break/></#if>
1.96 </#list>
1.97 </ol>
1.98 +
1.99 + <#if seeAll>
1.100 + <p>
1.101 + <a href="/?maxItems=1024">${bundle.SEE_ALL}</a>...
1.102 + </p>
1.103 + </#if>
1.104 +
1.105 <hr/>
1.106 ${bundle("copyright", version)}
1.107 </body>