alphagov/panopticon — pull request #112 by JordanHatch (2014-01-17 16:07:42+00:00)
Title: Improve filtering of artefacts

Currently, Panopticon has only two filters: a section filter and a search field. This branch redesigns the filters, combining them into a single form and adding filters for industry sectors, formats and state. These are needed so that, as we begin to add more artefacts in Panopticon from Whitehall, users can still find the artefacts they're looking for quickly and easily.

I've tweaked the layout of the artefacts index page so that you can clearly see the number of artefacts which match the filters you have applied. As you refine your filters, this number will decrease.

This branch adds lots more tests than previously existed for filtering. I've also refactored how filters are applied, so that the majority of the filtering behaviour now takes place in scopes on the Artefact model.

![screen shot 2014-01-17 at 15 59 09](https://f.cloud.github.com/assets/71922/1941839/a72faba6-7f90-11e3-9d3b-fa90a859b766.png)