Replace 'view' with 'close' when expanded.