Style center content for forms
This commit is contained in:
@@ -6,18 +6,17 @@
|
||||
|
||||
@{ Html.RenderPartial("BackToUsers"); }
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
|
||||
@using (Html.BeginForm("Create", "User", FormMethod.Post, new { @class = "form-horizontal" })) {
|
||||
@using (Html.BeginForm("Create", "User", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||
{
|
||||
@Html.Partial("_ValidationSummary")
|
||||
<fieldset>
|
||||
<legend></legend>
|
||||
@Html.EditorForModel()
|
||||
@Html.Partial("_Roles", Model)
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="Create" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@model MileageTraker.Web.Models.User
|
||||
@using MileageTraker.Web.Utility
|
||||
@model MileageTraker.Web.Models.User
|
||||
|
||||
@{
|
||||
ViewBag.Title = "User Details";
|
||||
@@ -6,25 +7,54 @@
|
||||
|
||||
@{ Html.RenderPartial("BackToUsers"); }
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
|
||||
@Html.DisplayFor(m => m.Email)
|
||||
@Html.DisplayFor(m => m.Username)
|
||||
<div class="center-content well">
|
||||
|
||||
<dl class="dl-horizontal roles">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(m => m.Roles)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.Encode(string.Join(", ", Roles.Provider.GetRolesForUser(Model.Username)))
|
||||
</dd>
|
||||
</dl>
|
||||
@Html.DisplayFor(m => m.Email)
|
||||
@Html.DisplayFor(m => m.Username)
|
||||
|
||||
@Html.DisplayFor(m => m.IsLockedOut)
|
||||
@if (Model.IsLockedOut) {
|
||||
@Html.DisplayFor(m => m.LastLockoutDate)
|
||||
}
|
||||
<dl class="dl-horizontal roles">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(m => m.Roles)
|
||||
</dt>
|
||||
<dd>
|
||||
@{ var roles = Roles.Provider.GetRolesForUser(Model.Username); }
|
||||
@if (roles.Length > 0)
|
||||
{
|
||||
@Html.Encode(string.Join(", ", roles))
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class='label label-warning'>No Role</span>
|
||||
}
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="btn-toolbar">
|
||||
@Html.DisplayFor(m => m.IsLockedOut)
|
||||
@if (Model.IsLockedOut) {
|
||||
@Html.DisplayFor(m => m.LastLockoutDate)
|
||||
}
|
||||
|
||||
<dl class="dl-horizontal lastActivity">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(m => m.LastActivityDate)
|
||||
</dt>
|
||||
<dd>
|
||||
@if (!Model.LastActivityDate.IsSqlMinValue())
|
||||
{
|
||||
@Html.Encode(Model.LastActivityDate)
|
||||
<span class="muted">(@Html.Encode((DateTime.Now - Model.LastActivityDate).ToVerboseStringHistoric()))</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class='label label-info'>No Activity</span>
|
||||
}
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn-toolbar center-content">
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.UserId }, new { @class = "btn" })
|
||||
</div>
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
@{ Html.RenderPartial("BackToUsers"); }
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
|
||||
@using (Html.BeginForm("Edit", "User", FormMethod.Post, new { @class = "form-horizontal" }))
|
||||
@using (Html.BeginForm("Edit", "User", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||
{
|
||||
@Html.Partial("_ValidationSummary")
|
||||
|
||||
@@ -17,10 +17,8 @@
|
||||
|
||||
@Html.EditorForModel()
|
||||
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
+15
-11
@@ -27,20 +27,24 @@
|
||||
}
|
||||
@if (item.IsLockedOut) {
|
||||
<span class='label label-warning' title="@string.Format("Locked out on {0:d}", item.LastLockoutDate)">Locked Out</span>
|
||||
}
|
||||
@if (!item.IsApproved)
|
||||
{
|
||||
<span class='label label-inverse'>Account Disabled</span>
|
||||
}</text> ),
|
||||
grid.Column("FullName", "Full Name"),
|
||||
grid.Column("Roles", format:
|
||||
@<text>
|
||||
@{ var roles = Roles.Provider.GetRolesForUser(item.Username); }
|
||||
@if (roles.Length > 0)
|
||||
{
|
||||
@Html.Encode(string.Join(", ", roles))
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class='label label-warning'>No Role</span>
|
||||
}
|
||||
</text>),
|
||||
@<text>
|
||||
@{ var roles = Roles.Provider.GetRolesForUser(item.Username); }
|
||||
@if (roles.Length > 0)
|
||||
{
|
||||
@Html.Encode(string.Join(", ", roles))
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class='label label-warning'>No Role</span>
|
||||
}
|
||||
</text>),
|
||||
grid.Column(format:
|
||||
@<div class='btn-group'>
|
||||
@Html.ActionLink("Edit", "Edit", new { id = item.UserId }, new { @class = "btn btn-mini" })
|
||||
|
||||
Reference in New Issue
Block a user