Added registration icons in service page.

This commit is contained in:
Christian P. MOMON 2020-10-02 19:43:37 +02:00
parent d783348fcf
commit fa536d30c0
2 changed files with 29 additions and 0 deletions

View file

@ -25,6 +25,7 @@ import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service; import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.core.StatoolInfosException; import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.xidyn.XidynException; import fr.devinsy.xidyn.XidynException;
import fr.devinsy.xidyn.data.DisplayMode;
import fr.devinsy.xidyn.data.TagDataManager; import fr.devinsy.xidyn.data.TagDataManager;
import fr.devinsy.xidyn.presenters.PresenterUtils; import fr.devinsy.xidyn.presenters.PresenterUtils;
@ -60,6 +61,27 @@ public class ServicePage
data.setEscapedContent("serviceName", service.getName()); data.setEscapedContent("serviceName", service.getName());
data.setEscapedContent("serviceDescription", service.getDescription()); data.setEscapedContent("serviceDescription", service.getDescription());
if (service.isRegistrationNone())
{
data.setAttribute("registrationNoneImg", "class", "toto");
data.getIdData("registrationNoneImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
if (service.isRegistrationFree())
{
data.setAttribute("registrationFreeImg", "class", "");
data.getIdData("registrationFreeImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
if (service.isRegistrationMember())
{
data.setAttribute("registrationMemberImg", "class", "");
data.getIdData("registrationMemberImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
if (service.isRegistrationClient())
{
data.setAttribute("registrationClientImg", "class", "");
data.getIdData("registrationClientImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/service.xhtml", data).toString(); String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/service.xhtml", data).toString();
BreadcrumbTrail trail = new BreadcrumbTrail(); BreadcrumbTrail trail = new BreadcrumbTrail();

View file

@ -18,6 +18,13 @@
<a id="serviceRawButton" href="#" class="button">Raw</a> <a id="serviceRawButton" href="#" class="button">Raw</a>
</div> </div>
<div>
<img id="registrationNoneImg" src="circle-icons/mono/global.png" class="disabled" style="width: 50px; height: 50px; padding-top:0; padding-bottom: 0; vertical-align: middle;" title="Sans compte"/>
<img id="registrationFreeImg" src="circle-icons/mono/profile.png" class="disabled" style="width: 50px; height: 50px; padding-top:0; padding-bottom: 0; vertical-align: middle;" title="Compte libre"/>
<img id="registrationMemberImg" src="circle-icons/mono/money.png" class="disabled" style="width: 50px; height: 50px; padding-top:0; padding-bottom: 0; vertical-align: middle;" title="Réservé aux adhérents"/>
<img id="registrationClientImg" src="circle-icons/mono/creditcard.png" class="disabled" style="width: 50px; height: 50px; padding-top:0; padding-bottom: 0; vertical-align: middle;" title="Réservé aux clients"/>
</div>
<p id="serviceDescription">Bla bla description</p> <p id="serviceDescription">Bla bla description</p>
</div> </div>
<div>&#160;</div> <div>&#160;</div>