src/Orchard.Web/Modules/Orchard.Projections/Providers/Layouts/ListLayoutForms.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using Orchard.DisplayManagement;
using Orchard.Forms.Services;
using Orchard.Localization;
namespace Orchard.Projections.Providers.Layouts {
public class ListLayoutForms : IFormProvider {
protected dynamic Shape { get; set; }
public Localizer T { get; set; }
public ListLayoutForms(
IShapeFactory shapeFactory) {
Shape = shapeFactory;
T = NullLocalizer.Instance;
}
public void Describe(DescribeContext context) {
Func<IShapeFactory, object> form =
shape => {
var f = Shape.Form(
Id: "ListLayout",
_Options: Shape.Fieldset(
Title: T("Order"),
_ValueTrue: Shape.Radio(
Id: "unordered", Name: "Order",
Checked: true,
Title: T("Unordered list"), Value: "unordered"
),
_ValueFalse: Shape.Radio(
Id: "ordered", Name: "Order",
Title: T("Ordered list"), Value: "ordered"
)
),
_HtmlProperties: Shape.Fieldset(
Classes: new []{"expando"},
Title: T("Html properties"),
_ListId: Shape.TextBox(
Id: "list-id", Name: "ListId",
Title: T("List id"),
Description: T("The id to provide on the list element."),
Classes: new[] { "textMedium", "tokenized" }
),
_ListClass: Shape.TextBox(
Id: "list-class", Name: "ListClass",
Title: T("List class"),
Description: T("The class to provide on the list element."),
Classes: new[] { "textMedium", "tokenized" }
),
_ItemClass: Shape.TextBox(
Id: "item-class", Name: "ItemClass",
Title: T("Item class"),
Description: T("The class to provide on each list item."),
Classes: new[] { "textMedium", "tokenized" }
)
)
);
return f;
后面还有 20 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
