Add sorting to index view