" );
// prev
if (this.Current > 1) {
sb.AppendFormat( "
<{1} ", appendPage( recentLink, this.Current - 1, isHtml ), lang.get( "prevPage" ) );
}
// page number
int startNo;
int pp = this.Current / pageWidth;
if (this.Current % pageWidth == 0) {
startNo = (pp - 1) * pageWidth + 1;
}
else {
startNo = pp * pageWidth + 1;
}
if (startNo > this.PageCount) startNo = 1;
int endNo = startNo + pageWidth - 1;
if (endNo >= this.PageCount) endNo = this.PageCount;
if (endNo > recentPageCount) endNo = recentPageCount;
for (int i = startNo; i <= endNo; i++) {
String pstyle = this.Current == i ? "currentPageNo" : "pageNo";
sb.AppendFormat( "
{2} ", appendPage( recentLink, i, isHtml ), pstyle, i );
}
// next
if (this.Current + 1 > this.PageCount) {
}
else if (this.Current + 1 > recentPageCount) {
int nextPage = this.PageCount - recentPageCount;
sb.AppendFormat( "
{1}> ", appendPage( archiveLink, nextPage, isHtml ), lang.get( "nextPage" ) );
}
else {
sb.AppendFormat( "
{1}> ", appendPage( recentLink, this.Current + 1, isHtml ), lang.get( "nextPage" ) );
}
sb.AppendFormat( "
" + lang.get( "pageCount" ) + "", this.PageCount );
sb.Append( "
" );
return sb.ToString();
}
private String appendPage( String url, int pageNumber, Boolean isHtml ) {
if (isHtml) {
return PageHelper.AppendHtmlNo( url, pageNumber );
}
else {
return PageHelper.AppendNo( url, pageNumber );
}
}
/// " );
sb.AppendFormat( "
«{1}", recentLink, lang.get( "firstPage" ) );
sb.Append( "
" );
if (this.PageCount - this.Current <= recentPageCount) {
int prevPage = this.PageCount - this.Current;
sb.AppendFormat( "
<{1}", appendPage( recentLink, prevPage, isHtml ), lang.get( "prevPage" ) );
sb.Append( "
" );
}
else {
sb.AppendFormat( "
<{1}", appendPage( archiveLink, this.Current + 1, isHtml ), lang.get( "prevPage" ) );
sb.Append( "
" );
}
if (this.Current > 1) {
int nextPage = this.Current - 1;
if (nextPage > 1) {
sb.AppendFormat( "
{1}>", appendPage( archiveLink, this.Current - 1, isHtml ), lang.get( "nextPage" ) );
sb.Append( "
" );
sb.AppendFormat( "
{1}»", appendPage( archiveLink, 1, isHtml ), lang.get( "lastPage" ) );
}
else {
sb.AppendFormat( "
{1}>", appendPage( archiveLink, this.Current - 1, isHtml ), lang.get( "nextPage" ) );
}
}
sb.Append( "
" );
return sb.ToString();
}
public static DataPage