Adding a ShapePartialResult

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-01-18 10:25:12 -08:00
parent 244945a0e6
commit bc1f8af9a2
3 changed files with 13 additions and 0 deletions

View File

@@ -504,6 +504,9 @@
<ItemGroup> <ItemGroup>
<Content Include="Common\Views\Body-Textarea.Editor.cshtml" /> <Content Include="Common\Views\Body-Textarea.Editor.cshtml" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="Shapes\Views\ShapeResult\DisplayPartial.cshtml" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@@ -0,0 +1 @@
@Display(Model)

View File

@@ -9,4 +9,13 @@ namespace Orchard.Mvc {
ViewName = "ShapeResult/Display"; ViewName = "ShapeResult/Display";
} }
} }
public class ShapePartialResult : PartialViewResult {
public ShapePartialResult(ControllerBase controller, dynamic shape) {
ViewData = controller.ViewData;
TempData = controller.TempData;
ViewData.Model = shape;
ViewName = "ShapeResult/DisplayPartial";
}
}
} }