Move inline view into a template