{namespace v=FluidTYPO3\Vhs\ViewHelpers}
{namespace ot=Opentalent\OtTemplating\ViewHelpers}

<f:comment><!-- Panneau d'authentification ou espace utilisateur --></f:comment>

<ul>
    <f:security.ifAuthenticated>
        <f:then>
            <v:variable.set name="feuser" value="{ot:request.getFeUser()}"/>

            <li>
                <span><f:translate key="welcome"/> <b>{feuser.username}</b>!</span>
            </li>
            <li>
                <a href="{settings.opentalentDashboardUrl}">
                    <f:translate key="member-area-of-my-structure"/>
                </a>
            </li>
            <li>
                <f:link.page additionalParams="{logintype:'logout'}">
                    <f:translate key="log-out"/>
                </f:link.page>
            </li>
        </f:then>
        <f:else>
            <li>
                <a href="https://www.opentalent.fr/login/"
                   target="_blank"
                   class="{f:if(condition: '{ot:loginFailed()}', then: 'trigger-on-load')}"
                >
                    <f:translate key="login"/>
                </a>
            </li>
        </f:else>
    </f:security.ifAuthenticated>
</ul>
