mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 04:43:35 +08:00
Merge
--HG-- branch : 1.x
This commit is contained in:
@@ -7,6 +7,7 @@ using Orchard.Core.Containers.Extensions;
|
||||
using Orchard.Core.Containers.Models;
|
||||
using Orchard.Core.Routable.Models;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Themes;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.Settings;
|
||||
@@ -71,14 +72,16 @@ namespace Orchard.Core.Containers.Controllers {
|
||||
|
||||
var list = Shape.List();
|
||||
list.AddRange(pageOfItems.Select(item => _contentManager.BuildDisplay(item, "Summary")));
|
||||
list.Classes.Add("content-items");
|
||||
list.Classes.Add("list-items");
|
||||
|
||||
dynamic viewModel = Shape.ViewModel()
|
||||
.ContentItems(list)
|
||||
.Pager(pagerShape)
|
||||
.ShowPager(container.As<ContainerPart>().Record.Paginated);
|
||||
var model = _contentManager.BuildDisplay(container, "Detail");
|
||||
model.Content.Add(list, "7");
|
||||
if (container.As<ContainerPart>().Record.Paginated) {
|
||||
model.Content.Add(pagerShape, "7.5");
|
||||
}
|
||||
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
return View((object)viewModel);
|
||||
return new ShapeResult(this, model);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
@{
|
||||
IEnumerable<object> items = Model.ContentItems;
|
||||
Model.ContentItems.Classes.Add("content-items");
|
||||
Model.ContentItems.Classes.Add("list-items");
|
||||
}
|
||||
@Display(items)
|
||||
@if (Model.ShowPager) {
|
||||
@Display(Model.Pager)
|
||||
}
|
@@ -386,7 +386,6 @@
|
||||
<Content Include="Containers\Placement.info" />
|
||||
<Content Include="Containers\Views\EditorTemplates\ContainerWidget.cshtml" />
|
||||
<Content Include="Containers\Views\EditorTemplates\Container.cshtml" />
|
||||
<Content Include="Containers\Views\Item\Display.cshtml" />
|
||||
<Content Include="Containers\Views\DefinitionTemplates\ContainerPartSettings.cshtml" />
|
||||
<Content Include="Containers\Views\DefinitionTemplates\ContainerTypePartSettings.cshtml" />
|
||||
<Content Include="Containers\Views\EditorTemplates\Containable.cshtml" />
|
||||
|
Reference in New Issue
Block a user