Style center content for forms
This commit is contained in:
@@ -7,7 +7,10 @@ namespace MileageTraker.Web.Attributes
|
|||||||
{
|
{
|
||||||
public override void OnActionExecuting(ActionExecutingContext filterContext)
|
public override void OnActionExecuting(ActionExecutingContext filterContext)
|
||||||
{
|
{
|
||||||
if (filterContext != null)
|
if (filterContext != null
|
||||||
|
&& filterContext.HttpContext != null
|
||||||
|
&& filterContext.HttpContext.User != null
|
||||||
|
&& filterContext.HttpContext.User.Identity.Name != null)
|
||||||
{
|
{
|
||||||
using (var ds = new DataService())
|
using (var ds = new DataService())
|
||||||
{
|
{
|
||||||
|
|||||||
+26
-17
@@ -3,18 +3,11 @@ body {
|
|||||||
padding-top: 60px;
|
padding-top: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#content > form {
|
.center-content {
|
||||||
|
display: block;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin: 0 auto 20px;
|
margin: 0 auto 20px;
|
||||||
background-color: whitesmoke;
|
|
||||||
border: 1px solid #e5e5e5;
|
|
||||||
-webkit-border-radius: 5px;
|
|
||||||
-moz-border-radius: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
|
||||||
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
|
||||||
box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand
|
.brand
|
||||||
@@ -73,9 +66,14 @@ body {
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-horizontal .form-actions {
|
||||||
|
padding-left: 160px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
background-color: #101010;
|
border-top: whitesmoke 1px solid;
|
||||||
color: #666;
|
color: Gainsboro;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
@@ -176,9 +174,6 @@ dl.inline {
|
|||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar .brand {
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-mini {
|
.input-mini {
|
||||||
width: 60px !important;
|
width: 60px !important;
|
||||||
}
|
}
|
||||||
@@ -204,6 +199,18 @@ dl.inline {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 23px;
|
||||||
|
line-height: 25px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center-content {
|
||||||
|
padding: 5px;
|
||||||
|
margin: 0 auto 10px;
|
||||||
|
}
|
||||||
|
|
||||||
#content {
|
#content {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
@@ -218,9 +225,6 @@ dl.inline {
|
|||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar .brand {
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset legend {
|
fieldset legend {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
@@ -229,6 +233,7 @@ dl.inline {
|
|||||||
float: left;
|
float: left;
|
||||||
width: 95px;
|
width: 95px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-horizontal .controls {
|
.form-horizontal .controls {
|
||||||
@@ -239,6 +244,10 @@ dl.inline {
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-horizontal .form-actions {
|
||||||
|
padding-left: 110px;
|
||||||
|
}
|
||||||
|
|
||||||
.form-horizontal .control-group.endOdometer {
|
.form-horizontal .control-group.endOdometer {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
using MileageTraker.Web.Attributes;
|
||||||
using MileageTraker.Web.DAL;
|
using MileageTraker.Web.DAL;
|
||||||
|
|
||||||
namespace MileageTraker.Web.Controllers
|
namespace MileageTraker.Web.Controllers
|
||||||
{
|
{
|
||||||
|
[UserActivity]
|
||||||
public class ControllerBase : Controller
|
public class ControllerBase : Controller
|
||||||
{
|
{
|
||||||
protected readonly DataService DataService = new DataService();
|
protected readonly DataService DataService = new DataService();
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ using MileageTraker.Web.ViewModels.User;
|
|||||||
namespace MileageTraker.Web.Controllers
|
namespace MileageTraker.Web.Controllers
|
||||||
{
|
{
|
||||||
[Authorize(Roles = "Administrator, Developer")]
|
[Authorize(Roles = "Administrator, Developer")]
|
||||||
[UserActivity]
|
|
||||||
public class UserController : ControllerBase
|
public class UserController : ControllerBase
|
||||||
{
|
{
|
||||||
public ActionResult Index()
|
public ActionResult Index()
|
||||||
|
|||||||
@@ -129,7 +129,11 @@ $(function() {
|
|||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
// Add active class to nav
|
// Add active class to nav
|
||||||
var idNavActiveRegex = { 'log-nav': /\/log/i, 'vehicle-nav': /\/vehicle/i };
|
var idNavActiveRegex = {
|
||||||
|
'log-nav': /\/log/i,
|
||||||
|
'vehicle-nav': /\/vehicle/i,
|
||||||
|
'user-nav': /\/user/i
|
||||||
|
};
|
||||||
$.each(idNavActiveRegex, function (id, regex) {
|
$.each(idNavActiveRegex, function (id, regex) {
|
||||||
if (regex.test(document.URL)) {
|
if (regex.test(document.URL)) {
|
||||||
$("#" + id).addClass('active');
|
$("#" + id).addClass('active');
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Data.SqlTypes;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -99,6 +100,11 @@ namespace MileageTraker.Web.Utility
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsSqlMinValue(this DateTime dt)
|
||||||
|
{
|
||||||
|
return dt == SqlDateTime.MinValue.Value;
|
||||||
|
}
|
||||||
|
|
||||||
public static string ToVerboseStringHistoric(this TimeSpan ts)
|
public static string ToVerboseStringHistoric(this TimeSpan ts)
|
||||||
{
|
{
|
||||||
if (ts.TotalDays == 0)
|
if (ts.TotalDays == 0)
|
||||||
|
|||||||
@@ -3,10 +3,14 @@
|
|||||||
ViewBag.Title = "Manage Account";
|
ViewBag.Title = "Manage Account";
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>@ViewBag.Title</h2>
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
|
|
||||||
<p class="label label-success">@ViewBag.StatusMessage</p>
|
<p class="center-content label label-success">@ViewBag.StatusMessage</p>
|
||||||
|
|
||||||
<p>You're logged in as <strong>@User.Identity.Name</strong>.</p>
|
<div class="center-content well">
|
||||||
|
|
||||||
@Html.Partial("_ChangePasswordPartial")
|
<p>You're logged in as <strong>@User.Identity.Name</strong>.</p>
|
||||||
|
|
||||||
|
@Html.Partial("_ChangePasswordPartial")
|
||||||
|
|
||||||
|
</div>
|
||||||
@@ -8,6 +8,8 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend></legend>
|
<legend></legend>
|
||||||
@Html.EditorForModel()
|
@Html.EditorForModel()
|
||||||
<input type="submit" value="Change password" class="btn btn-primary" />
|
<div class="form-actions">
|
||||||
|
<input type="submit" value="Change password" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,17 @@
|
|||||||
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
|
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
|
|
||||||
|
<p class="alert center-content">Please <strong>confirm</strong> - entry not complete until <strong>confirm</strong> clicked</p>
|
||||||
|
|
||||||
@* ReSharper disable Mvc.ActionNotResolved *@
|
@* ReSharper disable Mvc.ActionNotResolved *@
|
||||||
@using (Html.BeginForm("Action", "CreateLog", FormMethod.Post))
|
@using (Html.BeginForm("Action", "CreateLog", FormMethod.Post, new { @class = "form-horizontal well center-content" } ))
|
||||||
{
|
{
|
||||||
@* ReSharper restore Mvc.ActionNotResolved *@
|
@* ReSharper restore Mvc.ActionNotResolved *@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>@ViewBag.Title</legend>
|
<legend></legend>
|
||||||
<p class="alert">Please <strong>confirm</strong> - entry not complete until <strong>confirm</strong> clicked</p>
|
|
||||||
@if (Model.Miles == 0)
|
@if (Model.Miles == 0)
|
||||||
{
|
{
|
||||||
<p class="alert"><span class="label label-warning">Warning</span> No mileage being logged - <strong>is this a duplicate?</strong></p>
|
<p class="alert"><span class="label label-warning">Warning</span> No mileage being logged - <strong>is this a duplicate?</strong></p>
|
||||||
@@ -95,14 +99,10 @@
|
|||||||
</dl>
|
</dl>
|
||||||
@Html.HiddenFor(model => model.Date)
|
@Html.HiddenFor(model => model.Date)
|
||||||
|
|
||||||
<dl class="dl-horizontal">
|
<div class="form-actions">
|
||||||
<dt>
|
<input type="submit" name="Confirm" value="Confirm" class="btn btn-primary" />
|
||||||
<input type="submit" name="Edit" value="Back" class="btn" />
|
<input type="submit" name="Edit" value="Back" class="btn" />
|
||||||
</dt>
|
</div>
|
||||||
<dd>
|
|
||||||
<input type="submit" name="Confirm" value="Confirm" class="btn btn-primary" />
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,16 +4,16 @@
|
|||||||
ViewBag.Title = "Enter Mileage Log";
|
ViewBag.Title = "Enter Mileage Log";
|
||||||
}
|
}
|
||||||
|
|
||||||
@using (Html.BeginForm("Index", "CreateLog", FormMethod.Post, new { @class = "form-horizontal" }))
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
|
|
||||||
|
@using (Html.BeginForm("Index", "CreateLog", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||||
{
|
{
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>@ViewBag.Title</legend>
|
<legend></legend>
|
||||||
@Html.Partial("_ValidationSummary")
|
@Html.Partial("_ValidationSummary")
|
||||||
@Html.EditorForModel()
|
@Html.EditorForModel()
|
||||||
<div class="control-group">
|
<div class="form-actions">
|
||||||
<div class="controls">
|
<input type="submit" value="Submit" class="btn btn-primary" />
|
||||||
<input type="submit" value="Submit" class="btn btn-primary" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
@model MileageTraker.Web.ViewModels.CreateLog.CreateLogViewModel
|
@model MileageTraker.Web.ViewModels.CreateLog.CreateLogViewModel
|
||||||
@{
|
@{
|
||||||
|
|
||||||
ViewBag.Title = "Success";
|
ViewBag.Title = "Success";
|
||||||
}
|
}
|
||||||
|
|
||||||
@{
|
<p class="alert alert-success center-content">
|
||||||
<h4>@ViewBag.Title</h4>
|
You've successfully created an entry
|
||||||
<p>
|
for <strong>@Html.DisplayTextFor(m => m.EmployeeName)</strong>
|
||||||
You've successfully created an entry
|
traveling to <strong>@Html.DisplayTextFor(m => m.CityName)</strong>
|
||||||
for <strong>@Html.DisplayTextFor(m => m.EmployeeName)</strong>
|
on <strong>@Html.Encode(Model.Date.ToShortDateString())</strong>
|
||||||
traveling to <strong>@Html.DisplayTextFor(m => m.CityName)</strong>
|
in Vehicle Id <strong>@Html.DisplayTextFor(m => m.VehicleId)</strong>
|
||||||
on <strong>@Html.Encode(Model.Date.ToShortDateString())</strong>
|
ending in <strong>@Html.DisplayTextFor(m => m.EndOdometer)</strong>
|
||||||
in Vehicle Id <strong>@Html.DisplayTextFor(m => m.VehicleId)</strong>
|
miles on the odometer.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p class="center-content">
|
||||||
@Html.ActionLink("Create another", "Index", null, new { @class = "btn" })
|
@Html.ActionLink("Create another", "Index", null, new { @class = "btn" })
|
||||||
</p>
|
</p>
|
||||||
}
|
|
||||||
|
|||||||
@@ -6,17 +6,16 @@
|
|||||||
|
|
||||||
@{ Html.RenderPartial("BackToLogs"); }
|
@{ Html.RenderPartial("BackToLogs"); }
|
||||||
|
|
||||||
<h2>@ViewBag.Title</h2>
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
|
|
||||||
@using (Html.BeginForm("Create", "Log", FormMethod.Post, new { @class = "form-horizontal" })) {
|
@using (Html.BeginForm("Create", "Log", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||||
|
{
|
||||||
@Html.Partial("_ValidationSummary")
|
@Html.Partial("_ValidationSummary")
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend></legend>
|
<legend></legend>
|
||||||
@Html.EditorForModel()
|
@Html.EditorForModel()
|
||||||
<div class="control-group">
|
<div class="form-actions">
|
||||||
<div class="controls">
|
|
||||||
<input type="submit" value="Create" class="btn btn-primary" />
|
<input type="submit" value="Create" class="btn btn-primary" />
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,15 +6,19 @@
|
|||||||
|
|
||||||
@{ Html.RenderPartial("BackToLogs"); }
|
@{ Html.RenderPartial("BackToLogs"); }
|
||||||
|
|
||||||
<h2>@ViewBag.Title</h2>
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
|
|
||||||
<h3>Are you sure you wish to delete this log?</h3>
|
<div class="center-content label label-warning">Are you sure you wish to delete this log?</div>
|
||||||
|
|
||||||
@Html.DisplayForModel()
|
<div class="center-content well">
|
||||||
|
|
||||||
@using (Html.BeginForm()) {
|
@Html.DisplayForModel()
|
||||||
<p>
|
|
||||||
<input type="submit" value="Delete" class="btn btn-warning" />
|
@using (Html.BeginForm("Delete", "Log", FormMethod.Post, new { @class = "form-horizontal" }))
|
||||||
@Html.ActionLink("Cancel", "Details", new { id = Model.LogId }, new { @class = "btn" })
|
{
|
||||||
</p>
|
<div class="form-actions">
|
||||||
}
|
<input type="submit" value="Delete" class="btn btn-warning" />
|
||||||
|
@Html.ActionLink("Cancel", "Details", new { id = Model.LogId }, new { @class = "btn" })
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
@{ Html.RenderPartial("BackToLogs"); }
|
@{ Html.RenderPartial("BackToLogs"); }
|
||||||
|
|
||||||
<h2>@ViewBag.Title</h2>
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<ul class="pager">
|
<ul class="pager">
|
||||||
@@ -22,9 +22,11 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="center-content well">
|
||||||
@Html.DisplayForModel()
|
@Html.DisplayForModel()
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="btn-toolbar">
|
<div class="center-content btn-toolbar">
|
||||||
@Html.ActionLink("Edit", "Edit", new { id = Model.LogId }, new { @class = "btn" })
|
@Html.ActionLink("Edit", "Edit", new { id = Model.LogId }, new { @class = "btn" })
|
||||||
@Html.ActionLink("Delete", "Delete", new { id = Model.LogId }, new { @class = "btn" })
|
@Html.ActionLink("Delete", "Delete", new { id = Model.LogId }, new { @class = "btn" })
|
||||||
</div>
|
</div>
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
@{ Html.RenderPartial("BackToLogs"); }
|
@{ Html.RenderPartial("BackToLogs"); }
|
||||||
|
|
||||||
<h2>@ViewBag.Title</h2>
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
|
|
||||||
@using (Html.BeginForm("Edit", "Log", FormMethod.Post, new { @class = "form-horizontal" }))
|
@using (Html.BeginForm("Edit", "Log", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||||
{
|
{
|
||||||
@Html.Partial("_ValidationSummary")
|
@Html.Partial("_ValidationSummary")
|
||||||
<fieldset>
|
<fieldset>
|
||||||
@@ -16,10 +16,8 @@
|
|||||||
|
|
||||||
@Html.EditorForModel()
|
@Html.EditorForModel()
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="form-actions">
|
||||||
<div class="controls">
|
<input type="submit" value="Save" class="btn btn-primary" />
|
||||||
<input type="submit" value="Save" class="btn btn-primary" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
ViewBag.Title = "No Logs";
|
ViewBag.Title = "No Logs";
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>@ViewBag.Title</h2>
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
<div>
|
|
||||||
|
<div class="center-content well">
|
||||||
No logs have been added. @Html.ActionLink("Create Log", "Create", null, new { @class = "btn" }).
|
No logs have been added. @Html.ActionLink("Create Log", "Create", null, new { @class = "btn" }).
|
||||||
</div>
|
</div>
|
||||||
@@ -6,18 +6,17 @@
|
|||||||
|
|
||||||
@{ Html.RenderPartial("BackToUsers"); }
|
@{ 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")
|
@Html.Partial("_ValidationSummary")
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend></legend>
|
<legend></legend>
|
||||||
@Html.EditorForModel()
|
@Html.EditorForModel()
|
||||||
@Html.Partial("_Roles", Model)
|
@Html.Partial("_Roles", Model)
|
||||||
<div class="control-group">
|
<div class="form-actions">
|
||||||
<div class="controls">
|
|
||||||
<input type="submit" value="Create" class="btn btn-primary" />
|
<input type="submit" value="Create" class="btn btn-primary" />
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
@model MileageTraker.Web.Models.User
|
@using MileageTraker.Web.Utility
|
||||||
|
@model MileageTraker.Web.Models.User
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = "User Details";
|
ViewBag.Title = "User Details";
|
||||||
@@ -6,25 +7,54 @@
|
|||||||
|
|
||||||
@{ Html.RenderPartial("BackToUsers"); }
|
@{ Html.RenderPartial("BackToUsers"); }
|
||||||
|
|
||||||
<h2>@ViewBag.Title</h2>
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
|
|
||||||
@Html.DisplayFor(m => m.Email)
|
<div class="center-content well">
|
||||||
@Html.DisplayFor(m => m.Username)
|
|
||||||
|
|
||||||
<dl class="dl-horizontal roles">
|
@Html.DisplayFor(m => m.Email)
|
||||||
<dt>
|
@Html.DisplayFor(m => m.Username)
|
||||||
@Html.DisplayNameFor(m => m.Roles)
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
@Html.Encode(string.Join(", ", Roles.Provider.GetRolesForUser(Model.Username)))
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
@Html.DisplayFor(m => m.IsLockedOut)
|
<dl class="dl-horizontal roles">
|
||||||
@if (Model.IsLockedOut) {
|
<dt>
|
||||||
@Html.DisplayFor(m => m.LastLockoutDate)
|
@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" })
|
@Html.ActionLink("Edit", "Edit", new { id = Model.UserId }, new { @class = "btn" })
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
@{ Html.RenderPartial("BackToUsers"); }
|
@{ 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")
|
@Html.Partial("_ValidationSummary")
|
||||||
|
|
||||||
@@ -17,10 +17,8 @@
|
|||||||
|
|
||||||
@Html.EditorForModel()
|
@Html.EditorForModel()
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="form-actions">
|
||||||
<div class="controls">
|
<input type="submit" value="Save" class="btn btn-primary" />
|
||||||
<input type="submit" value="Save" class="btn btn-primary" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-11
@@ -27,20 +27,24 @@
|
|||||||
}
|
}
|
||||||
@if (item.IsLockedOut) {
|
@if (item.IsLockedOut) {
|
||||||
<span class='label label-warning' title="@string.Format("Locked out on {0:d}", item.LastLockoutDate)">Locked Out</span>
|
<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> ),
|
}</text> ),
|
||||||
grid.Column("FullName", "Full Name"),
|
grid.Column("FullName", "Full Name"),
|
||||||
grid.Column("Roles", format:
|
grid.Column("Roles", format:
|
||||||
@<text>
|
@<text>
|
||||||
@{ var roles = Roles.Provider.GetRolesForUser(item.Username); }
|
@{ var roles = Roles.Provider.GetRolesForUser(item.Username); }
|
||||||
@if (roles.Length > 0)
|
@if (roles.Length > 0)
|
||||||
{
|
{
|
||||||
@Html.Encode(string.Join(", ", roles))
|
@Html.Encode(string.Join(", ", roles))
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<span class='label label-warning'>No Role</span>
|
<span class='label label-warning'>No Role</span>
|
||||||
}
|
}
|
||||||
</text>),
|
</text>),
|
||||||
grid.Column(format:
|
grid.Column(format:
|
||||||
@<div class='btn-group'>
|
@<div class='btn-group'>
|
||||||
@Html.ActionLink("Edit", "Edit", new { id = item.UserId }, new { @class = "btn btn-mini" })
|
@Html.ActionLink("Edit", "Edit", new { id = item.UserId }, new { @class = "btn btn-mini" })
|
||||||
|
|||||||
@@ -6,19 +6,17 @@
|
|||||||
|
|
||||||
@{ Html.RenderPartial("BackToVehicles"); }
|
@{ Html.RenderPartial("BackToVehicles"); }
|
||||||
|
|
||||||
<h2>@ViewBag.Title</h2>
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
|
|
||||||
@using (Html.BeginForm("Create", "Vehicle", FormMethod.Post, new { @class = "form-horizontal" }))
|
@using (Html.BeginForm("Create", "Vehicle", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||||
{
|
{
|
||||||
@Html.Partial("_ValidationSummary")
|
@Html.Partial("_ValidationSummary")
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend></legend>
|
<legend></legend>
|
||||||
@Html.EditorForModel()
|
@Html.EditorForModel()
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="form-actions">
|
||||||
<div class="controls">
|
<input type="submit" value="Create" class="btn btn-primary" />
|
||||||
<input type="submit" value="Create" class="btn btn-primary" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,12 @@
|
|||||||
|
|
||||||
@{ Html.RenderPartial("BackToVehicles"); }
|
@{ Html.RenderPartial("BackToVehicles"); }
|
||||||
|
|
||||||
<h2>@ViewBag.Title</h2>
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
|
<div class="center-content well">
|
||||||
|
@Html.DisplayForModel()
|
||||||
|
|
||||||
@Html.DisplayForModel()
|
|
||||||
|
|
||||||
<div class="btn-toolbar">
|
|
||||||
@Html.ActionLink("Edit", "Edit", new { id = Model.VehicleId }, new { @class = "btn" })
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="center-content btn-toolbar">
|
||||||
|
@Html.ActionLink("Edit", "Edit", new { id = Model.VehicleId }, new { @class = "btn" })
|
||||||
|
</div>
|
||||||
@@ -6,18 +6,16 @@
|
|||||||
|
|
||||||
@{ Html.RenderPartial("BackToVehicles"); }
|
@{ Html.RenderPartial("BackToVehicles"); }
|
||||||
|
|
||||||
<h2>@ViewBag.Title</h2>
|
<h2 class="center-content">@ViewBag.Title</h2>
|
||||||
|
|
||||||
@using (Html.BeginForm("Edit", "Vehicle", FormMethod.Post, new { @class = "form-horizontal" }))
|
@using (Html.BeginForm("Edit", "Vehicle", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||||
{
|
{
|
||||||
@Html.Partial("_ValidationSummary")
|
@Html.Partial("_ValidationSummary")
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend></legend>
|
<legend></legend>
|
||||||
@Html.EditorForModel()
|
@Html.EditorForModel()
|
||||||
<div class="control-group">
|
<div class="form-actions">
|
||||||
<div class="controls">
|
<input type="submit" value="Save" class="btn btn-primary" />
|
||||||
<input type="submit" value="Save" class="btn btn-primary" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user