Fix display issues around search filters.

Review Request #1280 — Created June 19, 2018 and updated — Latest diff uploaded

Review Board

When search was rewritten for 3.0, search filters were rewritten along
with it. While they worked under the hood, it broke the display of

When attempting to display the filter options at the top of search
results, the template was iterating over keys and not items, resulting
in invisible nonsense being injected into the page. This masked the
"active filter" check, since filters weren't even being rendered, and
this was broken due to checking the wrong form field.

This change fixes the template iteration and the active check, bringing
back full functionality.

Testing Done:
Tested all filter modes. Verified that filters displayed and the
active one was always specially displayed.

Reviewed at

not yet