Files
MileageTraker/Web/Views/CreateLog/Confirm.cshtml
T
2012-12-24 21:18:41 -05:00

109 lines
3.7 KiB
Plaintext

@model MileageTraker.Web.ViewModels.CreateLog.ConfirmCreateLogViewModel
@{
ViewBag.Title = "Confirm";
}
@section Styles
{
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
}
@* ReSharper disable Mvc.ActionNotResolved *@
@using (Html.BeginForm("Action", "CreateLog", FormMethod.Post))
{
@* ReSharper restore Mvc.ActionNotResolved *@
<fieldset>
<legend>@ViewBag.Title</legend>
<p class="alert">Please <strong>confirm</strong> - entry not complete until <strong>confirm</strong> clicked</p>
@if (Model.Miles == 0)
{
<p class="alert"><span class="label label-warning">Warning</span> No mileage being logged - <strong>is this a duplicate?</strong></p>
}
<dl class="dl-horizontal vehicle-id">
<dt>
@Html.DisplayNameFor(m => m.VehicleId)
</dt>
<dd>
@Html.DisplayTextFor(m => m.VehicleId)
<span class="label @Model.VehicleColor">@Html.DisplayTextFor(m => m.VehicleType)</span>
</dd>
</dl>
@Html.HiddenFor(m => m.VehicleId)
<dl class="dl-horizontal endodometer">
<dt>
@Html.DisplayNameFor(m => m.EndOdometer)
</dt>
<dd>
@Html.DisplayTextFor(m => m.EndOdometer)
@if (Model.PreviousOdometer.HasValue)
{
<br/>
<small class="muted">
@if (Model.Miles > 0)
{
@Html.DisplayTextFor(m => m.Miles) <span>miles</span>
}
else
{
<span class="label label-warning">
@Html.DisplayTextFor(m => m.Miles) <span>miles</span>
</span>
}
since @Html.DisplayTextFor(m => m.PreviousOdometer)
on @Html.Encode(Model.PreviousDate.Value.ToShortDateString())
</small>
}
</dd>
</dl>
@Html.HiddenFor(m => m.EndOdometer)
@Html.DisplayFor(model => model.LogType)
@Html.HiddenFor(model => model.LogType.Value)
@Html.DisplayFor(model => model.EmployeeName)
@Html.HiddenFor(model => model.EmployeeName)
@Html.DisplayFor(model => model.CityName)
@Html.HiddenFor(model => model.CityName)
<dl class="dl-horizontal gas">
<dt>
@Html.DisplayNameFor(m => m.GasPurchased)
</dt>
<dd>
@if (!string.IsNullOrEmpty(Model.GasPurchased))
{
@Html.DisplayTextFor(m => m.GasPurchased) <small class="muted">Gallons</small>
}
else
{
<text>No Gas Purchased</text>
}
</dd>
</dl>
@Html.HiddenFor(model => model.GasPurchased)
<dl class="dl-horizontal date">
<dt>
@Html.DisplayNameFor(m => m.Date)
</dt>
<dd>
@Html.Encode(Model.Date.ToShortDateString())
<small class="muted">(@Html.DisplayTextFor(m => m.DateHowLongAgo))</small>
</dd>
</dl>
@Html.HiddenFor(model => model.Date)
<dl class="dl-horizontal">
<dt>
<input type="submit" name="Edit" value="Back" class="btn" />
</dt>
<dd>
<input type="submit" name="Confirm" value="Confirm" class="btn btn-primary" />
</dd>
</dl>
</fieldset>
}