alphagov/collections — pull request #59 by JordanHatch (2014-11-17 12:03:48+00:00)
Title: Add pagination to the latest changes feed

https://www.pivotaltracker.com/story/show/79185504

This changes the latest changes feed to display links to the previous and next pages, where appropriate.

A previous change to Collections API (alphagov/collections-api#12) added support for a `start` and `count` parameter to be provided in requests for a sub-topic, returning information about the size of the result set. Using this data, a new presenter `ChangedDocumentsPaginationPresenter` provides behaviour to calculate the number of pages, whether a previous or next page exists, and the destination URLs for the links.

The `Subcategory` model has been changed to allow `start` and `count` arguments to be used in its `find` method, and now passes these parameters into the Collections API request. The `SubcategoriesController` provides these from the `start` and `count` query string parameters.

The style rules and sprite images have been copied from the existing implementation in Frontend's search result interface.

Screenshot:
![pagination](https://cloud.githubusercontent.com/assets/71922/5069414/be71f3cc-6e51-11e4-8237-060290de77ee.png)