Switch between grid and list view for documents