template: move row class tag to a proper place