Initial
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
@model DateTime
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(string.Format(ViewData.ModelMetadata.DisplayFormatString, Model))
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model)
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model)
|
||||
@@ -0,0 +1,7 @@
|
||||
@using MileageTraker.Web.Models
|
||||
@using MileageTraker.Web.Utility
|
||||
@model MileageLogTypeWrapper
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model.Enum.GetDisplayName())
|
||||
@@ -0,0 +1,8 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
@foreach (var prop in ViewData.ModelMetadata.Properties.Where(pm => pm.ShowForDisplay && !pm.HideSurroundingHtml && !pm.ModelType.IsCollection()))
|
||||
{
|
||||
@Html.Display(prop.PropertyName)
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model)
|
||||
@@ -0,0 +1,20 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@{
|
||||
Layout = null;
|
||||
var lowerPropertyName = @CustomExtensions.LowercaseFirst(ViewData.ModelMetadata.PropertyName);
|
||||
var units = (string)ViewData.ModelMetadata.AdditionalValues["Units"];
|
||||
var color = ViewData.ModelMetadata.PropertyName == "Color" ? Model : "";
|
||||
}
|
||||
|
||||
<div class="display-field-container @lowerPropertyName">
|
||||
<div class="display-label">
|
||||
@Html.LabelForModel()
|
||||
</div>
|
||||
<div class="display-field @color">
|
||||
@RenderBody()
|
||||
@if (!string.IsNullOrEmpty(units))
|
||||
{
|
||||
<span class="units">@units</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user