Add prev/next pagination button and disabled buttons on condition