Some if statements in views