jaroslav@178
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
jaroslav@178
|
2 |
<html>
|
jaroslav@178
|
3 |
<head>
|
jaroslav@178
|
4 |
<title>${bundle.OPENINGS}</title>
|
jaroslav@178
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
jaroslav@178
|
6 |
</head>
|
jaroslav@178
|
7 |
<body bgcolor="white">
|
jaroslav@178
|
8 |
<h3><a href="/">${bundle.TITLE_PLAIN}</a></h3>
|
jaroslav@178
|
9 |
<h4><a href="/openings">${bundle.OPENINGS}</a></h4>
|
jaroslav@178
|
10 |
<p>
|
jaroslav@178
|
11 |
<b>${bundle.WHITE}:</b> ${bundle("FENCES_LEFT", whitefences?number)}<br>
|
jaroslav@178
|
12 |
<b>${bundle.BLACK}:</b> ${bundle("FENCES_LEFT", blackfences?number)}<br>
|
jaroslav@178
|
13 |
</p>
|
jaroslav@178
|
14 |
<div style="position: relative; height:180px;">
|
jaroslav@178
|
15 |
<img style="position: absolute; left: 0; right: 0;"
|
jaroslav@178
|
16 |
width="180" height="180 "
|
jaroslav@178
|
17 |
src="/openings/${doc.openingNodeView.@code}.png?fieldSize=20"
|
jaroslav@178
|
18 |
alt="${bundle.BOARD_TEXT}"
|
jaroslav@178
|
19 |
>
|
jaroslav@178
|
20 |
<div id="fence" style="position: absolute; left: 0; right: 0;"></div>
|
jaroslav@178
|
21 |
<div id="player" style="position: absolute; left: 0; right: 0;"></div>
|
jaroslav@178
|
22 |
</div>
|
jaroslav@178
|
23 |
|
jaroslav@178
|
24 |
<#macro move item>
|
jaroslav@178
|
25 |
<a href="/openings/${item.code}/">${item.move}</a>
|
jaroslav@178
|
26 |
</#macro>
|
jaroslav@178
|
27 |
<#macro games cnt gId status code>
|
jaroslav@178
|
28 |
<#if (cnt?number = 0)>
|
jaroslav@178
|
29 |
${cnt?number}
|
jaroslav@178
|
30 |
</#if>
|
jaroslav@178
|
31 |
<#if (cnt?number = 1)>
|
jaroslav@178
|
32 |
<a href="/games/${gId.@id}/">${cnt?number}</a>
|
jaroslav@178
|
33 |
</#if>
|
jaroslav@178
|
34 |
<#if (cnt?number > 1)>
|
jaroslav@178
|
35 |
<a href="/openings/${code}/${status}">${cnt?number}</a>
|
jaroslav@178
|
36 |
</#if>
|
jaroslav@178
|
37 |
</#macro>
|
jaroslav@178
|
38 |
<#if (doc.openingNodeView.children.*?size > 0)>
|
jaroslav@178
|
39 |
<table border="1">
|
jaroslav@178
|
40 |
<thead>
|
jaroslav@178
|
41 |
<tr>
|
jaroslav@178
|
42 |
<th>${bundle.MOVENUMBER}</th>
|
jaroslav@178
|
43 |
<th>${bundle.WHITE_WON}</th>
|
jaroslav@178
|
44 |
<th>${bundle.BLACK_WON}</th>
|
jaroslav@178
|
45 |
</tr>
|
jaroslav@178
|
46 |
</thead>
|
jaroslav@178
|
47 |
<tbody>
|
jaroslav@178
|
48 |
<#list doc.openingNodeView.children.* as item>
|
jaroslav@178
|
49 |
<tr>
|
jaroslav@178
|
50 |
<td><@move item/></td>
|
jaroslav@178
|
51 |
<td><@games item.whiteWon item.whiteGame 'white' item.code/></td>
|
jaroslav@178
|
52 |
<td><@games item.blackWon item.blackGame 'black' item.code/></td>
|
jaroslav@178
|
53 |
</tr>
|
jaroslav@178
|
54 |
</#list>
|
jaroslav@178
|
55 |
</tbody>
|
jaroslav@178
|
56 |
</table>
|
jaroslav@178
|
57 |
</#if>
|
jaroslav@178
|
58 |
|
jaroslav@178
|
59 |
<#macro before t>
|
jaroslav@178
|
60 |
<#assign seconds = (t / 1000)?long/>
|
jaroslav@178
|
61 |
<#assign minutes= (seconds / 60)?long/>
|
jaroslav@178
|
62 |
<#assign hours= (minutes / 60)?long/>
|
jaroslav@178
|
63 |
<#assign days= (hours / 24)?long/>
|
jaroslav@178
|
64 |
<!--millis: ${t}, seconds: ${seconds}, minutes: ${minutes} hours: ${hours}, days: ${days} -->
|
jaroslav@178
|
65 |
${bundle("LastMove", t?int, seconds?int, minutes?int, hours?int, days?int)}
|
jaroslav@178
|
66 |
</#macro>
|
jaroslav@178
|
67 |
<#macro game game>
|
jaroslav@178
|
68 |
${bundle("gameWhiteBlack", game.@white?string, game.@black?string)}
|
jaroslav@178
|
69 |
<a href="/games/${game.@id}/"><@before (now - game.@modified?number)?long/></a>
|
jaroslav@178
|
70 |
<#if game.@status = "whiteWon">
|
jaroslav@178
|
71 |
${bundle.WHITE_WON}
|
jaroslav@178
|
72 |
</#if>
|
jaroslav@178
|
73 |
<#if game.@status = "blackWon">
|
jaroslav@178
|
74 |
${bundle.BLACK_WON}
|
jaroslav@178
|
75 |
</#if>
|
jaroslav@178
|
76 |
<#if game.@comments?number != 0>
|
jaroslav@178
|
77 |
${bundle("comments", game.@comments?number)}
|
jaroslav@178
|
78 |
</#if>
|
jaroslav@178
|
79 |
</#macro>
|
jaroslav@178
|
80 |
|
jaroslav@178
|
81 |
<#if (doc.openingNodeView.@whiteCount?number + doc.openingNodeView.@blackCount?number > 0)>
|
jaroslav@178
|
82 |
<h3>${bundle.GAMES}</h3>
|
jaroslav@178
|
83 |
<ol>
|
jaroslav@178
|
84 |
<#list doc.openingNodeView.whiteGames.* as g>
|
jaroslav@178
|
85 |
<li>
|
jaroslav@178
|
86 |
<@game g/>
|
jaroslav@178
|
87 |
</li>
|
jaroslav@178
|
88 |
</#list>
|
jaroslav@178
|
89 |
<#list doc.openingNodeView.blackGames.* as g>
|
jaroslav@178
|
90 |
<li>
|
jaroslav@178
|
91 |
<@game g/>
|
jaroslav@178
|
92 |
</li>
|
jaroslav@178
|
93 |
</#list>
|
jaroslav@178
|
94 |
</ol>
|
jaroslav@178
|
95 |
</#if>
|
jaroslav@178
|
96 |
</body>
|
jaroslav@178
|
97 |
</html> |