Factor out search controls into a different html snippet.