how can i check the pagination limit while showing the next 5 pages....like below i want to show the next four pages in the pagination?
<li class="active">{{ link_to("employee/display?page=" ~ page.current~"&search_criteria="~request, '<i class="icon-fast-backward"></i> '~ page.current ) }}</li>
<li>{{ link_to("employee/display?page=" ~ (page.current + 1 )~"&search_criteria="~request, '<i class="icon-fast-backward"></i> '~ (page.current + 1 ) ) }}</li>
<li>{{ link_to("employee/display?page=" ~ (page.current + 2 )~"&search_criteria="~request, '<i class="icon-fast-backward"></i> '~ (page.current + 2 ) ) }}</li>
<li>{{ link_to("employee/display?page=" ~ (page.current + 3 )~"&search_criteria="~request, '<i class="icon-fast-backward"></i> '~ (page.current + 3 ) ) }}</li>
<li>{{ link_to("employee/display?page=" ~ (page.current + 4 )~"&search_criteria="~request, '<i class="icon-fast-backward"></i> '~ (page.current + 4 ) ) }}</li>
<li>{{ link_to("employee/display?page=" ~ (page.current + 1 )~"&search_criteria="~request, '<i class="icon-fast-backward"></i> Next' ) }}</li>