<% if (firstPage != currentPage) { %><%= _.isUndefined(i18n['First'])?'First':i18n['First'] %><% } else { %><%= _.isUndefined(i18n['First'])?'First':i18n['First'] %><% } %> <% if (currentPage > firstPage) { %><%= _.isUndefined(i18n['Previous'])?'Previous':i18n['Previous'] %><% } %> <% if (currentPage - 5 > firstPage) { %>...<% } %> <% for (var p=currentPage-5; p<=currentPage+5; p++) { %> <% if (p < firstPage || p > lastPage) continue; %> <% if (currentPage == p) { %> <%= p %> <% } else { %> <%= p %> <% } %> <% } %> <% if (currentPage + 5 < lastPage) { %>...<% } %> <% if (currentPage < totalPages) { %><%= _.isUndefined(i18n['Next'])?'Next':i18n['Next'] %><% } %> <% if (lastPage != currentPage) { %><%= _.isUndefined(i18n['Last'])?'Last':i18n['Last'] %><% } else { %><%= _.isUndefined(i18n['Last'])?'Last':i18n['Last'] %> <%} %>