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

Function getFooter

utils/pager.go:277–292  ·  view source on GitHub ↗

** * 尾部 */

(po *PageOptions, totalpages int)

Source from the content-addressed store, hash-verified

275 * 尾部
276 */
277func getFooter(po *PageOptions, totalpages int) string {
278 var rs string = ""
279 if po.EnablePreNexLink {
280 var a int = po.CurrentPage + 1
281 rs += "<li " + judgeDisable(po, totalpages, 1) + " ><a href='" + po.Href + "&" + po.ParamName + "=" + con.Itoa(a) + "'>" + po.NextPageText + "</a></li>"
282 }
283 if po.EnableFirstLastLink { //当首页,尾页都设定的时候,就显示
284 if po.CurrentPage == totalpages {
285 rs += "<li " + judgeDisable(po, totalpages, 1) + " class=\"disabled\"><a href=\"###\">" + po.LastPageText + "</a></li>"
286 } else {
287 rs += "<li " + judgeDisable(po, totalpages, 1) + " ><a href=\"" + po.Href + "&" + po.ParamName + "=" + con.Itoa(totalpages) + "\">" + po.LastPageText + "</a></li>"
288 }
289 }
290 rs += "</ul>"
291 return rs
292}
293
294/**
295 * 设置默认值

Callers 4

fun4Function · 0.85
fun3Function · 0.85
fun2Function · 0.85
fun1Function · 0.85

Calls 1

judgeDisableFunction · 0.85

Tested by

no test coverage detected