--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-10-14 12:05:01 -07:00
6 changed files with 16 additions and 14 deletions

View File

@@ -107,6 +107,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Views\DisplayTemplates\Parts\Experimental.ShowDebugLink.ascx" /> <Content Include="Views\DisplayTemplates\Parts\Experimental.ShowDebugLink.ascx" />
<Content Include="Views\DumpShapeTable.cshtml" />
<None Include="Views\HackScript.cshtml" /> <None Include="Views\HackScript.cshtml" />
<None Include="Views\HackStyle.cshtml" /> <None Include="Views\HackStyle.cshtml" />
<None Include="Views\ThinBorder.cshtml" /> <None Include="Views\ThinBorder.cshtml" />

View File

@@ -7,12 +7,16 @@ namespace Orchard.Experimental {
} }
public void Created(ShapeCreatedContext context) { public void Created(ShapeCreatedContext context) {
if (context.ShapeType != "Layout" && context.ShapeType != "DocumentZone") if (context.ShapeType != "Layout" && context.ShapeType != "DocumentZone") {
context.Shape.Metadata.Wrappers.Add("ThinBorder"); context.Shape.Metadata.Wrappers.Add("ThinBorder");
}
if (context.ShapeType == "Header") { if (context.ShapeType == "Header") {
context.Shape.Metadata.Wrappers.Add("HackScript"); context.Shape.Metadata.Wrappers.Add("HackScript");
context.Shape.Metadata.Wrappers.Add("HackStyle"); context.Shape.Metadata.Wrappers.Add("HackStyle");
} }
if (context.ShapeType == "Layout") {
context.Shape.Metadata.Wrappers.Add("DumpShapeTable");
}
} }
} }
} }

View File

@@ -1,9 +1,10 @@
@using Orchard; @using Orchard;
@using Orchard.DisplayManagement.Descriptors; @using Orchard.DisplayManagement.Descriptors;
@Display(Model.Metadata.ChildContent)
@{ @{
var workContext = ViewContext.GetWorkContext(); var workContext = ViewContext.GetWorkContext();
var shapeTable = workContext.Resolve<IShapeTableManager>().GetShapeTable(workContext.CurrentTheme.ThemeName); var shapeTable = workContext.Resolve<IShapeTableManager>().GetShapeTable(workContext.CurrentTheme.ThemeName);
<!--
<ul> <ul>
@foreach(var descriptor in shapeTable.Descriptors) { @foreach(var descriptor in shapeTable.Descriptors) {
<li>@descriptor.Key : @descriptor.Value.BindingSource <li>@descriptor.Key : @descriptor.Value.BindingSource
@@ -15,4 +16,5 @@
</li> </li>
} }
</ul> </ul>
-->
} }

View File

@@ -311,7 +311,6 @@
<Content Include="Themes\TheAdmin\Styles\images\backgroundHeader.gif" /> <Content Include="Themes\TheAdmin\Styles\images\backgroundHeader.gif" />
<Content Include="Themes\TheAdmin\Styles\images\orchardLogo.gif" /> <Content Include="Themes\TheAdmin\Styles\images\orchardLogo.gif" />
<Content Include="Themes\TheAdmin\Theme.png" /> <Content Include="Themes\TheAdmin\Theme.png" />
<Content Include="Themes\TheAdmin\Views\DumpShapeTable.cshtml" />
<Content Include="Themes\TheAdmin\Views\User.cshtml" /> <Content Include="Themes\TheAdmin\Views\User.cshtml" />
<Content Include="Themes\TheAdmin\Views\Header.cshtml" /> <Content Include="Themes\TheAdmin\Views\Header.cshtml" />
<Content Include="Themes\Web.config" /> <Content Include="Themes\Web.config" />

View File

@@ -39,10 +39,3 @@
</div> </div>
<div id="footer" role="contentinfo"> <div id="footer" role="contentinfo">
@Display(Model.Footer)</div> @Display(Model.Footer)</div>
@* tmp *@
<!--
<div style="background:#666;color:#daf2f6;margin:10px;padding:10px;font:12px/18px Consolas,'Lucida Console','Bitstream Vera Sans Mono','DejaVu Sans Mono',monospace;">
@Display.DumpShapeTable()
</div>
-->

View File

@@ -22,9 +22,12 @@
} }
Model.Id = "layout-wrapper";
var tag = Tag (Model, "div");
} }
<div id="layout-wrapper"> @tag.StartElement
@* needs to be the page title, not page (head) title... *@ @* needs to be the page title, not page (head) title... *@
@* Adds text and html to the header zone *@ @* Adds text and html to the header zone *@
@@ -85,4 +88,4 @@
</footer> </footer>
} }
</div> @tag.EndElement