Moved partial code back to templates.

This doesn’t work until contextual partials in 1.7