<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
</head>
<body>
<h1>pageCount = ${pageUtil.pageCount}</h1>
<h1>currentPage = ${pageUtil.currentPage}</h1>
<#macro pagination pageCount totalCount uri pageIndex>
<#if (pageCount > 1)>
<#if (pageIndex>1)>
<a href="${uri}¤tPage=1" title="首页"><<</a>
</#if>
<#--如果前面页数过多,显示"..."-->
<#if (pageIndex>5)>
<#assign prevPages=pageIndex-9>
<#if prevPages lt 1>
<#assign prevPages=1>
</#if>
<#assign start=pageIndex-4>
<a href="${uri}¤tPage=${prevPages}" title="向前5页">...</a>
<#else>
<#assign start=1>
</#if>
<#-- 显示当前页附近的页-->
<#assign end=pageIndex+4>
<#if (end>pageCount)>
<#assign end=pageCount>
</#if>
<#list start..end as index>
<#if pageIndex==index>
<b>${index}</b>
<#else>
<a href="${uri}¤tPage=${index}">${index}</a>
</#if>
</#list>
<#--如果后面页数过多,显示"...":-->
<#if (end lt pageCount)>
<#assign endend=end+5>
<#if (end>pageCount)>
<#assign end=pageCount>
</#if>
<a href="${uri}¤tPage=${end}" title="向后5页">...</a>
</#if>
<#-- 显示"下一页":-->
<#if (pageIndex lt pageCount)>
<a href="${uri}¤tPage=${pageCount}" title="末页">>></a>
</#if>
<#else>
nothing
</#if>
</#macro>
<@pagination pageCount=pageUtil.pageCount totalCount=pageUtil.totalCount uri=pageUtil.partUrl pageIndex=pageUtil.currentPage/>
</body>
</html>
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
</head>
<body>
<h1>pageCount = ${pageUtil.pageCount}</h1>
<h1>currentPage = ${pageUtil.currentPage}</h1>
<#macro pagination pageCount totalCount uri pageIndex>
<#if (pageCount > 1)>
<#if (pageIndex>1)>
<a href="${uri}¤tPage=1" title="首页"><<</a>
</#if>
<#--如果前面页数过多,显示"..."-->
<#if (pageIndex>5)>
<#assign prevPages=pageIndex-9>
<#if prevPages lt 1>
<#assign prevPages=1>
</#if>
<#assign start=pageIndex-4>
<a href="${uri}¤tPage=${prevPages}" title="向前5页">...</a>
<#else>
<#assign start=1>
</#if>
<#-- 显示当前页附近的页-->
<#assign end=pageIndex+4>
<#if (end>pageCount)>
<#assign end=pageCount>
</#if>
<#list start..end as index>
<#if pageIndex==index>
<b>${index}</b>
<#else>
<a href="${uri}¤tPage=${index}">${index}</a>
</#if>
</#list>
<#--如果后面页数过多,显示"...":-->
<#if (end lt pageCount)>
<#assign endend=end+5>
<#if (end>pageCount)>
<#assign end=pageCount>
</#if>
<a href="${uri}¤tPage=${end}" title="向后5页">...</a>
</#if>
<#-- 显示"下一页":-->
<#if (pageIndex lt pageCount)>
<a href="${uri}¤tPage=${pageCount}" title="末页">>></a>
</#if>
<#else>
nothing
</#if>
</#macro>
<@pagination pageCount=pageUtil.pageCount totalCount=pageUtil.totalCount uri=pageUtil.partUrl pageIndex=pageUtil.currentPage/>
</body>
</html>