Fix pagination links

Disable the next and previous links in the pagination when viewing the first page or the last one.