mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#19280: Fixing Custom Forms pager
* Fixes the query for get the pager total item count. Work Item: 19280 --HG-- branch : 1.x extra : rebase_source : 4761b43545d4d001a67b786cb791e6f14cd3eb58
This commit is contained in:
@@ -136,7 +136,10 @@ namespace Orchard.CustomForms.Controllers {
|
||||
list.AddRange(submissions);
|
||||
|
||||
var totalItemCount = Services.ContentManager
|
||||
.Query<CommonPart, CommonPartRecord>().Where(x => x.Container == formPart.ContentItem.Record).Count();
|
||||
.Query<CommonPart, CommonPartRecord>()
|
||||
.ForVersion(VersionOptions.Latest)
|
||||
.Where(x => x.Container.Id == id)
|
||||
.Count();
|
||||
shape.Pager(Services.New.Pager(pager).TotalItemCount(totalItemCount));
|
||||
shape.List(list);
|
||||
return View(shape);
|
||||
|
Reference in New Issue
Block a user