Skip to content

Commit

Permalink
Country icon in viewing as well
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Jul 17, 2019
1 parent 08f0fab commit 851c418
Showing 1 changed file with 13 additions and 7 deletions.
Expand Up @@ -318,13 +318,19 @@ protected void showSelectedObject (@Nonnull final WebPageExecutionContext aWPEC,

aForm2.addFormGroup (new BootstrapFormGroup ().setLabel ("Name")
.setCtrl (aEntity.names ().getFirst ().getName ()));
aForm2.addFormGroup (new BootstrapFormGroup ().setLabel ("Country code")
.setCtrl (CountryCache.getInstance ()
.getCountry (aEntity.getCountryCode ())
.getDisplayCountry (aDisplayLocale) +
" [" +
aEntity.getCountryCode () +
"]"));

{
final Locale aCountry = CountryCache.getInstance ().getCountry (aEntity.getCountryCode ());
final HCNodeList aCtrl = new HCNodeList ();
final EFamFamFlagIcon eIcon = EFamFamFlagIcon.getFromIDOrNull (aCountry.getCountry ());
if (eIcon != null)
{
aCtrl.addChild (eIcon.getAsNode ());
aCtrl.addChild (" ");
}
aCtrl.addChild (aCountry.getDisplayCountry (aDisplayLocale) + " [" + aEntity.getCountryCode () + "]");
aForm2.addFormGroup (new BootstrapFormGroup ().setLabel ("Country code").setCtrl (aCtrl));
}
if (aEntity.hasGeographicalInformation ())
{
aForm2.addFormGroup (new BootstrapFormGroup ().setLabel ("Geographical information")
Expand Down

0 comments on commit 851c418

Please sign in to comment.