roles
This commit is contained in:
parent
ec08905e9e
commit
1aaf2bd102
12 changed files with 131 additions and 23 deletions
22
Yavsc/Views/Administration/Index.cshtml
Normal file
22
Yavsc/Views/Administration/Index.cshtml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
@model AdminViewModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = SR["Administration"];
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
<p>
|
||||
Rôles :
|
||||
<ul>
|
||||
@foreach (var role in Model.Roles) {
|
||||
<li>@Html.ActionLink(role.Name,"Role",new { id=role.Id }) (@role.Users.Length membres)</li>
|
||||
}
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
Nombre d'administrateurs :
|
||||
@Model.AdminCount
|
||||
</p>
|
||||
<p>
|
||||
Vous êtes administrateur: @(Model.YouAreAdmin?"Oui":"Non")
|
||||
</p>
|
||||
14
Yavsc/Views/Administration/Role.cshtml
Normal file
14
Yavsc/Views/Administration/Role.cshtml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
@model RoleUserCollection
|
||||
@{
|
||||
ViewBag.Title = SR["Role"]+" "+Model.Name;
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
<ul>
|
||||
@foreach (var user in Model.Users) {
|
||||
<li> <img src="~/Avatars/@(user.UserName).xs.png" alt="avatar"/>
|
||||
@user.UserName
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
Loading…
Add table
Add a link
Reference in a new issue