86
|
1 @if (ViewData.TemplateInfo.TemplateDepth > 1) {
|
|
2 if (Model == null) {
|
|
3 @ViewData.ModelMetadata.NullDisplayText
|
|
4 } else {
|
|
5 @ViewData.ModelMetadata.SimpleDisplayText
|
|
6 }
|
|
7 } else {
|
|
8 foreach (var prop in ViewData.ModelMetadata.Properties.Where(metadata => metadata.ShowForEdit && !metadata.IsComplexType && !ViewData.TemplateInfo.Visited(metadata)))
|
|
9 {
|
|
10 if (prop.HideSurroundingHtml) {
|
|
11 @Html.Editor(prop.PropertyName)
|
|
12 } else {
|
|
13 if (!String.IsNullOrEmpty(Html.Label(prop.PropertyName).ToHtmlString())) {
|
|
14 if (prop.IsRequired) {
|
|
15 <div class="editor-label"><b>@Html.Label(prop.PropertyName)</b></div>
|
|
16 } else {
|
|
17 <div class="editor-label">@Html.Label(prop.PropertyName)</div>
|
|
18 }
|
|
19 }
|
|
20 <div class="editor-field">
|
|
21 @Html.Editor(prop.PropertyName)
|
|
22 @Html.ValidationMessage(prop.PropertyName)
|
|
23 @Html.Display(prop.PropertyName, "Tooltip")
|
|
24 </div>
|
|
25 }
|
|
26 }
|
|
27 } |