@model MileageTraker.Web.Models.Vehicle

@{
    ViewBag.Title = "Vehicle Details "  + (!Model.InactiveDate.HasValue ? "(Active)" : "(Inactive)");
}

@section Styles {
    <link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
}

@Html.Partial("_StatusMessage")

@{ Html.RenderPartial("BackToVehicles"); }

<h2 class="center-content">@ViewBag.Title</h2>
<div class="center-content well">
    @Html.DisplayForModel()

</div>

<div class="center-content btn-toolbar">
    @Html.ActionLink("Edit", "Edit", new { id = Model.VehicleId }, new { @class = "btn" })
	@if (!Model.InactiveDate.HasValue)
	{
		@Html.ActionLink("Set Inactive", "SetInactive", new {id = Model.VehicleId}, new {@class = "btn"})
	}
	else
	{
		@Html.ActionLink("Reactivate", "SetActive", new {id = Model.VehicleId}, new {@class = "btn"})
	}
	@Html.ActionLink("Logs", "Index", "Log", new { Model.VehicleId}, new { @class = "btn" })
</div>