Add sorting to notes view.