sort projects and adds a link to parent