Fixes for pagination on small viewports

https://www.openproject.org/work_packages/15375