Resources information on planet list
* Added resource information records to the planet list's response. * Added a database view and the corresponding row mapper and DAO method which can be used as the data source for the planet list's resource information. For now this view always returns 0 for both civilian and military investments. * Added new tab to display resource information on the planet list page. The old version of the economy tab will be kept until the corresponding data no longer exists. * The following SQL scripts must be re-executed to upgrade a database: -> 040-functions/167-planet-list.sql
This commit is contained in:
parent
bf6bea5a79
commit
96670d45be
15 changed files with 1079 additions and 31 deletions
legacyworlds-web-main/Content/Raw/WEB-INF/fm
|
@ -28,7 +28,7 @@
|
|||
</@listview>
|
||||
</@tab>
|
||||
|
||||
<@tab id="eco" title="Economy">
|
||||
<@tab id="eco" title="Economy (OLD)">
|
||||
<@listview>
|
||||
<@lv_line headers=true>
|
||||
<@lv_column width="x">Name</@lv_column>
|
||||
|
@ -56,6 +56,9 @@
|
|||
</@listview>
|
||||
</@tab>
|
||||
|
||||
<#include "planets/economy.ftl" />
|
||||
<@RenderEconomy />
|
||||
|
||||
<@tab id="prod" title="Production">
|
||||
<@listview>
|
||||
<@lv_line headers=true>
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
<#macro RenderEconomy>
|
||||
<@tab id="economy" title="Economy">
|
||||
<@listview>
|
||||
<@lv_line headers=true>
|
||||
<@lv_column width="x">Name</@lv_column>
|
||||
<@lv_column width="x">Resource</@lv_column>
|
||||
<@lv_column width=110 right=true>Income</@lv_column>
|
||||
<@lv_column width=110 right=true>Upkeep</@lv_column>
|
||||
<@lv_column width=110 right=true>Profit</@lv_column>
|
||||
</@lv_line>
|
||||
|
||||
<#list pl as planet>
|
||||
<#if planet.resources?size = 0>
|
||||
<@lv_line>
|
||||
<@lv_column><a href="planet-${planet.id}#resources">${planet.name?xhtml}</a></@lv_column>
|
||||
<@lv_column colspan=4 centered=true><em>No income or upkeep</em></@lv_column>
|
||||
</@lv_line>
|
||||
<#else>
|
||||
<#list planet.resources as resource>
|
||||
<@lv_line>
|
||||
<@lv_column>
|
||||
<#if resource_index = 0>
|
||||
<a href="planet-${planet.id}#resources">${planet.name?xhtml}</a>
|
||||
<#else>
|
||||
|
||||
</#if>
|
||||
</@lv_column>
|
||||
<@lv_column>${resource.name?xhtml}</@lv_column>
|
||||
<@lv_column right=true>${resource.income?string(",##0")}</@lv_column>
|
||||
<@lv_column right=true>${resource.upkeep?string(",##0")}</@lv_column>
|
||||
<@lv_column right=true>
|
||||
<#if resource.upkeep gt resource.income>
|
||||
<span style="color: red">
|
||||
</#if>
|
||||
${( resource.income - resource.upkeep )?string(",##0")}
|
||||
<#if resource.upkeep gt resource.income>
|
||||
</span>
|
||||
</#if>
|
||||
</@lv_column>
|
||||
</@lv_line>
|
||||
</#list>
|
||||
</#if>
|
||||
</#list>
|
||||
|
||||
<@lv_line headers=true>
|
||||
<@lv_column width="x" colspan=6> </@lv_column>
|
||||
</@lv_line>
|
||||
<@lv_line>
|
||||
<@lv_column centered=true colspan=6>
|
||||
Incomes, upkeeps and profits are displayed for a period of one game month (12 actual hours).
|
||||
</@lv_column>
|
||||
</@lv_line>
|
||||
|
||||
</@listview>
|
||||
</@tab>
|
||||
</#macro>
|
|
@ -28,7 +28,7 @@
|
|||
</@listview>
|
||||
</@tab>
|
||||
|
||||
<@tab id="eco" title="Économie">
|
||||
<@tab id="eco" title="Économie (VIEUX)">
|
||||
<@listview>
|
||||
<@lv_line headers=true>
|
||||
<@lv_column width="x">Nom</@lv_column>
|
||||
|
@ -56,6 +56,9 @@
|
|||
</@listview>
|
||||
</@tab>
|
||||
|
||||
<#include "planets/economy.ftl" />
|
||||
<@RenderEconomy />
|
||||
|
||||
<@tab id="prod" title="Production">
|
||||
<@listview>
|
||||
<@lv_line headers=true>
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
<#macro RenderEconomy>
|
||||
<@tab id="economy" title="Economie">
|
||||
<@listview>
|
||||
<@lv_line headers=true>
|
||||
<@lv_column width="x">Name</@lv_column>
|
||||
<@lv_column width="x">Resource</@lv_column>
|
||||
<@lv_column width=110 right=true>Revenus</@lv_column>
|
||||
<@lv_column width=110 right=true>Charges</@lv_column>
|
||||
<@lv_column width=110 right=true>Bénéfices</@lv_column>
|
||||
</@lv_line>
|
||||
|
||||
<#list pl as planet>
|
||||
<#if planet.resources?size = 0>
|
||||
<@lv_line>
|
||||
<@lv_column><a href="planet-${planet.id}#resources">${planet.name?xhtml}</a></@lv_column>
|
||||
<@lv_column colspan=4 centered=true><em>Aucune entrée pour cette planète</em></@lv_column>
|
||||
</@lv_line>
|
||||
<#else>
|
||||
<#list planet.resources as resource>
|
||||
<@lv_line>
|
||||
<@lv_column>
|
||||
<#if resource_index = 0>
|
||||
<a href="planet-${planet.id}#resources">${planet.name?xhtml}</a>
|
||||
<#else>
|
||||
|
||||
</#if>
|
||||
</@lv_column>
|
||||
<@lv_column>${resource.name?xhtml}</@lv_column>
|
||||
<@lv_column right=true>${resource.income?string(",##0")}</@lv_column>
|
||||
<@lv_column right=true>${resource.upkeep?string(",##0")}</@lv_column>
|
||||
<@lv_column right=true>
|
||||
<#if resource.upkeep gt resource.income>
|
||||
<span style="color: red">
|
||||
</#if>
|
||||
${( resource.income - resource.upkeep )?string(",##0")}
|
||||
<#if resource.upkeep gt resource.income>
|
||||
</span>
|
||||
</#if>
|
||||
</@lv_column>
|
||||
</@lv_line>
|
||||
</#list>
|
||||
</#if>
|
||||
</#list>
|
||||
|
||||
<@lv_line headers=true>
|
||||
<@lv_column width="x" colspan=6> </@lv_column>
|
||||
</@lv_line>
|
||||
<@lv_line>
|
||||
<@lv_column centered=true colspan=6>
|
||||
Les revenus, charges et bénéfices sont indiqués pour une durée d'un mois en temps de jeu, soit 12 heures réelles.
|
||||
</@lv_column>
|
||||
</@lv_line>
|
||||
|
||||
</@listview>
|
||||
</@tab>
|
||||
</#macro>
|
Reference in a new issue