Implemented new and edit actions for posts controller