Move template code to context for rooms calendar