mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Putting the shape table debug output into Orchard.Experimental
--HG-- branch : dev
This commit is contained in:
@@ -107,6 +107,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\DisplayTemplates\Parts\Experimental.ShowDebugLink.ascx" />
|
||||
<Content Include="Views\DumpShapeTable.cshtml" />
|
||||
<None Include="Views\HackScript.cshtml" />
|
||||
<None Include="Views\HackStyle.cshtml" />
|
||||
<None Include="Views\ThinBorder.cshtml" />
|
||||
|
@@ -7,12 +7,16 @@ namespace Orchard.Experimental {
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
if (context.ShapeType == "Header") {
|
||||
context.Shape.Metadata.Wrappers.Add("HackScript");
|
||||
context.Shape.Metadata.Wrappers.Add("HackStyle");
|
||||
}
|
||||
if (context.ShapeType == "Layout") {
|
||||
context.Shape.Metadata.Wrappers.Add("DumpShapeTable");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,9 +1,10 @@
|
||||
@using Orchard;
|
||||
@using Orchard.DisplayManagement.Descriptors;
|
||||
@Display(Model.Metadata.ChildContent)
|
||||
@{
|
||||
var workContext = ViewContext.GetWorkContext();
|
||||
var shapeTable = workContext.Resolve<IShapeTableManager>().GetShapeTable(workContext.CurrentTheme.ThemeName);
|
||||
|
||||
<!--
|
||||
<ul>
|
||||
@foreach(var descriptor in shapeTable.Descriptors) {
|
||||
<li>@descriptor.Key : @descriptor.Value.BindingSource
|
||||
@@ -15,4 +16,5 @@
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
-->
|
||||
}
|
@@ -311,7 +311,6 @@
|
||||
<Content Include="Themes\TheAdmin\Styles\images\backgroundHeader.gif" />
|
||||
<Content Include="Themes\TheAdmin\Styles\images\orchardLogo.gif" />
|
||||
<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\Header.cshtml" />
|
||||
<Content Include="Themes\Web.config" />
|
||||
|
@@ -38,11 +38,4 @@
|
||||
@Display(Model.Navigation)</div>
|
||||
</div>
|
||||
<div id="footer" role="contentinfo">
|
||||
@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>
|
||||
-->
|
||||
@Display(Model.Footer)</div>
|
Reference in New Issue
Block a user