Inscriptions:
* traductions * Controlleur des utilisateurs
This commit is contained in:
127
Yavsc/Controllers/UsersController.cs
Normal file
127
Yavsc/Controllers/UsersController.cs
Normal file
@ -0,0 +1,127 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
[Authorize("AdministratorOnly")]
|
||||
public class UsersController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public UsersController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: Users
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
var applicationDbContext = _context.ApplicationUser.Include(a => a.PostalAddress);
|
||||
return View(await applicationDbContext.ToListAsync());
|
||||
}
|
||||
|
||||
// GET: Users/Details/5
|
||||
public async Task<IActionResult> Details(string id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
ApplicationUser applicationUser = await _context.ApplicationUser.SingleAsync(m => m.Id == id);
|
||||
if (applicationUser == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(applicationUser);
|
||||
}
|
||||
|
||||
// GET: Users/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewData["PostalAddressId"] = new SelectList(_context.Map, "Id", "PostalAddress");
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: Users/Create
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(ApplicationUser applicationUser)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.ApplicationUser.Add(applicationUser);
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewData["PostalAddressId"] = new SelectList(_context.Map, "Id", "PostalAddress", applicationUser.PostalAddressId);
|
||||
return View(applicationUser);
|
||||
}
|
||||
|
||||
// GET: Users/Edit/5
|
||||
public async Task<IActionResult> Edit(string id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
ApplicationUser applicationUser = await _context.ApplicationUser.SingleAsync(m => m.Id == id);
|
||||
if (applicationUser == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
ViewData["PostalAddressId"] = new SelectList(_context.Map, "Id", "PostalAddress", applicationUser.PostalAddressId);
|
||||
return View(applicationUser);
|
||||
}
|
||||
|
||||
// POST: Users/Edit/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(ApplicationUser applicationUser)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Update(applicationUser);
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewData["PostalAddressId"] = new SelectList(_context.Map, "Id", "PostalAddress", applicationUser.PostalAddressId);
|
||||
return View(applicationUser);
|
||||
}
|
||||
|
||||
// GET: Users/Delete/5
|
||||
[ActionName("Delete")]
|
||||
public async Task<IActionResult> Delete(string id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
ApplicationUser applicationUser = await _context.ApplicationUser.SingleAsync(m => m.Id == id);
|
||||
if (applicationUser == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(applicationUser);
|
||||
}
|
||||
|
||||
// POST: Users/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(string id)
|
||||
{
|
||||
ApplicationUser applicationUser = await _context.ApplicationUser.SingleAsync(m => m.Id == id);
|
||||
_context.ApplicationUser.Remove(applicationUser);
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
}
|
@ -280,5 +280,7 @@ namespace Yavsc.Models
|
||||
public DbSet<Period> Period { get; set; }
|
||||
|
||||
public DbSet<BlogTag> BlogTags { get; set; }
|
||||
|
||||
public DbSet<ApplicationUser> ApplicationUser { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,44 +1,42 @@
|
||||
@model ExternalLoginConfirmationViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<h3>Associate your @ViewData["LoginProvider"] account.</h3>
|
||||
|
||||
@ViewData["jsonres"]
|
||||
|
||||
<form asp-controller="Account" asp-action="ExternalLoginConfirmation" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal" role="form">
|
||||
<h4>Association Form</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
|
||||
<p class="text-info">
|
||||
You've successfully authenticated with <strong>@ViewData["LoginProvider"]</strong>.
|
||||
Please enter a user name for this site below and click the Register button to finish
|
||||
logging in.
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label asp-for="Name" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Name" class="form-control" />
|
||||
<span asp-validation-for="Name" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Register</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
@model ExternalLoginConfirmationViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<h3>Assoiciez votre compte @ViewData["LoginProvider"].</h3>
|
||||
|
||||
<form asp-controller="Account" asp-action="ExternalLoginConfirmation" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal" role="form">
|
||||
<h4>Formulaire d'Association</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
|
||||
<p class="text-info">
|
||||
You've successfully authenticated with <strong>@ViewData["LoginProvider"]</strong>.
|
||||
Please enter a user name for this site below and click the Register button to finish
|
||||
logging in.
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label asp-for="Name" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Name" class="form-control" />
|
||||
<span asp-validation-for="Name" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Register</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
42
Yavsc/Views/Account/ExternalLoginConfirmation.fr.cshtml
Executable file
42
Yavsc/Views/Account/ExternalLoginConfirmation.fr.cshtml
Executable file
@ -0,0 +1,42 @@
|
||||
@model ExternalLoginConfirmationViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<h3>Assoiciez votre compte @ViewData["LoginProvider"].</h3>
|
||||
|
||||
<form asp-controller="Account" asp-action="ExternalLoginConfirmation" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal" role="form">
|
||||
<h4>Formulaire d'Association</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
|
||||
<p class="text-info">
|
||||
Vous vous êtes authentifié avec succès auprès de <strong>@ViewData["LoginProvider"]</strong>.
|
||||
Veuillez s'il vous plait, saisir un nom d'utilisateur ci-dessous
|
||||
et activer le boutton "Enregister" pour terminer votre inscription.
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label asp-for="Name" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Name" class="form-control" />
|
||||
<span asp-validation-for="Name" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Enregister</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
168
Yavsc/Views/Users/Create.cshtml
Normal file
168
Yavsc/Views/Users/Create.cshtml
Normal file
@ -0,0 +1,168 @@
|
||||
@model Yavsc.Models.ApplicationUser
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>ApplicationUser</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="AccessFailedCount" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="AccessFailedCount" class="form-control" />
|
||||
<span asp-validation-for="AccessFailedCount" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Avatar" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Avatar" class="form-control" />
|
||||
<span asp-validation-for="Avatar" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ConcurrencyStamp" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ConcurrencyStamp" class="form-control" />
|
||||
<span asp-validation-for="ConcurrencyStamp" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="DedicatedGoogleCalendar" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="DedicatedGoogleCalendar" class="form-control" />
|
||||
<span asp-validation-for="DedicatedGoogleCalendar" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="DiskQuota" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="DiskQuota" class="form-control" />
|
||||
<span asp-validation-for="DiskQuota" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="DiskUsage" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="DiskUsage" class="form-control" />
|
||||
<span asp-validation-for="DiskUsage" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="EmailConfirmed" />
|
||||
<label asp-for="EmailConfirmed"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="FullName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="FullName" class="form-control" />
|
||||
<span asp-validation-for="FullName" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="LockoutEnabled" />
|
||||
<label asp-for="LockoutEnabled"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="LockoutEnd" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="LockoutEnd" class="form-control" />
|
||||
<span asp-validation-for="LockoutEnd" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="NormalizedEmail" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="NormalizedEmail" class="form-control" />
|
||||
<span asp-validation-for="NormalizedEmail" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="NormalizedUserName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="NormalizedUserName" class="form-control" />
|
||||
<span asp-validation-for="NormalizedUserName" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="PasswordHash" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="PasswordHash" class="form-control" />
|
||||
<span asp-validation-for="PasswordHash" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="PhoneNumber" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="PhoneNumber" class="form-control" />
|
||||
<span asp-validation-for="PhoneNumber" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="PhoneNumberConfirmed" />
|
||||
<label asp-for="PhoneNumberConfirmed"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="PostalAddressId" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="PostalAddressId" class ="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="SecurityStamp" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="SecurityStamp" class="form-control" />
|
||||
<span asp-validation-for="SecurityStamp" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="TwoFactorEnabled" />
|
||||
<label asp-for="TwoFactorEnabled"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="UserName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="UserName" class="form-control" />
|
||||
<span asp-validation-for="UserName" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
136
Yavsc/Views/Users/Delete.cshtml
Normal file
136
Yavsc/Views/Users/Delete.cshtml
Normal file
@ -0,0 +1,136 @@
|
||||
@model Yavsc.Models.ApplicationUser
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>ApplicationUser</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.AccessFailedCount)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.AccessFailedCount)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Avatar)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Avatar)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ConcurrencyStamp)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ConcurrencyStamp)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DedicatedGoogleCalendar)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DedicatedGoogleCalendar)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DiskQuota)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DiskQuota)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DiskUsage)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DiskUsage)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Email)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Email)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.EmailConfirmed)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.EmailConfirmed)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FullName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FullName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LockoutEnabled)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LockoutEnabled)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LockoutEnd)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LockoutEnd)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.NormalizedEmail)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.NormalizedEmail)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.NormalizedUserName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.NormalizedUserName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.PasswordHash)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.PasswordHash)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.PhoneNumber)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.PhoneNumber)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.PhoneNumberConfirmed)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.PhoneNumberConfirmed)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.SecurityStamp)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.SecurityStamp)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.TwoFactorEnabled)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.TwoFactorEnabled)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.UserName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.UserName)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
132
Yavsc/Views/Users/Details.cshtml
Normal file
132
Yavsc/Views/Users/Details.cshtml
Normal file
@ -0,0 +1,132 @@
|
||||
@model Yavsc.Models.ApplicationUser
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>ApplicationUser</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.AccessFailedCount)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.AccessFailedCount)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Avatar)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Avatar)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ConcurrencyStamp)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ConcurrencyStamp)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DedicatedGoogleCalendar)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DedicatedGoogleCalendar)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DiskQuota)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DiskQuota)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DiskUsage)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DiskUsage)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Email)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Email)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.EmailConfirmed)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.EmailConfirmed)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FullName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FullName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LockoutEnabled)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LockoutEnabled)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LockoutEnd)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LockoutEnd)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.NormalizedEmail)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.NormalizedEmail)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.NormalizedUserName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.NormalizedUserName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.PasswordHash)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.PasswordHash)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.PhoneNumber)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.PhoneNumber)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.PhoneNumberConfirmed)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.PhoneNumberConfirmed)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.SecurityStamp)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.SecurityStamp)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.TwoFactorEnabled)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.TwoFactorEnabled)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.UserName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.UserName)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
170
Yavsc/Views/Users/Edit.cshtml
Normal file
170
Yavsc/Views/Users/Edit.cshtml
Normal file
@ -0,0 +1,170 @@
|
||||
@model Yavsc.Models.ApplicationUser
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>ApplicationUser</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="AccessFailedCount" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="AccessFailedCount" class="form-control" />
|
||||
<span asp-validation-for="AccessFailedCount" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Avatar" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Avatar" class="form-control" />
|
||||
<span asp-validation-for="Avatar" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ConcurrencyStamp" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ConcurrencyStamp" class="form-control" />
|
||||
<span asp-validation-for="ConcurrencyStamp" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="DedicatedGoogleCalendar" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="DedicatedGoogleCalendar" class="form-control" />
|
||||
<span asp-validation-for="DedicatedGoogleCalendar" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="DiskQuota" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="DiskQuota" class="form-control" />
|
||||
<span asp-validation-for="DiskQuota" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="DiskUsage" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="DiskUsage" class="form-control" />
|
||||
<span asp-validation-for="DiskUsage" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="EmailConfirmed" />
|
||||
<label asp-for="EmailConfirmed"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="FullName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="FullName" class="form-control" />
|
||||
<span asp-validation-for="FullName" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="LockoutEnabled" />
|
||||
<label asp-for="LockoutEnabled"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="LockoutEnd" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="LockoutEnd" class="form-control" />
|
||||
<span asp-validation-for="LockoutEnd" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="NormalizedEmail" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="NormalizedEmail" class="form-control" />
|
||||
<span asp-validation-for="NormalizedEmail" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="NormalizedUserName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="NormalizedUserName" class="form-control" />
|
||||
<span asp-validation-for="NormalizedUserName" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="PasswordHash" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="PasswordHash" class="form-control" />
|
||||
<span asp-validation-for="PasswordHash" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="PhoneNumber" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="PhoneNumber" class="form-control" />
|
||||
<span asp-validation-for="PhoneNumber" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="PhoneNumberConfirmed" />
|
||||
<label asp-for="PhoneNumberConfirmed"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="PostalAddressId" class="control-label col-md-2">PostalAddressId</label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="PostalAddressId" class="form-control" />
|
||||
<span asp-validation-for="PostalAddressId" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="SecurityStamp" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="SecurityStamp" class="form-control" />
|
||||
<span asp-validation-for="SecurityStamp" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="TwoFactorEnabled" />
|
||||
<label asp-for="TwoFactorEnabled"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="UserName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="UserName" class="form-control" />
|
||||
<span asp-validation-for="UserName" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
140
Yavsc/Views/Users/Index.cshtml
Normal file
140
Yavsc/Views/Users/Index.cshtml
Normal file
@ -0,0 +1,140 @@
|
||||
@model IEnumerable<Yavsc.Models.ApplicationUser>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.AccessFailedCount)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Avatar)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ConcurrencyStamp)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DedicatedGoogleCalendar)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DiskQuota)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DiskUsage)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Email)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.EmailConfirmed)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FullName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LockoutEnabled)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LockoutEnd)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.NormalizedEmail)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.NormalizedUserName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.PasswordHash)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.PhoneNumber)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.PhoneNumberConfirmed)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SecurityStamp)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TwoFactorEnabled)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.UserName)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.AccessFailedCount)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Avatar)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ConcurrencyStamp)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DedicatedGoogleCalendar)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DiskQuota)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DiskUsage)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Email)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.EmailConfirmed)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.FullName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.LockoutEnabled)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.LockoutEnd)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.NormalizedEmail)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.NormalizedUserName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.PasswordHash)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.PhoneNumber)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.PhoneNumberConfirmed)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SecurityStamp)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.TwoFactorEnabled)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.UserName)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
Reference in New Issue
Block a user