Author: bleny Date: 2010-10-28 13:47:52 +0000 (Thu, 28 Oct 2010) New Revision: 718 Log: better presentation of global synthesis result Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java trunk/wao-ui/src/main/webapp/Synthesis.tml Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java 2010-10-28 09:51:54 UTC (rev 717) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java 2010-10-28 13:47:52 UTC (rev 718) @@ -24,6 +24,7 @@ package fr.ifremer.wao.ui.pages; +import fr.ifremer.wao.bean.GlobalIndicatorValue; import fr.ifremer.wao.bean.GlobalSynthesisResult; import fr.ifremer.wao.bean.SynthesisId; import fr.ifremer.wao.WaoException; @@ -511,4 +512,18 @@ return getDataReliability().get(user.getCompany()); } + /********************* GLOBAL SYNTHESIS ***********************************/ + + @Property + private GlobalIndicatorValue globalLevels[] = GlobalIndicatorValue.values(); + + /* variable used in template */ + @Property + private GlobalIndicatorValue globalLevel; + + public boolean highlightGlobalLevel() { + return globalLevel == getGlobalSynthesisResult().getGlobalLevel(); + } + + } \ No newline at end of file Modified: trunk/wao-ui/src/main/webapp/Synthesis.tml =================================================================== --- trunk/wao-ui/src/main/webapp/Synthesis.tml 2010-10-28 09:51:54 UTC (rev 717) +++ trunk/wao-ui/src/main/webapp/Synthesis.tml 2010-10-28 13:47:52 UTC (rev 718) @@ -362,7 +362,25 @@ <t:indicatorLevels t:indicator="activeIndicator" t:highlightLevel="activeIndicatorLevel" /> </t:loop> - Bilan de la synthèse globale : ${globalSynthesisResult.globalLevel} + <table class="indicatorLevels"> + <tbody> + <tr> + <t:loop t:source="globalLevels" t:value="globalLevel"> + <t:if test="highlightGlobalLevel()"> + <td class="highlight selected"> + ${globalLevel} + </td> + <p:else> + <td> + ${globalLevel} + </td> + </p:else> + </t:if> + </t:loop> + </tr> + </tbody> + </table> + </div> </t:block> </t:layout>