Refactor conditional in view to ternary