Add notes

This commit is contained in:
2013-03-05 15:09:21 -05:00
parent 47a60965fe
commit ff0b18a9fd
12 changed files with 76 additions and 4 deletions
+3
View File
@@ -71,6 +71,9 @@
@Html.DisplayFor(model => model.Purpose)
@Html.HiddenFor(model => model.Purpose.Selected)
@Html.DisplayFor(model => model.Notes)
@Html.HiddenFor(model => model.Notes)
<dl class="dl-horizontal gas">
<dt>
@Html.DisplayNameFor(m => m.GasPurchased)
+8 -1
View File
@@ -56,7 +56,14 @@
grid.Column("GasPurchased", "Gas", item => item.GasPurchased > 0 ? String.Format("{0:0.000}", item.GasPurchased) : string.Empty),
grid.Column("Date", format: item => item.Date.ToString("d")),
grid.Column("CityName", "City Name"),
grid.Column("PurposePurpose", "Purpose"),
grid.Column("PurposePurpose", "Purpose", item =>
{
if (item.Notes != null)
{
return Html.Raw("<span title='" + item.Notes + "'>" + item.PurposePurpose + "</span>");
}
return item.PurposePurpose;
}),
grid.Column("Driver Name", format: item => item.UserFullName),
grid.Column(format:
@<div class='btn-group'>
@@ -3,4 +3,4 @@
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
}
@Model.Available.FirstOrDefault(i => i.Value == Model.Selected.ToString()).Text
@(Model.Selected > 0 ? Model.Available.FirstOrDefault(i => i.Value == Model.Selected.ToString()).Text : string.Empty)