Add currency attribute

This commit is contained in:
2015-10-08 00:04:17 -04:00
parent b962ecb119
commit 13fc366dc5
4 changed files with 34 additions and 5 deletions
@@ -3,6 +3,7 @@
Layout = null;
var lowerPropertyName = @CustomExtensions.LowercaseFirst(ViewData.ModelMetadata.PropertyName);
var units = (string)ViewData.ModelMetadata.AdditionalValues["Units"];
var currency = (string)ViewData.ModelMetadata.AdditionalValues["Currency"];
var color = ViewData.ModelMetadata.PropertyName == "Color" ? Model : "";
}
@@ -12,13 +13,17 @@
</dt>
@if (string.IsNullOrEmpty(color))
{
<dd>
@RenderBody()
@if (!string.IsNullOrEmpty(units))
<dd>
@if (!string.IsNullOrEmpty(currency))
{
<small><em>@units</em></small>
<small><em>@currency</em></small>
}
</dd>
@RenderBody()
@if (!string.IsNullOrEmpty(units))
{
<small><em>@units</em></small>
}
</dd>
}
else
{