<%
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Part.ascx b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypePart.ascx
similarity index 68%
rename from src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Part.ascx
rename to src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypePart.ascx
index 6743e1adf..d2382be7d 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Part.ascx
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypePart.ascx
@@ -4,10 +4,13 @@
<%:Html.ActionLink(T("Remove").Text, "RemovePartFrom", new { area = "Orchard.ContentTypes", id = Model.Type.Name, Model.PartDefinition.Name }, new { itemprop = "RemoveUrl UnsafeUrl" })%><%--// <- some experimentation--%>
<%
+ if (Model.Templates.Any()) { %>
+
<%
Html.RenderTemplates(Model.Templates); %>
-
<%:T("Global configuration") %>
-
<%:Html.ActionLink(T("Edit").Text, "EditPart", new { area = "Orchard.ContentTypes", id = Model.PartDefinition.Name }) %>
+
<%
+ } %>
+
<%:Html.ActionLink(T("Edit global part config").Text, "EditPart", new { area = "Orchard.ContentTypes", id = Model.PartDefinition.Name })%>
<%:Html.DisplayFor(m => m.PartDefinition.Settings, "Settings", "PartDefinition")
- %><%:Html.EditorFor(m => m.PartDefinition.Fields, "Fields", "PartDefinition")
+ %><%:Html.EditorFor(m => m.PartDefinition.Fields, "TypePartFields", "PartDefinition")
%><%:Html.Hidden("PartDefinition.Name", Model.PartDefinition.Name) %>
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypePartField.ascx b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypePartField.ascx
new file mode 100644
index 000000000..f7f933c7d
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypePartField.ascx
@@ -0,0 +1,10 @@
+<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %>
+
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypePartFields.ascx b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypePartFields.ascx
new file mode 100644
index 000000000..5c270aa45
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypePartFields.ascx
@@ -0,0 +1,10 @@
+<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>" %>
+<%
+if (Model.Any()) {
+ var fi = 0;
+ foreach (var field in Model) {
+ var f = field;
+ var htmlFieldName = string.Format("Fields[{0}]", fi++); %>
+ <%:Html.EditorFor(m => f, "TypePartField", htmlFieldName) %><%
+ }
+} %>
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Parts.ascx b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypeParts.ascx
similarity index 82%
rename from src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Parts.ascx
rename to src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypeParts.ascx
index 8f6e4b0ff..cc41743b0 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Parts.ascx
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/TypeParts.ascx
@@ -6,7 +6,7 @@ if (Model.Any()) { %>
foreach (var part in Model) {
var p = part;
var htmlFieldName = string.Format("Parts[{0}]", pi++); %>
- <%:Html.EditorFor(m => p, "Part", htmlFieldName) %><%
+ <%:Html.EditorFor(m => p, "TypePart", htmlFieldName) %><%
} %>
<%
} %>
\ No newline at end of file