refactoring of item template: moved html from js to tpl file