separate layout and template

layout is saved when change
template is just used to init
open template dialog when add a page
added transitions in editor