Add vehicle active/inactive state

This commit is contained in:
2015-06-18 10:59:07 -04:00
parent c7d7fa265e
commit 5d70617194
12 changed files with 155 additions and 19 deletions
+5 -4
View File
@@ -1,7 +1,7 @@
@model IEnumerable<MileageTraker.Web.Models.Vehicle>
@model MileageTraker.Web.ViewModels.Vehicle.VehicleResultsViewModel
@{
ViewBag.Title = "Vehicles";
ViewBag.Title = "Vehicles " + (!Model.Inactive ? "(Active)" : "(Inactive)");
}
@section Styles {
@@ -14,7 +14,8 @@
<div class="btn-toolbar">
@Html.ActionLink("Add Another Vehicle", "Create", null, new{@class="btn"})
@Html.ActionLink("Export", "Export", null, new { @class = "btn" })
@Html.ActionLink("Export All", "Export", null, new { @class = "btn" })
@Html.ActionLink(Model.Inactive ? "Show Active" : "Show Inactive", "Index", new {inactive = !Model.Inactive}, new { @class = "btn" })
</div>
<table class="table table-striped table-bordered table-hover table-condensed">
<tr>
@@ -51,7 +52,7 @@
<th></th>
</tr>
@foreach (var item in Model) {
@foreach (var item in Model.Vehicles) {
<tr>
<td>
@Html.DisplayTextFor(m => item.Key)