MCPcopy Index your code
hub / github.com/TruthHun/BookStack / AttachList

Method AttachList

controllers/ManagerController.go:747–766  ·  view source on GitHub ↗

附件列表.

()

Source from the content-addressed store, hash-verified

745
746// 附件列表.
747func (this *ManagerController) AttachList() {
748
749 pageIndex, _ := this.GetInt("page", 1)
750
751 attachList, totalCount, err := models.NewAttachment().FindToPager(pageIndex, conf.PageSize)
752 if err != nil {
753 this.Abort("404")
754 }
755
756 if totalCount > 0 {
757 html := utils.GetPagerHtml(this.Ctx.Request.RequestURI, pageIndex, conf.PageSize, int(totalCount))
758 this.Data["PageHtml"] = html
759 } else {
760 this.Data["PageHtml"] = ""
761 }
762
763 this.Data["Lists"] = attachList
764 this.Data["IsAttach"] = true
765 this.TplName = "manager/attach_list.html"
766}
767
768// 附件详情.
769func (this *ManagerController) AttachDetailed() {

Callers

nothing calls this directly

Calls 3

NewAttachmentFunction · 0.92
GetPagerHtmlFunction · 0.92
FindToPagerMethod · 0.45

Tested by

no test coverage detected