author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 12 Sep 2009 05:00:28 +0200 | |
changeset 79 | 89bca098e14e |
parent 78 | 5ea4172dcf8b |
child 80 | e03f660f0e0a |
permissions | -rw-r--r-- |
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@78 | 10 |
<#macro past t> |
jtulach@78 | 11 |
<#if t < 60000> |
jtulach@78 | 12 |
<#assign unit="s"/> |
jtulach@78 | 13 |
<#assign value= t?float / 1000.0/> |
jtulach@78 | 14 |
<#elseif t < 3600000> |
jtulach@78 | 15 |
<#assign unit="min"/> |
jtulach@78 | 16 |
<#assign value=t?float / 60000.0/> |
jtulach@78 | 17 |
<#elseif t < 24 * 3600 * 1000> |
jtulach@78 | 18 |
<#assign unit="h"/> |
jtulach@78 | 19 |
<#assign value=t?float / 3600000.0/> |
jtulach@78 | 20 |
<#else> |
jtulach@78 | 21 |
<#assign unit="day"/> |
jtulach@78 | 22 |
<#assign value=t?float / (24.0 * 3600000.0)/> |
jtulach@78 | 23 |
</#if> |
jtulach@79 | 24 |
<!--millis ${t}-->${value?float?string("0")} ${unit} |
jtulach@78 | 25 |
</#macro> |
jtulach@78 | 26 |
|
jaroslav@58 | 27 |
<#macro game game> |
jtulach@78 | 28 |
${bundle("gameWhiteBlack", game.@white?string, game.@black?string)} |
jtulach@78 | 29 |
<a href="/games/${game.@id}/">${bundle.before} <@past (now - game.@modified?number)/></a> |
jaroslav@58 | 30 |
</#macro> |
jaroslav@58 | 31 |
|
jaroslav@57 | 32 |
<#if message?? > |
jaroslav@57 | 33 |
<p> |
jaroslav@57 | 34 |
<span style="color: red">${message}</span> |
jaroslav@57 | 35 |
</p> |
jaroslav@57 | 36 |
</#if> |
jaroslav@57 | 37 |
|
jaroslav@59 | 38 |
<h5>${bundle.GAME_MOVE}</h5> |
jaroslav@56 | 39 |
|
jaroslav@56 | 40 |
<ol> |
jaroslav@56 | 41 |
<#list doc.gameIds.* as g> |
jtulach@77 | 42 |
<#if (g.@white = user && g.@status = "whiteMove") || |
jtulach@77 | 43 |
(g.@black = user && g.@status = "blackMove") |
jtulach@77 | 44 |
> |
jtulach@77 | 45 |
<li> |
jtulach@77 | 46 |
<@game g/> |
jtulach@77 | 47 |
</li> |
jtulach@77 | 48 |
</#if> |
jtulach@77 | 49 |
</#list> |
jtulach@77 | 50 |
</ol> |
jtulach@77 | 51 |
|
jtulach@77 | 52 |
<h5>${bundle.GAME_WAIT}</h5> |
jtulach@77 | 53 |
|
jtulach@77 | 54 |
<ol> |
jtulach@77 | 55 |
<#list doc.gameIds.* as g> |
jtulach@77 | 56 |
<#if (g.@white = user && g.@status = "blackMove") || |
jtulach@77 | 57 |
(g.@black = user && g.@status = "whiteMove") |
jtulach@77 | 58 |
> |
jaroslav@56 | 59 |
<li> |
jaroslav@58 | 60 |
<@game g/> |
jaroslav@56 | 61 |
</li> |
jaroslav@56 | 62 |
</#if> |
jaroslav@56 | 63 |
</#list> |
jaroslav@56 | 64 |
</ol> |
jaroslav@56 | 65 |
|
jaroslav@59 | 66 |
<h5>${bundle.GAME_WON}</h5> |
jaroslav@57 | 67 |
|
jaroslav@57 | 68 |
<ol> |
jaroslav@57 | 69 |
<#list doc.gameIds.* as g> |
jaroslav@57 | 70 |
<#if |
jtulach@77 | 71 |
(g.@white = user && g.@status = "whiteWon") || |
jtulach@77 | 72 |
(g.@black = user && g.@status = "blackWon") |
jaroslav@57 | 73 |
> |
jaroslav@57 | 74 |
<li> |
jaroslav@58 | 75 |
<@game g/> |
jaroslav@57 | 76 |
</li> |
jaroslav@57 | 77 |
</#if> |
jaroslav@57 | 78 |
</#list> |
jaroslav@57 | 79 |
</ol> |
jaroslav@57 | 80 |
|
jaroslav@59 | 81 |
<h5>${bundle.GAME_LOST}</h5> |
jaroslav@57 | 82 |
|
jaroslav@57 | 83 |
<ol> |
jaroslav@57 | 84 |
<#list doc.gameIds.* as g> |
jaroslav@57 | 85 |
<#if |
jtulach@77 | 86 |
(g.@white = user && g.@status = "blackWon") || |
jtulach@77 | 87 |
(g.@black = user && g.@status = "whiteWon") |
jaroslav@57 | 88 |
> |
jaroslav@57 | 89 |
<li> |
jaroslav@58 | 90 |
<@game g/> |
jaroslav@57 | 91 |
</li> |
jaroslav@57 | 92 |
</#if> |
jaroslav@57 | 93 |
</#list> |
jaroslav@57 | 94 |
</ol> |
jaroslav@57 | 95 |
|
jtulach@74 | 96 |
<form action="/games/create"> |
jaroslav@59 | 97 |
${bundle.WHITE}: <input type="text" name="white" value="" /> |
jaroslav@59 | 98 |
${bundle.BLACK}: <input type="text" name="black" value="" /> |
jaroslav@71 | 99 |
<input type="submit" value="${bundle.CREATE}" /> |
jaroslav@57 | 100 |
</form> |
jaroslav@57 | 101 |
|
jaroslav@59 | 102 |
<h5>${bundle.GAME_ALL}</h5> |
jaroslav@56 | 103 |
|
jtulach@41 | 104 |
<ol> |
jtulach@54 | 105 |
<#list doc.gameIds.* as g> |
jtulach@54 | 106 |
<li> |
jaroslav@58 | 107 |
<@game g/> |
jtulach@54 | 108 |
</li> |
jtulach@41 | 109 |
</#list> |
jtulach@41 | 110 |
</ol> |
jtulach@41 | 111 |
</body> |
jtulach@41 | 112 |
</html> |