[SPA] clean refactor templates and add param 'is_ajax()'
resolve #10