alphagov/whitehall — pull request #887 by tekin (2013-09-25 16:20:37+00:00)
Title: Features on topics

This turned into a bit of a yak shave, but the code should be in a much better state as a result.

As well as allowing documents to be featured on topics, this pull request also:

* Tidies up the shared admin code between the two classification types (topics and topical events) as there is little difference between them now they both can have featured documents.
* Adds some missing test coverage as well as deletes some tests which weren't really providing us much value.
* Tweaks the way that featured documents are reordered as there was a bug in the existing code that meant re-ordering featurings would clear related topics.
* Makes some performance improvements by getting rid of a few n+1 queries on the admin side.

I've also tidied up some unnecessary including of routing helpers in some of the controller tests and adjusted the way we deal with routing for generic editions (previously we were defining routes in a factory file, which is not the place for it).

Tracker: https://www.pivotaltracker.com/story/show/53342563