Move some view macros into ResourceBundle to reduce code duplication