admin template refactoring