72 lines
1.9 KiB
Plaintext
72 lines
1.9 KiB
Plaintext
@using System.Globalization
|
|
@model MileageTraker.Web.ViewModels.VehicleMileageViewModel
|
|
@{
|
|
ViewBag.Title = "Vehicle Mileage Report";
|
|
}
|
|
@section Styles {
|
|
<link href="@Url.Content("~/Content/jquery.qtip.min.css")" rel="stylesheet" type="text/css" />
|
|
}
|
|
@section Scripts
|
|
{
|
|
<script src="@Url.Content("~/Scripts/jquery.qtip.min.js")" type="text/javascript"></script>
|
|
}
|
|
|
|
@{ Html.RenderPartial("BackToLogs"); }
|
|
|
|
<h2>@ViewBag.Title</h2>
|
|
|
|
<div>
|
|
<dl class="inline">
|
|
<dt>Year</dt>
|
|
<dd>@Html.Encode(Model.Query.Year)</dd>
|
|
</dl>
|
|
<dl class="inline">
|
|
<dt>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>
|
|
</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>
|
|
</tr>
|
|
}
|
|
<tfoot><tr><td colspan="2">Total:</td><td>@Html.DisplayTextFor(m => m.TotalMiles)</td><td>@Html.DisplayTextFor(m => m.TotalGasPurchased)</td></tr></tfoot>
|
|
</table> |