update template: add common_lets method and fix indents in haml templates