@using System.Security.Claims

@if (User.IsSignedIn())
{

        <ul class="nav navbar-nav navbar-right">
            <li>
                <a asp-controller="Manage" class="navbar-link" asp-action="Index" title="Manage">
                   <img src="/Avatars/@(User.GetUserName()+".xs").png" asp-append-version="true" class="smalltofhol" />
                </a>
            </li>
            <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                        Plateforme <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a asp-controller="Bug" asp-action="Index">Bugs</a></li>
                        <li><a asp-controller="HyperLink" asp-action="Index">@SR["HyperLink"]</a></li>
                        <li><a asp-controller="LiveFlow" asp-action="Index">@SR["LiveFlow"]</a></li>
                        <li><a asp-controller="Feature" asp-action="Index">@SR["Features"]</a></li>
                    </ul>
             @if (User.IsInRole(Constants.AdminGroupName)) {
             <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                        Administration <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                    <li><a asp-controller="Administration" asp-action="Index">Index</a></li>
                    <li><a asp-controller="Activity" asp-action="Index">Activités</a></li>
                    <li><a asp-controller="CommandForms" asp-action="Index">Formulaires</a></li>
                    <li><a asp-controller="Notifications" asp-action="Index">Notifications</a></li>
                    <li><a asp-controller="SIRENExceptions" asp-action="Index">Excéptions au numéro de SIREN</a></li>
                    <li><a asp-controller="Client" asp-action="Index">Accès API</a></li>
                    <li><a asp-controller="MailingTemplate" asp-action="Index">Emailing</a></li>
                </ul>
            </li>}
            
            <li>
                 <form asp-controller="Account" asp-action="LogOff" 
                 method="post" id="logoutForm">
                     <button type="submit" class="btn navbar-btn" >@SR["Logout"]</button>
                 <input type="hidden" name="ReturnUrl" value="/" />
                </form>
            </li>
        </ul>
}
else
{
    <ul class="nav navbar-nav navbar-right">
        <li><a class="navbar-link" asp-controller="Account" asp-action="Register" asp-route-returnurl="@Url.Action()" >@SR["Register"]</a></li>
           
        <li><a class="navbar-link" asp-controller="Account" asp-action="SignIn" asp-route-returnurl="@Url.Action()" >@SR["Login"]</a></li>
    </ul>
}
