Combine layouts
This commit is contained in:
@@ -4,11 +4,6 @@
|
||||
ViewBag.Title = "Log in";
|
||||
Layout = "~/Views/Shared/_Layout.login.cshtml";
|
||||
}
|
||||
@section Scripts
|
||||
{
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
||||
}
|
||||
@section Styles
|
||||
{
|
||||
<link href="@Url.Content("~/Content/Account.Login.css")" rel="stylesheet" type="text/css" />
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
@{
|
||||
ViewBag.Title = "Manage Account";
|
||||
}
|
||||
@section Scripts
|
||||
{
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Confirm";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@section Styles
|
||||
{
|
||||
|
||||
@@ -2,17 +2,6 @@
|
||||
@{
|
||||
|
||||
ViewBag.Title = "Enter Mileage Log";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@section Styles
|
||||
{
|
||||
<link href="@Url.Content("~/Content/jquery.qtip.min.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
@section Scripts
|
||||
{
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.qtip.min.js")" type="text/javascript"></script>
|
||||
}
|
||||
|
||||
@using (Html.BeginForm("Index", "CreateLog", FormMethod.Post, new { @class = "form-horizontal" }))
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
@{
|
||||
|
||||
ViewBag.Title = "Success";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
@{
|
||||
|
||||
@@ -3,16 +3,6 @@
|
||||
@{
|
||||
ViewBag.Title = "Create Log";
|
||||
}
|
||||
@section Styles
|
||||
{
|
||||
<link href="@Url.Content("~/Content/jquery.qtip.min.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
@section Scripts
|
||||
{
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.qtip.min.js")" type="text/javascript"></script>
|
||||
}
|
||||
|
||||
@{ Html.RenderPartial("BackToLogs"); }
|
||||
|
||||
|
||||
@@ -3,16 +3,6 @@
|
||||
@{
|
||||
ViewBag.Title = "Edit Log";
|
||||
}
|
||||
@section Styles
|
||||
{
|
||||
<link href="@Url.Content("~/Content/jquery.qtip.min.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
@section Scripts
|
||||
{
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.qtip.min.js")" type="text/javascript"></script>
|
||||
}
|
||||
|
||||
@{ Html.RenderPartial("BackToLogs"); }
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@using MileageTraker.Web.ViewModels
|
||||
@model MileageTraker.Web.ViewModels.Log.LogResultsViewModel
|
||||
|
||||
@{
|
||||
@@ -7,13 +6,8 @@
|
||||
var grid = new WebGrid(Model.Logs, rowsPerPage: 45);
|
||||
}
|
||||
@section Styles {
|
||||
<link href="@Url.Content("~/Content/jquery.qtip.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
@section Scripts
|
||||
{
|
||||
<script src="@Url.Content("~/Scripts/jquery.qtip.min.js")" type="text/javascript"></script>
|
||||
}
|
||||
|
||||
<h2 id="log-title">@ViewBag.Title</h2>
|
||||
|
||||
@@ -61,13 +55,12 @@
|
||||
grid.Column("Date", format: item => item.Date.ToString("d")),
|
||||
grid.Column("CityName", "City Name"),
|
||||
grid.Column("EmployeeName", "Employee Name"),
|
||||
grid.Column(format: item =>
|
||||
(new MvcHtmlString("<div class='btn-group'>"))
|
||||
.Concat(Html.ActionLink("Edit", "Edit", new { id = item.LogId }, new { @class = "btn btn-mini" }))
|
||||
.Concat(Html.ActionLink("Details", "Details", new { id = item.LogId }, new { @class = "btn btn-mini" }))
|
||||
.Concat(Html.ActionLink("Delete", "Delete", new { id = item.LogId }, new { @class = "btn btn-mini" }))
|
||||
.Concat("</div>")
|
||||
)
|
||||
grid.Column(format:
|
||||
@<div class='btn-group'>
|
||||
@Html.ActionLink("Edit", "Edit", new { id = item.LogId }, new { @class = "btn btn-mini" })
|
||||
@Html.ActionLink("Details", "Details", new { id = item.LogId }, new { @class = "btn btn-mini" })
|
||||
@Html.ActionLink("Delete", "Delete", new { id = item.LogId }, new { @class = "btn btn-mini" })
|
||||
</div>)
|
||||
),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed"},
|
||||
numericLinksCount: 20
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
else
|
||||
{
|
||||
<td colspan="2">
|
||||
<span class="ui-state-error">?</span>
|
||||
<span class="label label-warning">?</span>
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
@{
|
||||
ViewBag.Title = "Employee Mileage Report";
|
||||
}
|
||||
@section Styles {
|
||||
<link href="@Url.Content("~/Content/jquery.qtip.min.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
@section Scripts
|
||||
{
|
||||
<script src="@Url.Content("~/Scripts/jquery.qtip.min.js")" type="text/javascript"></script>
|
||||
}
|
||||
|
||||
@{ Html.RenderPartial("BackToLogs"); }
|
||||
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
@{
|
||||
ViewBag.Title = "Vehicle Mileage Report";
|
||||
}
|
||||
@section Styles {
|
||||
<link href="@Url.Content("~/Content/jquery.qtip.min.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
@section Scripts
|
||||
{
|
||||
<script src="@Url.Content("~/Scripts/jquery.qtip.min.js")" type="text/javascript"></script>
|
||||
}
|
||||
|
||||
@{ Html.RenderPartial("BackToLogs"); }
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model)
|
||||
@@ -1,5 +1,10 @@
|
||||
@model DateTime
|
||||
@using System.Globalization
|
||||
@model DateTime
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
var val =
|
||||
ViewData.ModelMetadata.DisplayFormatString != null
|
||||
?string.Format(ViewData.ModelMetadata.DisplayFormatString, Model)
|
||||
: Model.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
@Html.Encode(string.Format(ViewData.ModelMetadata.DisplayFormatString, Model))
|
||||
@Html.Encode(val)
|
||||
@@ -1,5 +1,10 @@
|
||||
@model DateTime
|
||||
@using System.Globalization
|
||||
@model DateTime
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
var val =
|
||||
ViewData.ModelMetadata.DisplayFormatString != null
|
||||
?string.Format(ViewData.ModelMetadata.DisplayFormatString, Model)
|
||||
: Model.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
@Html.Encode(string.Format(ViewData.ModelMetadata.DisplayFormatString, Model))
|
||||
@Html.Encode(val)
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
<a href="mailto:@Model">@Html.Encode(Model)</a>
|
||||
@@ -0,0 +1,12 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(inputSize))
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, new { @class = inputSize})
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.TextArea("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
@@ -2,7 +2,18 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
@foreach (var prop in ViewData.ModelMetadata.Properties.Where(pm => pm.ShowForEdit && !pm.ModelType.IsCollection()))
|
||||
|
||||
@foreach (var prop in ViewData.ModelMetadata.Properties)
|
||||
{
|
||||
@Html.Editor(prop.PropertyName)
|
||||
if (prop.ShowForEdit)
|
||||
{
|
||||
if (!prop.ModelType.IsCollection())
|
||||
{
|
||||
@Html.Editor(prop.PropertyName)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,6 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Error";
|
||||
if (Model.ControllerName == "CreateLog")
|
||||
{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
}
|
||||
|
||||
<h2>
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Mileage Traker - ETHRA - @ViewBag.Title</title>
|
||||
<link href="@Url.Content("~/Content/themes/custom-theme/jquery-ui-1.9.2.custom.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/Site.admin.css")" rel="stylesheet" type="text/css" />
|
||||
@RenderSection("Styles", false)
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<span class="brand" ></span>
|
||||
<ul class="nav">
|
||||
<li id="log-nav">@Html.ActionLink("Logs", "Index", "Log")</li>
|
||||
<li id="vehicle-nav">@Html.ActionLink("Vehicles", "Index", "Vehicle")</li>
|
||||
<li>@Html.ActionLink("Enter Mileage Log", "Index", "CreateLog")</li>
|
||||
</ul>
|
||||
<section id="account-management">
|
||||
@Html.Partial("_Layout.authentication")
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container-fluid">
|
||||
@RenderBody()
|
||||
</div>
|
||||
<footer>
|
||||
Mileage Traker © 2012 James Kolpack
|
||||
</footer>
|
||||
|
||||
<script src="@Url.Content("~/Scripts/jquery-1.8.3.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/bootstrap.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery-ui-1.9.2.custom.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/Shared/Site.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.numeric.js")" type="text/javascript"></script>
|
||||
@RenderSection("Scripts", false)
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,15 +0,0 @@
|
||||
@if (Request.IsAuthenticated) {
|
||||
<ul class="nav pull-right">
|
||||
<li>
|
||||
@Html.ActionLink(User.Identity.Name, "Manage", "Account", null, new { @class = "username", title = "Manage" })
|
||||
</li>
|
||||
<li>
|
||||
@using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "form-logout" })) {
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn-link logoff">
|
||||
Log Off
|
||||
</button>
|
||||
}
|
||||
</li>
|
||||
</ul>
|
||||
}
|
||||
@@ -6,28 +6,54 @@
|
||||
<link href="@Url.Content("~/Content/themes/custom-theme/jquery-ui-1.9.2.custom.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/bootstrap-responsive.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/jquery.qtip.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
|
||||
@RenderSection("Styles", false)
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<div class="navbar navbar-static-top navbar-inverse">
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<span class="brand" ></span>
|
||||
<div class="container-fluid">
|
||||
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="brand"></span>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
@if (Roles.IsUserInRole(User.Identity.Name, "Administrator")
|
||||
|| Roles.IsUserInRole(User.Identity.Name, "Developer"))
|
||||
{
|
||||
<li id="log-nav">@Html.ActionLink("Logs", "Index", "Log")</li>
|
||||
<li id="vehicle-nav">@Html.ActionLink("Vehicles", "Index", "Vehicle")</li>
|
||||
<li id="user-nav">@Html.ActionLink("Users", "Index", "User")</li>
|
||||
}
|
||||
<li>@Html.ActionLink("Enter Log", "Index", "CreateLog")</li>
|
||||
</ul>
|
||||
<section id="account-management">
|
||||
@Html.Partial("_NavAccountInfo")
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="container-fluid">
|
||||
@RenderBody()
|
||||
</div>
|
||||
<footer>
|
||||
Mileage Traker © 2012 James Kolpack
|
||||
</footer>
|
||||
|
||||
<script src="@Url.Content("~/Scripts/jquery-1.8.3.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/bootstrap.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.numeric.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery-ui-1.9.2.custom.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.numeric.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.qtip.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/Shared/Site.js")" type="text/javascript"></script>
|
||||
@RenderSection("Scripts", false)
|
||||
</body>
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
<script src="@Url.Content("~/Scripts/bootstrap.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.numeric.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery-ui-1.9.2.custom.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/Shared/Site.js")" type="text/javascript"></script>
|
||||
@RenderSection("Scripts", false)
|
||||
</body>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<ul class="nav pull-right">
|
||||
@if (Request.IsAuthenticated)
|
||||
{
|
||||
<li>
|
||||
@Html.ActionLink(User.Identity.Name, "Manage", "Account", null, new {@class = "username", title = "Manage"})
|
||||
</li>
|
||||
<li>
|
||||
@using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new {id = "form-logout"}))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn-link">
|
||||
Log Off
|
||||
</button>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li>
|
||||
@Html.ActionLink("Login", "Login", "Account", null, new {title = "Login"})
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
@@ -0,0 +1,5 @@
|
||||
<ul class="no-print breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "User")">← Back to Users</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -0,0 +1,22 @@
|
||||
@model MileageTraker.Web.ViewModels.User.CreateUserViewModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Create User";
|
||||
}
|
||||
|
||||
@{ Html.RenderPartial("BackToUsers"); }
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
@using (Html.BeginForm("Create", "User", FormMethod.Post, new { @class = "form-horizontal" })) {
|
||||
@Html.Partial("_ValidationSummary")
|
||||
<fieldset>
|
||||
<legend></legend>
|
||||
@Html.EditorForModel()
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="submit" value="Create" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
@model MileageTraker.Web.Models.User
|
||||
|
||||
@{
|
||||
ViewBag.Title = "User Details";
|
||||
}
|
||||
|
||||
@{ Html.RenderPartial("BackToUsers"); }
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
@Html.DisplayFor(m => m.Username)
|
||||
@Html.DisplayFor(m => m.FirstName)
|
||||
@Html.DisplayFor(m => m.LastName)
|
||||
|
||||
<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.IsLockedOut)
|
||||
@if (Model.IsLockedOut) {
|
||||
@Html.DisplayFor(m => m.LastLockoutDate)
|
||||
}
|
||||
|
||||
<div class="btn-toolbar">
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.UserId }, new { @class = "btn" })
|
||||
</div>
|
||||
@@ -0,0 +1,26 @@
|
||||
@model MileageTraker.Web.Models.User
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Edit User";
|
||||
}
|
||||
|
||||
@{ Html.RenderPartial("BackToUsers"); }
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
@using (Html.BeginForm("Edit", "User", FormMethod.Post, new { @class = "form-horizontal" }))
|
||||
{
|
||||
@Html.Partial("_ValidationSummary")
|
||||
|
||||
<fieldset>
|
||||
<legend></legend>
|
||||
|
||||
@Html.EditorForModel()
|
||||
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@model IEnumerable<MileageTraker.Web.Models.User>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Users";
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45);
|
||||
}
|
||||
|
||||
<h2 id="user-title">@ViewBag.Title</h2>
|
||||
|
||||
<div class="btn-toolbar pull-left">
|
||||
@Html.ActionLink("Add new User", "Create", null, new{@class="btn"})
|
||||
|
||||
</div>
|
||||
|
||||
<div id="users-online">Users online now: <span class="badge badge-info">@Membership.GetNumberOfUsersOnline()</span></div>
|
||||
|
||||
@grid.GetHtml(columns:
|
||||
grid.Columns(
|
||||
grid.Column("Username", format:
|
||||
@<text>@Html.Encode(item.Username)
|
||||
@if (item.LastActivityDate > CustomExtensions.UserOnlineThreshold()) {
|
||||
<span class='label label-info'>Online</span>
|
||||
}
|
||||
@if (item.IsLockedOut) {
|
||||
<span class='label label-warning' title="@string.Format("Locked out on {0:d}", item.LastLockoutDate)">Locked Out</span>
|
||||
}</text> ),
|
||||
grid.Column("FirstName", "First Name"),
|
||||
grid.Column("LastName", "Last Name"),
|
||||
grid.Column("Roles", format: item =>
|
||||
string.Join(", ", Roles.Provider.GetRolesForUser(item.Username) )),
|
||||
grid.Column(format:
|
||||
@<div class='btn-group'>
|
||||
@Html.ActionLink("Edit", "Edit", new { id = item.UserId }, new { @class = "btn btn-mini" })
|
||||
@Html.ActionLink("Details", "Details", new { id = item.UserId }, new { @class = "btn btn-mini" })
|
||||
</div>)
|
||||
),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed"},
|
||||
numericLinksCount: 20
|
||||
)
|
||||
@@ -3,16 +3,6 @@
|
||||
@{
|
||||
ViewBag.Title = "Create Vehicle";
|
||||
}
|
||||
@section Styles
|
||||
{
|
||||
<link href="@Url.Content("~/Content/jquery.qtip.min.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
@section Scripts
|
||||
{
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.qtip.min.js")" type="text/javascript"></script>
|
||||
}
|
||||
|
||||
@{ Html.RenderPartial("BackToVehicles"); }
|
||||
|
||||
@@ -22,7 +12,7 @@
|
||||
{
|
||||
@Html.Partial("_ValidationSummary")
|
||||
<fieldset>
|
||||
<label></label>
|
||||
<legend></legend>
|
||||
@Html.EditorForModel()
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
@@ -3,16 +3,6 @@
|
||||
@{
|
||||
ViewBag.Title = "Edit Vehicle";
|
||||
}
|
||||
@section Styles
|
||||
{
|
||||
<link href="@Url.Content("~/Content/jquery.qtip.min.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
@section Scripts
|
||||
{
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.qtip.min.js")" type="text/javascript"></script>
|
||||
}
|
||||
|
||||
@{ Html.RenderPartial("BackToVehicles"); }
|
||||
|
||||
@@ -22,7 +12,7 @@
|
||||
{
|
||||
@Html.Partial("_ValidationSummary")
|
||||
<fieldset>
|
||||
<label></label>
|
||||
<legend></legend>
|
||||
@Html.EditorForModel()
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@model IEnumerable<MileageTraker.Web.Models.Vehicle>
|
||||
@model IEnumerable<MileageTraker.Web.Models.Vehicle>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Vehicles";
|
||||
@@ -12,7 +11,7 @@
|
||||
<h2 id="vehicle-title">@ViewBag.Title</h2>
|
||||
|
||||
<div class="btn-toolbar">
|
||||
@Html.ActionLink("Add another vehicle", "Create", null, new{@class="btn"})
|
||||
@Html.ActionLink("Add Another Vehicle", "Create", null, new{@class="btn"})
|
||||
@Html.ActionLink("Export", "Export", null, new { @class = "btn" })
|
||||
</div>
|
||||
<table class="table table-striped table-bordered table-hover table-condensed">
|
||||
@@ -87,11 +86,10 @@
|
||||
@Html.DisplayTextFor(m => item.CurrentOdometer)
|
||||
</td>
|
||||
<td>
|
||||
@(new MvcHtmlString("<div class='btn-group'>")
|
||||
.Concat(Html.ActionLink("Edit", "Edit", new { id = item.VehicleId }, new { @class = "btn btn-mini" }))
|
||||
.Concat(Html.ActionLink("Details", "Details", new { id = item.VehicleId }, new { @class = "btn btn-mini" }))
|
||||
//.Concat(Html.ActionLink("New log", "Create", new { id = item.VehicleId }, new { @class = "btn btn-mini" }))
|
||||
.Concat("</div>"))
|
||||
<div class='btn-group'>
|
||||
@Html.ActionLink("Edit", "Edit", new { id = item.VehicleId }, new { @class = "btn btn-mini" })
|
||||
@Html.ActionLink("Details", "Details", new { id = item.VehicleId }, new { @class = "btn btn-mini" })
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.admin.cshtml";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
Reference in New Issue
Block a user