mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -5,10 +5,9 @@ namespace Orchard.Core.Contents {
|
|||||||
public class Shapes : IShapeTableProvider {
|
public class Shapes : IShapeTableProvider {
|
||||||
public void Discover(ShapeTableBuilder builder) {
|
public void Discover(ShapeTableBuilder builder) {
|
||||||
builder.Describe("Content")
|
builder.Describe("Content")
|
||||||
.Configure(descriptor => descriptor.Wrappers.Add("Content_ControlWrapper"))
|
|
||||||
.OnCreated(created => {
|
.OnCreated(created => {
|
||||||
var content = created.Shape;
|
var content = created.Shape;
|
||||||
content.Main.Add(created.New.PlaceChildContent(Source: content));
|
content.Child.Add(created.New.PlaceChildContent(Source: content));
|
||||||
})
|
})
|
||||||
.OnDisplaying(displaying => {
|
.OnDisplaying(displaying => {
|
||||||
ContentItem contentItem = displaying.Shape.ContentItem;
|
ContentItem contentItem = displaying.Shape.ContentItem;
|
||||||
@@ -21,6 +20,9 @@ namespace Orchard.Core.Contents {
|
|||||||
displaying.ShapeMetadata.Alternates.Add("Content_" + displaying.ShapeMetadata.DisplayType);
|
displaying.ShapeMetadata.Alternates.Add("Content_" + displaying.ShapeMetadata.DisplayType);
|
||||||
//Content.Summary-Page
|
//Content.Summary-Page
|
||||||
displaying.ShapeMetadata.Alternates.Add("Content_" + displaying.ShapeMetadata.DisplayType + "__" + contentItem.ContentType);
|
displaying.ShapeMetadata.Alternates.Add("Content_" + displaying.ShapeMetadata.DisplayType + "__" + contentItem.ContentType);
|
||||||
|
|
||||||
|
if (!displaying.ShapeMetadata.DisplayType.Contains("Admin"))
|
||||||
|
displaying.ShapeMetadata.Wrappers.Add("Content_ControlWrapper");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
@if (AuthorizedFor(Permissions.EditContent)) {
|
@if (AuthorizedFor(Permissions.EditContent)) {
|
||||||
<div class="content-control">
|
<div class="content-control">
|
||||||
<div class="manage-actions">@Html.ItemEditLinkWithReturnUrl(T("Edit").Text, (ContentItem)Model.ContentItem)</div>
|
<div class="manage-actions">@Html.ItemEditLinkWithReturnUrl(T("Edit").Text, (ContentItem)Model.ContentItem)</div>
|
||||||
@Display(Model.Main)
|
@Display(Model.Child)
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@Display(Model.Main)
|
@Display(Model.Child)
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ namespace Orchard.Widgets {
|
|||||||
})
|
})
|
||||||
.OnCreated(created => {
|
.OnCreated(created => {
|
||||||
var widget = created.Shape;
|
var widget = created.Shape;
|
||||||
widget.Main.Add(created.New.PlaceChildContent(Source: widget));
|
widget.Child.Add(created.New.PlaceChildContent(Source: widget));
|
||||||
})
|
})
|
||||||
.OnDisplaying(displaying => {
|
.OnDisplaying(displaying => {
|
||||||
ContentItem contentItem = displaying.Shape.ContentItem;
|
ContentItem contentItem = displaying.Shape.ContentItem;
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
@if (AuthorizedFor(Permissions.ManageWidgets)) {
|
@if (AuthorizedFor(Permissions.ManageWidgets)) {
|
||||||
<div class="widget-control">
|
<div class="widget-control">
|
||||||
<div class="manage-actions">@Html.ItemEditLinkWithReturnUrl(T("Edit").Text, (ContentItem)Model.ContentItem)</div>
|
<div class="manage-actions">@Html.ItemEditLinkWithReturnUrl(T("Edit").Text, (ContentItem)Model.ContentItem)</div>
|
||||||
@Display(Model.Main)
|
@Display(Model.Child)
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@Display(Model.Main)
|
@Display(Model.Child)
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<h1>@title</h1>
|
<h1>@title</h1>
|
||||||
@Display(Model.Header)
|
@Display(Model.Header)
|
||||||
</header>
|
</header>
|
||||||
@Display.PlaceChildContent(Source: Model)
|
@Display(Model.Child)
|
||||||
@if(Model.Footer != null) {
|
@if(Model.Footer != null) {
|
||||||
<footer>
|
<footer>
|
||||||
@Display(Model.Footer)
|
@Display(Model.Footer)
|
||||||
|
|||||||
@@ -444,16 +444,12 @@ article.comment p.text {
|
|||||||
display:inline;
|
display:inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.aside.third {
|
/*.aside.third {
|
||||||
border-top:1px solid #dbdbdb;
|
border-top:1px solid #dbdbdb;
|
||||||
clear:both;
|
clear:both;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
#layout-tripel div > div {
|
|
||||||
float:left;
|
|
||||||
width:316px;
|
|
||||||
/*padding:12px 6px 0 6px;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
#footer-quad div.zone {
|
#footer-quad div.zone {
|
||||||
float:left;
|
float:left;
|
||||||
@@ -487,6 +483,39 @@ article.comment p.text {
|
|||||||
/*border:1px solid #ff0000;*/
|
/*border:1px solid #ff0000;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Tripel */
|
||||||
|
|
||||||
|
#layout-tripel div {
|
||||||
|
float:left;
|
||||||
|
/*padding:12px 6px 0 6px;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/*1 zone on */
|
||||||
|
.tripel-1 #tripel-first { width:960px; }
|
||||||
|
|
||||||
|
/*2 zone on */
|
||||||
|
.tripel-2 #tripel-second { width:960px; }
|
||||||
|
|
||||||
|
/*3 zone on */
|
||||||
|
.tripel-3 #tripel-third { width:960px; }
|
||||||
|
|
||||||
|
/*2 zones on */
|
||||||
|
|
||||||
|
/* If zones 1, 2 are on */
|
||||||
|
.tripel-12 #tripel-first, .tripel-12 #tripel-second { width:480px; }
|
||||||
|
|
||||||
|
/* If zones 2, 3 are on */
|
||||||
|
.tripel-23 #tripel-second, .tripel-23 #tripel-third { width:480px; }
|
||||||
|
|
||||||
|
/* If zones 1, 3 are on */
|
||||||
|
.tripel-13 #tripel-first, .tripel-13 #tripel-third { width:480px; }
|
||||||
|
|
||||||
|
/*3 zones on */
|
||||||
|
|
||||||
|
/* If zones 1, 2, 3 are on */
|
||||||
|
.tripel-123 #tripel-first, .tripel-123 #tripel-second, .tripel-123 #tripel-third { width:320px; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Quad */
|
/* Quad */
|
||||||
/*1 zone on */
|
/*1 zone on */
|
||||||
|
|||||||
@@ -47,6 +47,10 @@
|
|||||||
Model.Classes.Add(footerQuadClass);
|
Model.Classes.Add(footerQuadClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span>debug: </span>
|
||||||
|
<span>tripelClass:@tripelClass</span><br />
|
||||||
|
<span>footerQuadClass:@footerQuadClass</span>
|
||||||
|
|
||||||
Model.Id = "layout-wrapper";
|
Model.Id = "layout-wrapper";
|
||||||
var tag = Tag (Model, "div");
|
var tag = Tag (Model, "div");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user