refactor ribbon view logic into controller