Displaying and editing content part fields (in edit type UI)

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-06-23 12:18:07 -07:00
parent 3aad42eef4
commit 289ade85bf
6 changed files with 46 additions and 26 deletions

View File

@@ -5,13 +5,42 @@
margin-top:-4em;
}
.manage-part h3 {
.manage-part h3,
.manage-field h3 {
border-bottom:1px solid #EAEAEA;
}
.manage-part .manage {
.manage-part .manage,
.manage-field .manage {
font-size:1.4em;
margin-top:-2.4em;
}
.manage-part .manage.minor {
margin-top:-1.7em;
}
.manage-part label,
.manage-field label {
font-weight:normal;
}
/* should pull this back into the base admin theme css, w/out the .manage-part of course */
.manage-part dl {
margin:0 0 1em;
overflow:auto;
padding:6px 0 0;
}
.manage-part dt {
font-weight:bold;
}
.manage-part dl dl {
font-size:1em;
margin:0;
padding:0;
}
.manage-part dd dt {
clear:left;
float:left;
}
.manage-part dd dd {
float:left;
padding-left:.5em;
}

View File

@@ -1,9 +1,8 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<EditPartFieldViewModel>" %>
<%@ Import Namespace="Orchard.Core.Contents.ViewModels" %>
<fieldset>
<h3><%:Model.Name %></h3>
<h4><%:Model.FieldDefinition.Name %></h4>
<div class="manage add-to-type">
<fieldset class="manage-field">
<h3><%:Model.Name %> <span>(<%:Model.FieldDefinition.Name %>)</span></h3>
<div class="manage">
<%--// these inline forms can't be here. should probably have some JavaScript in here to build up the forms and add the "remove" link.
// get the antiforgery token from the edit type form and mark up the part in a semantic way so I can get some info from the DOM --%>
<%:Html.Link("[remove]", "#forshowonlyandnotintendedtowork!") %>

View File

@@ -1,14 +1,6 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentPartDefinition.Field>" %>
<%@ Import Namespace="Orchard.ContentManagement.MetaData.Models" %>
<fieldset>
<h3><%:Model.FieldDefinition.Name %></h3>
<div class="manage add-to-type">
<%--// these inline forms can't be here. should probably have some JavaScript in here to build up the forms and add the "remove" link.
// get the antiforgery token from the edit type form and mark up the part in a semantic way so I can get some info from the DOM --%>
<%:Html.Link("[remove]", "#forshowonlyandnotintendedtowork!") %>
<%-- <% using (Html.BeginFormAntiForgeryPost(Url.Action("RemovePart", new { area = "Contents" }), FormMethod.Post, new {@class = "inline link"})) { %>
<%=Html.Hidden("name", Model.PartDefinition.Name, new { id = "" }) %>
<button type="submit" title="<%:T("Remove") %>"><%:T("Remove") %></button>
<% } %> --%>
</div>
</fieldset>
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<EditPartFieldViewModel>" %>
<%@ Import Namespace="Orchard.Core.Contents.ViewModels" %>
<dt><%:Model.Name %> <span>(<%:Model.FieldDefinition.Name %>)</span></dt>
<dd>
<%:Html.DisplayFor(m => m.Settings, "Settings", "") %>
</dd>

View File

@@ -1,10 +1,10 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<IEnumerable<EditPartFieldViewModel>>" %>
<%@ Import Namespace="Orchard.Core.Contents.ViewModels" %><%
if (Model.Any()) { %>
<fieldset><%
<dl><%
foreach (var field in Model) {
var f = field; %>
<%:Html.EditorFor(m => f, "Part.Fields") %><%
<%:Html.EditorFor(m => f, "Part.Field") %><%
} %>
</fieldset><%
</dl><%
} %>

View File

@@ -1,8 +1,7 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<SettingsDictionary>" %>
<%@ import Namespace="Orchard.ContentManagement.MetaData.Models" %><%
if (Model.Any()) { %>
<fieldset>
<legend><%:T("[Settings]") %></legend><%
<fieldset><%
var si = 0;
foreach (var setting in Model) {
var s = setting;

View File

@@ -147,10 +147,11 @@ h1 { font-size:2.6em; } /* 26px */
h2 { font-size:2.1em; } /* 21px */
h2 span { font-size:.57em; } /* 12px */
h3 { font-size:1.8em; } /* 18px */
h3 span { font-size:.667em; } /* 12px */
h4 { font-size:1.6em; } /* 16px */
h5 { font-size:1.4em; } /* 14px */
h6, p, label, /*input, select,*/ .button,
h6, p, dl, label, /*input, select,*/ .button,
.message, .validation-summary-errors,
table.items th, table.items td, table.items caption { font-size:1.4em; line-height:1.4em; } /* 14px */
table.items p, table.items label, table.items input, table.items .button { font-size:1em; line-height:1em; }