1.1 --- a/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/opening_games.fmt Mon Jan 11 11:21:05 2010 +0100
1.2 +++ b/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/opening_games.fmt Mon Jan 11 17:47:35 2010 +0100
1.3 @@ -8,17 +8,19 @@
1.4 <h3><a href="/">${bundle.TITLE_PLAIN}</a></h3>
1.5 <h4>${bundle.OPENINGS} - ${bundle.GAMES}</h4>
1.6
1.7 - <#macro before t>
1.8 + <#macro before t w>
1.9 <#assign seconds = (t / 1000)?long/>
1.10 <#assign minutes= (seconds / 60)?long/>
1.11 <#assign hours= (minutes / 60)?long/>
1.12 <#assign days= (hours / 24)?long/>
1.13 <!--millis: ${t}, seconds: ${seconds}, minutes: ${minutes} hours: ${hours}, days: ${days} -->
1.14 - ${bundle("LastMove", t?int, seconds?int, minutes?int, hours?int, days?int)}
1.15 + ${bundle("LastMove", t?int, seconds?int, minutes?int, hours?int, days?int, w?date?string.long)}
1.16 </#macro>
1.17 <#macro game game>
1.18 ${bundle("gameWhiteBlack", game.@white?string, game.@black?string)}
1.19 - <a href="/games/${game.@id}/"><@before (now - game.@modified?number)?long/></a>
1.20 + <#assign sinceNow= now - game.@modified?number/>
1.21 + <#assign when=toDate[game.@modified?string]/>
1.22 + <a href="/games/${game.@id}/"><@before t=sinceNow w=when/></a>
1.23 <#if game.@comments?number != 0>
1.24 ${bundle("comments", game.@comments?number)}
1.25 </#if>
2.1 --- a/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/openings.fmt Mon Jan 11 11:21:05 2010 +0100
2.2 +++ b/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/openings.fmt Mon Jan 11 17:47:35 2010 +0100
2.3 @@ -56,17 +56,19 @@
2.4 </table>
2.5 </#if>
2.6
2.7 - <#macro before t>
2.8 + <#macro before t w>
2.9 <#assign seconds = (t / 1000)?long/>
2.10 <#assign minutes= (seconds / 60)?long/>
2.11 <#assign hours= (minutes / 60)?long/>
2.12 <#assign days= (hours / 24)?long/>
2.13 <!--millis: ${t}, seconds: ${seconds}, minutes: ${minutes} hours: ${hours}, days: ${days} -->
2.14 - ${bundle("LastMove", t?int, seconds?int, minutes?int, hours?int, days?int)}
2.15 + ${bundle("LastMove", t?int, seconds?int, minutes?int, hours?int, days?int, w?date?string.long)}
2.16 </#macro>
2.17 <#macro game game>
2.18 ${bundle("gameWhiteBlack", game.@white?string, game.@black?string)}
2.19 - <a href="/games/${game.@id}/"><@before (now - game.@modified?number)?long/></a>
2.20 + <#assign sinceNow= now - game.@modified?number/>
2.21 + <#assign when=toDate[game.@modified?string]/>
2.22 + <a href="/games/${game.@id}/"><@before t=sinceNow w=when/></a>
2.23 <#if game.@status = "whiteWon">
2.24 ${bundle.WHITE_WON}
2.25 </#if>