Move pagination macro to layout.html