** * 头部 */
(po *PageOptions, totalpages int)
| 252 | * 头部 |
| 253 | */ |
| 254 | func getHeader(po *PageOptions, totalpages int) string { |
| 255 | var rs string = "<ul class=\"pagination\">" |
| 256 | |
| 257 | if po.EnableFirstLastLink { //当首页,尾页都设定的时候,就显示 |
| 258 | if po.CurrentPage == 1 { |
| 259 | rs += "<li" + judgeDisable(po, totalpages, 0) + " class=\"disabled\"><a href=\"###\">" + po.FirstPageText + "</a></li>" |
| 260 | } else { |
| 261 | rs += "<li" + judgeDisable(po, totalpages, 0) + " ><a href='" + po.Href + "&" + po.ParamName + "=" + con.Itoa(1) + "'>" + po.FirstPageText + "</a></li>" |
| 262 | } |
| 263 | } |
| 264 | if po.EnablePreNexLink { // disabled=\"disabled\" |
| 265 | var a int = po.CurrentPage - 1 |
| 266 | if po.CurrentPage == 1 { |
| 267 | a = 1 |
| 268 | } |
| 269 | rs += "<li" + judgeDisable(po, totalpages, 0) + " ><a href='" + po.Href + "&" + po.ParamName + "=" + con.Itoa(a) + "'>" + po.PrePageText + "</a></li>" |
| 270 | } |
| 271 | return rs |
| 272 | } |
| 273 | |
| 274 | /** |
| 275 | * 尾部 |
no test coverage detected