From 6da2e04ada3ca5540e4d8b404f05d900ae2d1ec8 Mon Sep 17 00:00:00 2001 From: Jonathan Wall Date: Fri, 15 Oct 2010 17:05:02 -0700 Subject: [PATCH 1/2] Added CSS for tripel --HG-- branch : dev --- .../Themes/TheThemeMachine/Styles/Site.css | 43 ++++++++++++++++--- .../TheThemeMachine/Views/Layout.cshtml | 4 ++ 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css index 786701719..290969054 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css +++ b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css @@ -444,16 +444,12 @@ article.comment p.text { display:inline; } -.aside.third { +/*.aside.third { border-top:1px solid #dbdbdb; clear:both; -} +}*/ + -#layout-tripel div > div { - float:left; - width:316px; - /*padding:12px 6px 0 6px;*/ -} #footer-quad div.zone { float:left; @@ -487,6 +483,39 @@ article.comment p.text { /*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 */ /*1 zone on */ diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml b/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml index 2462c24bf..4fbc20ecf 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml +++ b/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml @@ -47,6 +47,10 @@ Model.Classes.Add(footerQuadClass); } + debug: +tripelClass:@tripelClass
+footerQuadClass:@footerQuadClass + Model.Id = "layout-wrapper"; var tag = Tag (Model, "div"); From b53a96d83fed79f748e396d66c437f6be02326ba Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Fri, 15 Oct 2010 17:10:34 -0700 Subject: [PATCH 2/2] Making the content wrapper not apply to *Admin* display types and making the wrapper zone names containing the child contents consistent (Model.Child) --HG-- branch : dev --- src/Orchard.Web/Core/Contents/Shapes.cs | 6 ++++-- .../Core/Contents/Views/Content.ControlWrapper.cshtml | 4 ++-- src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs | 2 +- .../Orchard.Widgets/Views/Widget.ControlWrapper.cshtml | 4 ++-- .../Modules/Orchard.Widgets/Views/Widget.Wrapper.cshtml | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Orchard.Web/Core/Contents/Shapes.cs b/src/Orchard.Web/Core/Contents/Shapes.cs index cd3f6631c..22615f9df 100644 --- a/src/Orchard.Web/Core/Contents/Shapes.cs +++ b/src/Orchard.Web/Core/Contents/Shapes.cs @@ -5,10 +5,9 @@ namespace Orchard.Core.Contents { public class Shapes : IShapeTableProvider { public void Discover(ShapeTableBuilder builder) { builder.Describe("Content") - .Configure(descriptor => descriptor.Wrappers.Add("Content_ControlWrapper")) .OnCreated(created => { var content = created.Shape; - content.Main.Add(created.New.PlaceChildContent(Source: content)); + content.Child.Add(created.New.PlaceChildContent(Source: content)); }) .OnDisplaying(displaying => { ContentItem contentItem = displaying.Shape.ContentItem; @@ -21,6 +20,9 @@ namespace Orchard.Core.Contents { displaying.ShapeMetadata.Alternates.Add("Content_" + displaying.ShapeMetadata.DisplayType); //Content.Summary-Page displaying.ShapeMetadata.Alternates.Add("Content_" + displaying.ShapeMetadata.DisplayType + "__" + contentItem.ContentType); + + if (!displaying.ShapeMetadata.DisplayType.Contains("Admin")) + displaying.ShapeMetadata.Wrappers.Add("Content_ControlWrapper"); } }); diff --git a/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml b/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml index 169374157..c34821b5b 100644 --- a/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml +++ b/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml @@ -3,9 +3,9 @@ @if (AuthorizedFor(Permissions.EditContent)) {
@Html.ItemEditLinkWithReturnUrl(T("Edit").Text, (ContentItem)Model.ContentItem)
- @Display(Model.Main) + @Display(Model.Child)
} else { - @Display(Model.Main) + @Display(Model.Child) } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs index 266c454b1..f40a42daa 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs @@ -14,7 +14,7 @@ namespace Orchard.Widgets { }) .OnCreated(created => { var widget = created.Shape; - widget.Main.Add(created.New.PlaceChildContent(Source: widget)); + widget.Child.Add(created.New.PlaceChildContent(Source: widget)); }) .OnDisplaying(displaying => { ContentItem contentItem = displaying.Shape.ContentItem; diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.ControlWrapper.cshtml b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.ControlWrapper.cshtml index bf5cab8f6..4454fccc3 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.ControlWrapper.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.ControlWrapper.cshtml @@ -3,9 +3,9 @@ @if (AuthorizedFor(Permissions.ManageWidgets)) {
@Html.ItemEditLinkWithReturnUrl(T("Edit").Text, (ContentItem)Model.ContentItem)
- @Display(Model.Main) + @Display(Model.Child)
} else { - @Display(Model.Main) + @Display(Model.Child) } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.Wrapper.cshtml b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.Wrapper.cshtml index 96d784427..fe7ad8123 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.Wrapper.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.Wrapper.cshtml @@ -8,7 +8,7 @@

@title

@Display(Model.Header) - @Display.PlaceChildContent(Source: Model) + @Display(Model.Child) @if(Model.Footer != null) {