Ported pagination template for Twitter Bootstrap from https://github.com/whiteoctober/Pagerfanta