mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +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>
|
||||||
<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" />
|
||||||
|
@@ -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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -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>
|
||||||
|
-->
|
||||||
}
|
}
|
@@ -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" />
|
||||||
|
@@ -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>
|
|
||||||
-->
|
|
Reference in New Issue
Block a user