Fix position of endif in ZA search results template

Because the </div> was outside the if block, it was always getting
rendered, which broke the html when the starting <div> wasn't present.