Add vehicle recall
This commit is contained in:
@@ -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