Add vehicle recall
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
@model MileageTraker.Web.ViewModels.VehicleRecall.VehicleRecallViewModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Vehicle Recall Details" ;
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 class="center-content"><i class="fa fa-refresh"></i> @ViewBag.Title</h2>
|
||||
<div class="center-content well">
|
||||
@Html.DisplayForModel()
|
||||
</div>
|
||||
|
||||
<div class="center-content btn-toolbar">
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.VehicleRecallId }, new { @class = "btn" })
|
||||
@Html.ActionLink("Delete", "Delete", new { id = Model.VehicleId }, new { @class = "btn" })
|
||||
@Html.ActionLink("Vehicle Details", "Details", "Vehicle", new { id = Model.VehicleId }, new{@class="btn"})
|
||||
@Html.ActionLink("Add Service", "Create", "VehicleService", new { VehicleId = Model.VehicleId }, new{@class="btn"})
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
@model MileageTraker.Web.ViewModels.SelectListViewModel
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
if (Model.Selected > 0)
|
||||
{
|
||||
var selected = Model.Available.FirstOrDefault(i => i.Value == Model.Selected.ToString());
|
||||
if (selected != null)
|
||||
{
|
||||
@Html.ActionLink(selected.Text, "Details", "VehicleRecall", new { id = selected.Value }, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@if (Model != null)
|
||||
{
|
||||
@Html.ActionLink("View Vehicle Service", "Details", "VehicleService", new { id = Model}, null)
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
@model MileageTraker.Web.ViewModels.SelectListViewModel
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
var values = ViewData.ModelMetadata.AdditionalValues;
|
||||
var optionLabel = values.ContainsKey("OptionLabel") ? (string)values["OptionLabel"] : string.Empty;
|
||||
}
|
||||
@Html.DropDownListFor(m => m.Selected, Model.Available, string.Empty)
|
||||
@Html.DropDownListFor(m => m.Selected, Model.Available, optionLabel)
|
||||
@@ -0,0 +1,5 @@
|
||||
@model MileageTraker.Web.ViewModels.SelectListViewModel
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.DropDownList("", new List<SelectListItem>(new List<SelectListItem>{new SelectListItem{Text = "Not a recall", Value = "None"}}))
|
||||
@@ -41,6 +41,7 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li>@Html.ActionLink("Vehicles", "Index", "Vehicle")</li>
|
||||
<li>@Html.ActionLink("Vehicle Service", "Index", "VehicleService")</li>
|
||||
<li>@Html.ActionLink("Vehicle Recalls", "Index", "VehicleRecall")</li>
|
||||
<li>@Html.ActionLink("Fuel Logs", "Index", "FuelLog")</li>
|
||||
<li>@Html.ActionLink("Cost Report", "VehicleCostIndex", "Vehicle")</li>
|
||||
@if (User.IsInRole("Developer"))
|
||||
|
||||
Reference in New Issue
Block a user