annotate Agendas/trunk/src/Agendas.Web/Views/Shared/EditorTemplates/Object.cshtml @ 150:19bab30521da

Pasando DateTime a un EditorTemplates
author Nelo@Guinea.neluz.int
date Tue, 02 Aug 2011 23:24:19 -0300
parents 723aed93a0e6
children 222362c29416
rev   line source
86
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
1 @if (ViewData.TemplateInfo.TemplateDepth > 1) {
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
2 if (Model == null) {
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
3 @ViewData.ModelMetadata.NullDisplayText
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
4 } else {
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
5 @ViewData.ModelMetadata.SimpleDisplayText
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
6 }
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
7 } else {
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
8 foreach (var prop in ViewData.ModelMetadata.Properties.Where(metadata => metadata.ShowForEdit && !metadata.IsComplexType && !ViewData.TemplateInfo.Visited(metadata)))
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
9 {
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
10 if (prop.HideSurroundingHtml) {
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
11 @Html.Editor(prop.PropertyName)
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
12 } else {
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
13 if (!String.IsNullOrEmpty(Html.Label(prop.PropertyName).ToHtmlString())) {
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
14 if (prop.IsRequired) {
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
15 <div class="editor-label"><b>@Html.Label(prop.PropertyName)</b></div>
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
16 } else {
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
17 <div class="editor-label">@Html.Label(prop.PropertyName)</div>
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
18 }
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
19 }
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
20 <div class="editor-field">
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
21 @Html.Editor(prop.PropertyName)
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
22 @Html.ValidationMessage(prop.PropertyName)
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
23 @Html.Display(prop.PropertyName, "Tooltip")
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
24 </div>
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
25 }
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
26 }
723aed93a0e6 Template de Object y Tooltip
nelopauselli
parents:
diff changeset
27 }