mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 10:54:50 +08:00
Some edit type UI "refactoring" (in progress)
--HG-- branch : dev
This commit is contained in:
@@ -97,10 +97,12 @@
|
||||
<Content Include="Views\DisplayTemplates\Field.ascx" />
|
||||
<Content Include="Views\DisplayTemplates\Fields.ascx" />
|
||||
<Content Include="Views\DisplayTemplates\Settings.ascx" />
|
||||
<Content Include="Views\EditorTemplates\TypePartField.ascx" />
|
||||
<Content Include="Views\EditorTemplates\TypePartFields.ascx" />
|
||||
<Content Include="Views\EditorTemplates\Field.ascx" />
|
||||
<Content Include="Views\EditorTemplates\Fields.ascx" />
|
||||
<Content Include="Views\EditorTemplates\Part.ascx" />
|
||||
<Content Include="Views\EditorTemplates\Parts.ascx" />
|
||||
<Content Include="Views\EditorTemplates\TypePart.ascx" />
|
||||
<Content Include="Views\EditorTemplates\TypeParts.ascx" />
|
||||
<Content Include="Views\EditorTemplates\Settings.ascx" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Web.Debug.config">
|
||||
|
@@ -1,13 +1,19 @@
|
||||
.contents #main h2 {
|
||||
margin:1.5em 0 .5em;
|
||||
.orchard-contenttypes #main h2 {
|
||||
margin:1.5em 0 0;
|
||||
}
|
||||
.manage.add-to-type {
|
||||
margin-top:-4em;
|
||||
margin-top:-3.1em;
|
||||
}
|
||||
|
||||
.manage-part h3,
|
||||
.manage-field h3 {
|
||||
border-bottom:1px solid #EAEAEA;
|
||||
padding-top:0;
|
||||
}
|
||||
.manage-part h3,
|
||||
.manage-part .manage-field,
|
||||
.manage-part .settings {
|
||||
padding-left:20px;
|
||||
}
|
||||
.manage-part .manage,
|
||||
.manage-field .manage {
|
||||
@@ -15,12 +21,23 @@
|
||||
margin-top:-2.4em;
|
||||
}
|
||||
.manage-part .manage.minor {
|
||||
margin-top:-1.7em;
|
||||
margin:0 0 -1.2em;
|
||||
}
|
||||
.manage-part label,
|
||||
.manage-field label {
|
||||
font-weight:normal;
|
||||
}
|
||||
.manage-part fieldset {
|
||||
margin:1.5em 0 0;
|
||||
padding:0;
|
||||
}
|
||||
.manage-field .settings {
|
||||
margin:-1.5em 0 0 1em;
|
||||
padding-left:0;
|
||||
}
|
||||
.manage-part .settings fieldset {
|
||||
padding-left:0;
|
||||
}
|
||||
|
||||
/* should pull this back into the base admin theme css, w/out the .manage-part of course */
|
||||
.manage-part dl {
|
||||
@@ -28,8 +45,16 @@
|
||||
overflow:auto;
|
||||
padding:6px 0 0;
|
||||
}
|
||||
.manage-part dt {
|
||||
font-weight:bold;
|
||||
.manage-part dt,
|
||||
.manage-part dd {
|
||||
display:inline;
|
||||
}
|
||||
.manage-part dt::after {
|
||||
content:":";
|
||||
}
|
||||
.manage-part dd {
|
||||
font-style:italic;
|
||||
padding-left:.5em;
|
||||
}
|
||||
.manage-part dl dl {
|
||||
font-size:1em;
|
||||
|
@@ -19,7 +19,7 @@ using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
Html.RenderTemplates(Model.Templates); %>
|
||||
<h2><%:T("Parts") %></h2>
|
||||
<div class="manage add-to-type"><%: Html.ActionLink(T("Add").Text, "AddPartsTo", new { area = "Orchard.ContentTypes", id = Model.Name }, new { @class = "button" })%></div><%:
|
||||
Html.EditorFor(m => m.Parts, "Parts", "") %>
|
||||
Html.EditorFor(m => m.Parts, "TypeParts", "") %>
|
||||
<h2><%:T("Fields") %></h2>
|
||||
<div class="manage add-to-type"><%: Html.ActionLink(T("Add").Text, "AddFieldTo", new { area = "Orchard.ContentTypes", id = Model.Name }, new { @class = "button" }) %></div><%:
|
||||
Html.EditorFor(m => m.Fields, "Fields", "") %>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<%@ import Namespace="Orchard.ContentManagement.MetaData.Models" %>
|
||||
<%
|
||||
if (Model.Any()) { %>
|
||||
<dl><%
|
||||
<dl class="settings"><%
|
||||
foreach (var setting in Model) { %>
|
||||
<dt><%:setting.Key %></dt>
|
||||
<dd><%:setting.Value %></dd><%
|
||||
|
@@ -4,10 +4,13 @@
|
||||
<div class="manage">
|
||||
<%:Html.ActionLink(T("Remove").Text, "RemovePartFrom", new { area = "Orchard.ContentTypes", id = Model.Type.Name, Model.PartDefinition.Name }, new { itemprop = "RemoveUrl UnsafeUrl" })%><%--// <- some experimentation--%>
|
||||
</div><%
|
||||
if (Model.Templates.Any()) { %>
|
||||
<div class="settings"><%
|
||||
Html.RenderTemplates(Model.Templates); %>
|
||||
<h4><%:T("Global configuration") %></h4>
|
||||
<div class="manage minor"><%:Html.ActionLink(T("Edit").Text, "EditPart", new { area = "Orchard.ContentTypes", id = Model.PartDefinition.Name }) %></div>
|
||||
</div><%
|
||||
} %>
|
||||
<div class="manage minor"><%:Html.ActionLink(T("Edit global part config").Text, "EditPart", new { area = "Orchard.ContentTypes", id = Model.PartDefinition.Name })%></div>
|
||||
<%: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) %>
|
||||
</fieldset>
|
@@ -0,0 +1,10 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.ContentTypes.ViewModels.EditPartFieldViewModel>" %>
|
||||
<fieldset class="manage-field">
|
||||
<h4><%:Model.Name %> <span>(<%:Model.FieldDefinition.Name %>)</span></h4><%
|
||||
if (Model.Templates.Any()) { %>
|
||||
<div class="settings"><%
|
||||
Html.RenderTemplates(Model.Templates); %>
|
||||
</div><%
|
||||
} %>
|
||||
<%:Html.HiddenFor(m => m.Name) %><%:Html.HiddenFor(m => m.FieldDefinition.Name) %>
|
||||
</fieldset>
|
@@ -0,0 +1,10 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<IEnumerable<Orchard.ContentTypes.ViewModels.EditPartFieldViewModel>>" %>
|
||||
<%
|
||||
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) %><%
|
||||
}
|
||||
} %>
|
@@ -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) %><%
|
||||
} %>
|
||||
</fieldset><%
|
||||
} %>
|
Reference in New Issue
Block a user