|
|
|
@ -3,35 +3,35 @@
|
|
|
|
|
|
|
|
|
|
<PageTitle>Gestion utilisateur</PageTitle>
|
|
|
|
|
|
|
|
|
|
<h3>@Localizer["Title"]</h3>
|
|
|
|
|
<h3>@Localizer["TitleUser"]</h3>
|
|
|
|
|
|
|
|
|
|
@if(users == null)
|
|
|
|
|
{
|
|
|
|
|
<p><strong>Aucun utilisateur présent sur le site</strong></p>
|
|
|
|
|
<p><strong>@Localizer["UserNobody"]</strong></p>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<p>Utilisateurs présents:</p>
|
|
|
|
|
<p>@Localizer["UserHere"]</p>
|
|
|
|
|
@foreach (var user in users)
|
|
|
|
|
{
|
|
|
|
|
<div class="userDiv">
|
|
|
|
|
<img class="imgProfil" src="@user.Image" />
|
|
|
|
|
@if (user.IsAdmin)
|
|
|
|
|
{
|
|
|
|
|
<p class="pseudo"><strong>Nom d'utilisateur :</strong> @user.Name <strong>(Administrateur)</strong></p>
|
|
|
|
|
<p class="pseudo"><strong>@Localizer["UserName"]</strong> @user.Name <strong>(@Localizer["UserAdmin"])</strong></p>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<p class="pseudo"><strong>Nom d'utilisateur :</strong> @user.Name</p>
|
|
|
|
|
<p class="pseudo"><strong>@Localizer["UserName"]</strong> @user.Name</p>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<p class="mail"><strong>Email de l'utilisateur :</strong> @user.Email</p>
|
|
|
|
|
<p class="dateCrea"><strong>Date de création du compte :</strong> @user.DateCreation.ToShortDateString()</p>
|
|
|
|
|
<p class="mail"><strong>@Localizer["UserEmail"]</strong> @user.Email</p>
|
|
|
|
|
<p class="dateCrea"><strong>@Localizer["UserDate"]</strong> @user.DateCreation.ToShortDateString()</p>
|
|
|
|
|
|
|
|
|
|
@if(user.Comments != null)
|
|
|
|
|
{
|
|
|
|
|
<p class="titleComments"><strong>▶ Commentaire(s) posté(s) par @user.Name : </strong></p>
|
|
|
|
|
<p class="titleComments"><strong>▶ @Localizer["UserComment"] @user.Name : </strong></p>
|
|
|
|
|
@foreach (var comment in user.Comments)
|
|
|
|
|
{
|
|
|
|
|
<p class="comments">@comment.DateCreation.ToShortDateString() - @comment.Text</p>
|
|
|
|
@ -39,18 +39,18 @@ else
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<p><i>Aucun commentaire sur le site</i></p>
|
|
|
|
|
<p><i>@Localizer["UserNoComment"]</i></p>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<button id="DeleteButton" @onclick="() => ShowConfirmation(user)">Supprimer l'utilisateur</button>
|
|
|
|
|
<button id="DeleteButton" @onclick="() => ShowConfirmation(user)">@Localizer["UserDelete"]</button>
|
|
|
|
|
|
|
|
|
|
@if (!user.IsAdmin)
|
|
|
|
|
{
|
|
|
|
|
<button id="AdminButton" @onclick="() => ShowConfirmationAdmin(user)">Ajouter en tant qu'administrateur</button>
|
|
|
|
|
<button id="AdminButton" @onclick="() => ShowConfirmationAdmin(user)">@Localizer["UserAddAdmin"]</button>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<button id="AdminButton" @onclick="() => ShowConfirmationAdmin(user)">Retirer en tant qu'administrateur</button>
|
|
|
|
|
<button id="AdminButton" @onclick="() => ShowConfirmationAdmin(user)">@Localizer["UserDeleteAdmin"]</button>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -60,9 +60,9 @@ else
|
|
|
|
|
{
|
|
|
|
|
<div class="divPopup">
|
|
|
|
|
<div class="contentPopup">
|
|
|
|
|
<p>Êtes-vous sûr de vouloir supprimer cet utilisateur ?</p>
|
|
|
|
|
<button @onclick="() => RemoveUser()">Confirmer</button>
|
|
|
|
|
<button @onclick="ClosePopup">Annuler</button>
|
|
|
|
|
<p>@Localizer["UserPopupTitle"]</p>
|
|
|
|
|
<button @onclick="() => RemoveUser()">@Localizer["UserConfirmButton"]</button>
|
|
|
|
|
<button @onclick="ClosePopup">@Localizer["UserDeleteButton"]</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
@ -72,9 +72,9 @@ else
|
|
|
|
|
{
|
|
|
|
|
<div class="divPopup">
|
|
|
|
|
<div class="contentPopup">
|
|
|
|
|
<p>Êtes-vous sûr de vouloir changer le rôle de cet utilisateur ?</p>
|
|
|
|
|
<button @onclick="() => Admin()">Confirmer</button>
|
|
|
|
|
<button @onclick="ClosePopup">Annuler</button>
|
|
|
|
|
<p>@Localizer["UserPopupTitle2"]</p>
|
|
|
|
|
<button @onclick="() => Admin()">@Localizer["UserConfirmButton"]</button>
|
|
|
|
|
<button @onclick="ClosePopup">@Localizer["UserDeleteButton"]</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|