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

Function fun4

utils/pager.go:168–183  ·  view source on GitHub ↗

** * 1...197 198 199 200 */

(po *PageOptions, totalPages int)

Source from the content-addressed store, hash-verified

166 * 1...197 198 199 200
167 */
168func fun4(po *PageOptions, totalPages int) string {
169 rs := ""
170 rs += getHeader(po, totalPages)
171 rs += "<li><a href='" + po.Href + "&" + po.ParamName + "=" + con.Itoa(1) + "'>" + con.Itoa(1) + "</a><li>"
172 rs += "<li><a href=''>...</a></li>"
173 for i := totalPages - po.LinkItemCount; i <= totalPages; i++ {
174 if po.CurrentPage != i {
175 rs += "<li><a href='" + po.Href + "&" + po.ParamName + "=" + con.Itoa(i) + "'>" + con.Itoa(i) + "</a></li>"
176 } else {
177 rs += "<li class=\"active\"><a href=\"###\">" + con.Itoa(i) + " <span class=\"sr-only\">(current)</span></a></li>"
178 }
179 }
180 rs += getFooter(po, totalPages)
181 return rs
182
183}
184
185/**
186 * 1...6 7 8 9 10 11 12 13 14 15... 200

Callers 2

GetPagerLinksFunction · 0.85
GetPagerHtmlFunction · 0.85

Calls 2

getHeaderFunction · 0.85
getFooterFunction · 0.85

Tested by

no test coverage detected