mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Updating pagination to use the total item count instead of a has next page bool for better flexibility.
--HG-- branch : dev
This commit is contained in:
@@ -88,8 +88,7 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
var list = Shape.List();
|
||||
list.AddRange(pageOfContentItems.Select(ci => _contentManager.BuildDisplay(ci, "SummaryAdmin")));
|
||||
|
||||
var hasNextPage = query.Slice(pager.GetStartIndex(pager.Page + 1), 1).Any();
|
||||
var pagerShape = Shape.Pager(pager).HasNextPage(hasNextPage);
|
||||
var pagerShape = Shape.Pager(pager).TotalItemCount(query.Count());
|
||||
|
||||
var viewModel = Shape.ViewModel()
|
||||
.ContentItems(list)
|
||||
|
||||
Reference in New Issue
Block a user