37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
@model IList<MileageTraker.Web.ViewModels.ServiceReminder.ServiceReminderViewModel>
|
|
|
|
@{
|
|
const int showCount = 10;
|
|
}
|
|
<table class="table table-striped table-bordered table-hover table-condensed">
|
|
<tr>
|
|
<th>Vehicle ID</th>
|
|
<th>Driver</th>
|
|
<th>ODO</th>
|
|
<th>Next Service</th>
|
|
<th>Description</th>
|
|
<th></th>
|
|
</tr>
|
|
@foreach (var sr in Model.Take(showCount))
|
|
{
|
|
<tr>
|
|
<td>@Html.ActionLink(sr.VehicleId, "DetailsPartial", "Vehicle", new {id = sr.VehicleId}, new {@class = "qtip-modal"})</td>
|
|
<td>@Html.DisplayTextFor(m => sr.AssignedDriver)</td>
|
|
<td>@Html.DisplayTextFor(m => sr.CurrentOdometer)</td>
|
|
<td>@Html.DisplayTextFor(m => sr.TargetOdometer)
|
|
@if (sr.IsServiceOverdue)
|
|
{
|
|
<span class="badge badge-warning" title="overdue @(-sr.ServiceDueInMiles) miles">!</span>
|
|
}
|
|
</td>
|
|
<td>@Html.DisplayTextFor(m => sr.Description)</td>
|
|
<td>@Html.ActionLink("Add Service", "Create", "VehicleService", new {vehicleId = sr.VehicleId}, new {@class = "btn btn-mini"})</td>
|
|
</tr>
|
|
}
|
|
@if (Model.Count > showCount)
|
|
{
|
|
<tr>
|
|
<td colspan="6">... and @(Model.Count - showCount) additional</td>
|
|
</tr>
|
|
}
|
|
</table> |