@using MileageTraker.Web.Utility @model MileageTraker.Web.ViewModels.FuelLog.FuelLogResultsViewModel @{ ViewBag.Title = "Fuel Logs"; var grid = new WebGrid(Model.FuelLogs, rowsPerPage: 45); var parameters = new {FiscalYear = Model.FiscalYear, Model.Month, Model.Unmatched}; } @section Styles { } @section Scripts { } @Html.Partial("_StatusMessage")
@using (Html.BeginForm("Index", "FuelLog", FormMethod.Get, new { id = "filter", @class = "form" })) { @Html.EditorForModel() }

@ViewBag.Title

@Html.ActionLink("Import", "ImportUpload", null, new { @class = "btn" }) @Html.ActionLink("Export", "Export", parameters, new { @class = "btn" })
@grid.GetHtml(columns: grid.Columns( grid.Column("Date", format: item => item.Date.ToString("d")), grid.Column("DriverFullName", "Driver Name"), grid.Column("TagNumber", "Tag Number"), grid.Column("Odometer"), grid.Column("MPG"), grid.Column("GasPurchased", "Gas Purchased", @@String.Format("{0:0.000}", item.GasPurchased)), grid.Column("TotalPrice", "Total Price", @@String.Format("{0:C}", item.TotalPrice)), grid.Column("Log", "Matched Log", @ @(item.LogId != null ? Html.ActionLink("View Match", "Match", new {id = item.FuelLogId}, new {@class = "btn btn-mini", target="_blank"}) : Html.ActionLink("Match", "Match", new {id = item.FuelLogId}, new {@class = "btn btn-warning btn-mini", target="_blank"})) )), htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed"}, numericLinksCount: 20 )
@if (!Model.FuelLogs.Any()) {
No results.
}