mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 04:43:35 +08:00
Fixing that container pager shape was not displayed
--HG-- branch : 1.x extra : rebase_source : 80295bb54f53c656d8da9113f4dfcb43d2040fe9
This commit is contained in:
@@ -68,17 +68,20 @@ namespace Orchard.Core.Containers.Drivers {
|
|||||||
? pager.PageSize
|
? pager.PageSize
|
||||||
: part.PageSize;
|
: part.PageSize;
|
||||||
|
|
||||||
// var pagerShape = _shapeFactory.Pager(pager).TotalItemCount(query.Count());
|
var pagerShape = shapeHelper.Pager(pager).TotalItemCount(query.Count());
|
||||||
|
|
||||||
var startIndex = part.Paginated ? pager.GetStartIndex() : 0;
|
var startIndex = part.Paginated ? pager.GetStartIndex() : 0;
|
||||||
var pageOfItems = query.Slice(startIndex, pager.PageSize).ToList();
|
var pageOfItems = query.Slice(startIndex, pager.PageSize).ToList();
|
||||||
|
|
||||||
var list = _shapeFactory.List();
|
var listShape = shapeHelper.List();
|
||||||
list.AddRange(pageOfItems.Select(item => _contentManager.BuildDisplay(item, "Summary")));
|
listShape.AddRange(pageOfItems.Select(item => _contentManager.BuildDisplay(item, "Summary")));
|
||||||
list.Classes.Add("content-items");
|
listShape.Classes.Add("content-items");
|
||||||
list.Classes.Add("list-items");
|
listShape.Classes.Add("list-items");
|
||||||
|
|
||||||
return list;
|
return shapeHelper.Parts_Container_Contained(
|
||||||
|
List: listShape,
|
||||||
|
Pager: pagerShape
|
||||||
|
);
|
||||||
}),
|
}),
|
||||||
ContentShape("Parts_Container_Contained_Summary",
|
ContentShape("Parts_Container_Contained_Summary",
|
||||||
() => shapeHelper.Parts_Container_Contained_Summary(ContentPart: part)),
|
() => shapeHelper.Parts_Container_Contained_Summary(ContentPart: part)),
|
||||||
|
@@ -0,0 +1,3 @@
|
|||||||
|
@Display(Model.List)
|
||||||
|
|
||||||
|
@Display(Model.Pager)
|
@@ -490,6 +490,9 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Shapes\Views\ErrorPage.cshtml" />
|
<Content Include="Shapes\Views\ErrorPage.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Containers\Views\Parts.Container.Contained.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.
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
<OldToolsVersion>3.5</OldToolsVersion>
|
||||||
<UpgradeBackupLocation />
|
<UpgradeBackupLocation />
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
|
<UseIISExpress>false</UseIISExpress>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@@ -83,7 +84,9 @@
|
|||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Placement.info" />
|
<Content Include="Placement.info">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Admin\List.cshtml" />
|
<Content Include="Views\Admin\List.cshtml" />
|
||||||
|
Reference in New Issue
Block a user