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

Function fun1

utils/pager.go:235–249  ·  view source on GitHub ↗

** * totalpages <= po.LinkItemCount * 显示完全 12345678910 */

(po *PageOptions, totalpages int)

Source from the content-addressed store, hash-verified

233 * 显示完全 12345678910
234 */
235func fun1(po *PageOptions, totalpages int) string {
236
237 var rs string = ""
238 rs += getHeader(po, totalpages)
239 for i := 1; i <= totalpages; i++ {
240 if po.CurrentPage != i {
241
242 rs += "<li><a href='" + po.Href + "&" + po.ParamName + "=" + con.Itoa(i) + "'>" + con.Itoa(i) + "</a></li>"
243 } else {
244 rs += "<li class=\"active\"><a href=\"###\">" + con.Itoa(i) + " <span class=\"sr-only\">(current)</span></a></li>"
245 }
246 }
247 rs += getFooter(po, totalpages)
248 return rs
249}
250
251/**
252 * 头部

Callers 2

GetPagerLinksFunction · 0.85
GetPagerHtmlFunction · 0.85

Calls 2

getHeaderFunction · 0.85
getFooterFunction · 0.85

Tested by

no test coverage detected