added links to show and edit, added edit function to posts controller