77 lines
2.1 KiB
Plaintext
77 lines
2.1 KiB
Plaintext
@model MileageTraker.Web.ViewModels.Vehicle.VehicleMileageViewModel
|
|
@{
|
|
ViewBag.Title = "Vehicle Mileage Report";
|
|
}
|
|
|
|
@{ Html.RenderPartial("BackToLogs"); }
|
|
|
|
@Html.Partial("_StatusMessage")
|
|
|
|
<h2>@ViewBag.Title</h2>
|
|
|
|
<div>
|
|
<dl class="inline">
|
|
<dt>@Html.DisplayNameFor(m => m.Query.Year)</dt>
|
|
<dd>@Html.Encode(Model.Query.Year)</dd>
|
|
</dl>
|
|
<dl class="inline">
|
|
<dt>@Html.DisplayNameFor(m => m.Query.Month)</dt>
|
|
<dd>@Html.Encode(Model.Query.Month)</dd>
|
|
</dl>
|
|
@if (Model.Query.LogType.HasValue)
|
|
{
|
|
<dl class="inline">
|
|
<dt>Type</dt>
|
|
<dd>@Html.Encode(Model.Query.LogType)</dd>
|
|
</dl>
|
|
}
|
|
</div>
|
|
|
|
<table class="table">
|
|
<tr>
|
|
<th>
|
|
Vehicle Id
|
|
</th>
|
|
<th>
|
|
Prog
|
|
</th>
|
|
<th>
|
|
Total Miles
|
|
</th>
|
|
<th>
|
|
Total Gas Purchased
|
|
</th>
|
|
<th>
|
|
Miles Per Gallon
|
|
</th>
|
|
</tr>
|
|
@foreach (var item in Model.Items)
|
|
{
|
|
<tr>
|
|
<td>
|
|
@Html.ActionLink(item.VehicleId, "Details", "Vehicle", new { id = item.VehicleId }, null)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayTextFor(i => item.Prog)
|
|
</td>
|
|
<td @if (item.LogPairs.Any(lp => lp.Item1 == null)){
|
|
@:class="ui-state-error"
|
|
}>
|
|
<span class="report-miles">@Html.DisplayTextFor(i => item.Miles) </span>
|
|
@Html.Partial("LogsSummary", item.LogPairs)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayTextFor(i => item.GasPurchased)
|
|
</td>
|
|
<td>@(item.MilesPerGallon > 0 ? string.Format("{0:0.000}", item.MilesPerGallon) : "")</td>
|
|
</tr>
|
|
}
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="2" style="text-align: right"><strong>Total:</strong></td>
|
|
<td><strong>@Html.DisplayTextFor(m => m.TotalMiles)</strong></td>
|
|
<td><strong>@Html.DisplayTextFor(m => m.TotalGasPurchased)</strong></td>
|
|
<td></td>
|
|
</tr>
|
|
</tfoot>
|
|
</table> |