move pagination menu output to the view