{namespace ot=Opentalent\OtTemplating\ViewHelpers}

<div class="topbar">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-6 col-md-6 xs-mb-10">
                <div class="topbar-call text-center text-md-left">
                    <ul>

                        <li class="brand-free">
                            <strong>{settings.structureName}</strong> est membre de &nbsp;

                            <f:if condition="{settings.networkLogo} != ''">
                                <a href="#"
                                   title="{settings.networkName}"
                                   class="reseau"
                                   data-toggle="modal"
                                   data-target="#cmfModal">
                                    <img src="{settings.networkLogoUrl}"
                                         alt="{settings.networkName}"
                                         height="22px" />
                                </a> &nbsp;
                            </f:if>

                            <a href="#"
                               title="Opentalent"
                               class="reseau-opentalent"
                               data-toggle="modal"
                               data-target="#opentalentModal">
                                <f:image src="EXT:ot_templating/Resources/Public/media/opentalent_longueur_S.jpg"
                                     alt="Opentalent"
                                     height="18px" />
                            </a>
                        </li>

                        <li id="notice-cmf">
                            <strong>{settings.networkName}</strong>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="col-lg-6 col-md-6">
                <div class="topbar-social text-center text-md-right text-bold">
                    <ul>
                        <f:security.ifAuthenticated>
                            <f:then>
                                <li>
                                    <span>Bienvenue <b>{user.username}</b>!</span>
                                </li>
                                <li>
                                    <a href="{settings.opentalentDashboardUrl}">
                                        Accéder à l'intranet
                                    </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="#"
                                       class="{f:if(condition: '{ot:loginFailed()}', then: 'trigger-on-load')}"
                                       data-toggle="modal"
                                       data-target="#loginModal">
                                        Se connecter
                                    </a>
                                </li>
                            </f:else>
                        </f:security.ifAuthenticated>

                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
