34 lines
1.6 KiB
Plaintext
34 lines
1.6 KiB
Plaintext
@model MileageTraker.Web.ViewModels.VehicleRecall.VehicleRecallResultsViewModel
|
|
|
|
@{
|
|
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")
|
|
|
|
<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" })
|
|
@Html.ActionLink(Model.Completed ? "Show Open" : "Show Completed", "Index", new { completed = !Model.Completed }, new { @class = "btn" })
|
|
</div>
|
|
|
|
@grid.GetHtml(columns: columns,
|
|
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed"},
|
|
numericLinksCount: 20
|
|
) |