{
public UserInfoPanel()
{
setClassName( "user-info-panel" );
WebApplication webApplication = WebApplication.get();
Account account = webApplication.getLoggedInAccount();
if ( account != null )
{
Anchor link = new Anchor( account.getUserInfo(), MyAccount.class );
add( link );
}
else
{
add( new Span( localize(
"label.registerOrLogin",
webApplication.getPathByPageClass( Registration.class ),
webApplication.getPathByPageClass( Login.class ) ) ) );
}
}