comparison Agendas/trunk/src/Agendas.Web/Views/Shared/EditorTemplates/Object.cshtml @ 86:723aed93a0e6

Template de Object y Tooltip
author nelopauselli
date Wed, 25 May 2011 01:53:31 -0300
parents
children 222362c29416
comparison
equal deleted inserted replaced
85:8a4135f019dd 86:723aed93a0e6
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 }