Add vehicle active/inactive state
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user