refactor module view templates to reduce duplication
add missing div
Merge pull request #3837 from dimagi/module-view

refactor module view templates to reduce duplication