mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-12-19 19:57:09 +08:00
重写分页
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
"github.com/lifei6671/mindoc/conf"
|
||||
"github.com/lifei6671/mindoc/models"
|
||||
"github.com/lifei6671/mindoc/utils"
|
||||
"github.com/lifei6671/mindoc/utils/pagination"
|
||||
"github.com/russross/blackfriday"
|
||||
)
|
||||
|
||||
@@ -1056,8 +1057,8 @@ func (c *DocumentController) History() {
|
||||
c.Data["Document"] = doc
|
||||
|
||||
if totalCount > 0 {
|
||||
html := utils.GetPagerHtml(c.Ctx.Request.RequestURI, pageIndex, conf.PageSize, totalCount)
|
||||
c.Data["PageHtml"] = html
|
||||
pager := pagination.NewPagination(c.Ctx.Request,totalCount,conf.PageSize)
|
||||
c.Data["PageHtml"] = pager.HtmlPages()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user