** * 1...6 7 8 9 10 11 12 13 14 15... 200 */
(po *PageOptions, totalpages int)
| 186 | * 1...6 7 8 9 10 11 12 13 14 15... 200 |
| 187 | */ |
| 188 | func fun3(po *PageOptions, totalpages int) string { |
| 189 | var rs string = "" |
| 190 | rs += getHeader(po, totalpages) |
| 191 | rs += "<li><a href='" + po.Href + "&" + po.ParamName + "=" + con.Itoa(1) + "'>" + con.Itoa(1) + "</a></li>" |
| 192 | rs += "<a href=''>...</a>" |
| 193 | for i := po.CurrentPage - po.LinkItemCount/2 + 1; i <= po.CurrentPage+po.LinkItemCount/2-1; i++ { |
| 194 | if po.CurrentPage != i { |
| 195 | rs += "<a href='" + po.Href + "&" + po.ParamName + "=" + con.Itoa(i) + "'>" + con.Itoa(i) + "</a>" |
| 196 | } else { |
| 197 | rs += "<li class=\"active\"><a href=\"###\">" + con.Itoa(i) + " <span class=\"sr-only\">(current)</span></a></li>" |
| 198 | } |
| 199 | } |
| 200 | rs += "<a href=''>...</a>" |
| 201 | rs += "<li><a href='" + po.Href + "&" + po.ParamName + "=" + con.Itoa(totalpages) + "'>" + con.Itoa(totalpages) + "</a></li>" |
| 202 | rs += getFooter(po, totalpages) |
| 203 | return rs |
| 204 | |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * totalpages > po.LinkItemCount po.CurrentPage < po.LinkItemCount |
no test coverage detected