only show pagination if needed

Only shows the pagination elements if there are multiple pages.