Add vehicle recall
This commit is contained in:
@@ -17,7 +17,10 @@
|
||||
</div>
|
||||
|
||||
<div class="btn-toolbar center-content well">
|
||||
@Html.ActionLink("Add Reminder", "Create", new { vehicleId = Model.VehicleId }, new{@class="btn"})
|
||||
@Html.ActionLink("Add Service", "Create", "VehicleService", new { vehicleId = Model.VehicleId }, new { @class = "btn" })
|
||||
@Html.ActionLink("Vehicle Details", "Details", "Vehicle", new { id = Model.VehicleId }, new{@class="btn"})
|
||||
<div class="btn-group">
|
||||
@Html.ActionLink("Add Reminder", "Create", new { vehicleId = Model.VehicleId }, new { @class = "btn" })
|
||||
@Html.ActionLink("Add Service", "Create", "VehicleService", new { vehicleId = Model.VehicleId }, new { @class = "btn" })
|
||||
@Html.ActionLink("Add Recall", "Create", "VehicleRecall", new { vehicleId = Model.VehicleId }, new { @class = "btn" })
|
||||
</div>
|
||||
@Html.ActionLink("Vehicle Details", "Details", "Vehicle", new { id = Model.VehicleId }, new { @class = "btn" })
|
||||
</div>
|
||||
@@ -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"))
|
||||
|
||||
@@ -36,9 +36,12 @@
|
||||
<li>
|
||||
@Html.ActionLink("View Reminders", "Index", "ServiceReminder", new { VehicleId = Model.VehicleId }, null)
|
||||
</li>
|
||||
<li>
|
||||
@Html.ActionLink("Add Service", "Create", "VehicleService", new { VehicleId = Model.VehicleId }, null)
|
||||
</li>
|
||||
<li>
|
||||
@Html.ActionLink("Add Service", "Create", "VehicleService", new { VehicleId = Model.VehicleId }, null)
|
||||
</li>
|
||||
<li>
|
||||
@Html.ActionLink("Add Recall", "Create", "VehicleRecall", new { VehicleId = Model.VehicleId }, null)
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@Html.ActionLink("Logs", "Index", "Log", new { Model.VehicleId}, new { @class = "btn" })
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
@model MileageTraker.Web.ViewModels.Vehicle.VehiclePartialDetailsQuick
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
@Html.DisplayForModel()
|
||||
@@ -0,0 +1,28 @@
|
||||
@model MileageTraker.Web.ViewModels.VehicleRecall.VehicleRecallViewModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Enter Vehicle Recall";
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
<script type="text/javascript">
|
||||
VehicleInput_ShowDetails();
|
||||
</script>
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 class="center-content"><i class="fa fa-refresh"></i> @ViewBag.Title</h2>
|
||||
<h4 class="center-content">Enter an available recall for vehicle</h4>
|
||||
|
||||
@using (Html.BeginForm("Create", "VehicleRecall", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||
{
|
||||
@Html.Partial("_ValidationSummary")
|
||||
<fieldset>
|
||||
<legend></legend>
|
||||
@Html.EditorForModel()
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="Create" class="btn btn-primary" />
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
@model MileageTraker.Web.ViewModels.VehicleRecall.VehicleRecallViewModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Delete Vehicle Recall";
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 class="center-content"><i class="fa fa-refresh"></i> @ViewBag.Title</h2>
|
||||
|
||||
<div class="center-content label label-warning">Are you sure you wish to delete this recall?</div>
|
||||
|
||||
<div class="center-content well">
|
||||
|
||||
@Html.DisplayForModel()
|
||||
|
||||
@using (Html.BeginForm("Delete", "VehicleRecall", FormMethod.Post, new { @class = "form-horizontal" }))
|
||||
{
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="Delete" class="btn btn-warning" />
|
||||
@Html.ActionLink("Cancel", "Details", new { id = Model.VehicleRecallId }, new { @class = "btn" })
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,28 @@
|
||||
@using System.Activities.Expressions
|
||||
@model MileageTraker.Web.ViewModels.VehicleRecall.VehicleRecallViewModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Vehicle Recall Details" ;
|
||||
var completed = Model.CompletedService_VehicleServiceId > 0;
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 class="center-content"><i class="fa fa-refresh"></i> @ViewBag.Title</h2>
|
||||
<div class="center-content well">
|
||||
@Html.DisplayForModel()
|
||||
@if (completed)
|
||||
{
|
||||
@Html.DisplayFor(v => v.CompletedService_VehicleServiceId)
|
||||
}
|
||||
</div>
|
||||
@if (!completed)
|
||||
{
|
||||
<div class="center-content">Completed? @Html.ActionLink("Add Service", "Create", "VehicleService", new { VehicleId = Model.VehicleId }, new { @class = "btn" })</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"})
|
||||
</div>
|
||||
@@ -0,0 +1,27 @@
|
||||
@model MileageTraker.Web.ViewModels.VehicleRecall.VehicleRecallViewModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Edit Vehicle Recall";
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
<script type="text/javascript">
|
||||
VehicleInput_ShowDetails();
|
||||
</script>
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 class="center-content"><i class="fa fa-refresh"></i> @ViewBag.Title</h2>
|
||||
|
||||
@using (Html.BeginForm("Edit", "VehicleRecall", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||
{
|
||||
@Html.Partial("_ValidationSummary")
|
||||
<fieldset>
|
||||
<legend></legend>
|
||||
@Html.EditorForModel()
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
@{
|
||||
ViewBag.Title = "No Open Vehicle Recalls";
|
||||
}
|
||||
|
||||
<h2 class="center-content"><i class="fa fa-refresh"></i> @ViewBag.Title</h2>
|
||||
|
||||
<div class="center-content well">
|
||||
No open Vehicle Recalls. @Html.ActionLink("Add Recall", "Create", null, new { @class = "btn" })
|
||||
</div>
|
||||
@@ -0,0 +1,30 @@
|
||||
@model IEnumerable<MileageTraker.Web.ViewModels.VehicleRecall.VehicleRecallViewModel>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Vehicle Recalls";
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45);
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 id="vehicle-title"><i class="fa fa-refresh"></i> @ViewBag.Title</h2>
|
||||
|
||||
<div class="btn-toolbar pull-left">
|
||||
@Html.ActionLink("Add Recall", "Create", null, new { @class = "btn" })
|
||||
<a class="qtip-show-next-div btn">Open Recalls @Model.Count()</a>
|
||||
</div>
|
||||
|
||||
@grid.GetHtml(columns:
|
||||
grid.Columns(
|
||||
grid.Column("VehicleId", "Vehicle ID", item => Html.ActionLink((string)item.VehicleId, "DetailsPartial", "Vehicle", new { id = item.VehicleId }, new { @class = "qtip-modal" })),
|
||||
grid.Column("Identifier", "Identifier", item => item.Identifier),
|
||||
grid.Column("Description", "Description"),
|
||||
grid.Column(format:
|
||||
@<div class='btn-group'>
|
||||
@Html.ActionLink("Details", "Details", new { id = item.VehicleRecallId }, new { @class = "btn btn-mini" })
|
||||
@Html.ActionLink("Delete", "Delete", new { id = item.VehicleRecallId }, new { @class = "btn btn-mini" })
|
||||
</div>)
|
||||
),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed"},
|
||||
numericLinksCount: 20
|
||||
)
|
||||
Reference in New Issue
Block a user