Vehicle Recall integrated into Vehicle Service
This commit is contained in:
@@ -18,11 +18,11 @@
|
||||
</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">Completed? @Html.ActionLink("Add Service", "Create", "VehicleService", new { VehicleId = Model.VehicleId, VehicleRecallId = Model.VehicleRecallId}, 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("Delete", "Delete", new { id = Model.VehicleRecallId }, new { @class = "btn" })
|
||||
@Html.ActionLink("Vehicle Details", "Details", "Vehicle", new { id = Model.VehicleId }, new{@class="btn"})
|
||||
</div>
|
||||
@@ -1,8 +1,22 @@
|
||||
@model IEnumerable<MileageTraker.Web.ViewModels.VehicleRecall.VehicleRecallViewModel>
|
||||
@model MileageTraker.Web.ViewModels.VehicleRecall.VehicleRecallResultsViewModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Vehicle Recalls";
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45);
|
||||
ViewBag.Title = string.Format("Vehicle Recalls ({0})", Model.Completed ? "Completed" : "Open");
|
||||
var grid = new WebGrid(Model.Recalls, rowsPerPage: 45);
|
||||
var 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>)
|
||||
).ToList();
|
||||
if (Model.Completed)
|
||||
{
|
||||
columns.Insert(3, grid.Column("CompletedService_InvoiceDate", "Completed Date", item => ((DateTime)item.CompletedService_InvoiceDate).ToShortDateString()));
|
||||
}
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
@@ -11,20 +25,10 @@
|
||||
|
||||
<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>
|
||||
@Html.ActionLink(Model.Completed ? "Show Open" : "Show Completed", "Index", new { completed = !Model.Completed }, new { @class = "btn" })
|
||||
</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>)
|
||||
),
|
||||
@grid.GetHtml(columns: columns,
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed"},
|
||||
numericLinksCount: 20
|
||||
)
|
||||
Reference in New Issue
Block a user